diff --git a/src/pages/selfhosted/scaling-your-self-hosted-deployment.mdx b/src/pages/selfhosted/scaling-your-self-hosted-deployment.mdx index b973be5f..e2c743aa 100644 --- a/src/pages/selfhosted/scaling-your-self-hosted-deployment.mdx +++ b/src/pages/selfhosted/scaling-your-self-hosted-deployment.mdx @@ -84,7 +84,7 @@ For each relay server you want to deploy: - Public IP address - A domain name pointing to the server (e.g., `relay-us.example.com`) - Docker installed -- Firewall ports open: **80/tcp** (Let's Encrypt HTTP challenge), **443/tcp** (relay), and **3478/udp** (STUN) +- Firewall ports open: **80/tcp** (Let's Encrypt HTTP challenge), **443/tcp** (relay), and **3478/udp** (STUN). If you configure multiple STUN ports, open all of them ### 1.2 Generate Authentication Secret @@ -119,7 +119,7 @@ NB_LETSENCRYPT_DOMAINS=relay-us.example.com NB_LETSENCRYPT_EMAIL=admin@example.com NB_LETSENCRYPT_DATA_DIR=/data/letsencrypt -# Embedded STUN +# Embedded STUN (comma-separated for multiple ports, e.g., 3478,3479) NB_ENABLE_STUN=true NB_STUN_PORTS=3478 ``` @@ -138,6 +138,7 @@ services: restart: unless-stopped ports: - '443:443' + # Expose all ports listed in NB_STUN_PORTS - '3478:3478/udp' env_file: - relay.env @@ -317,12 +318,13 @@ Connect a NetBird client and verify that both STUN and relay services are availa netbird status -d ``` -The output should list your external STUN and relay servers: +The output should list your external STUN and relay servers. All configured STUN servers will appear, but only one randomly chosen relay is used per client: ``` Relays: [stun:relay-us.example.com:3478] is Available - [rels://relay-us.example.com:443] is Available + [stun:relay-eu.example.com:3478] is Available + [rels://relay-eu.example.com:443] is Available ``` ### 3.3 Test Relay Connectivity