Troubleshooting
Common problems when self-hosting a Realm server and how to fix them.
View logs
Start here for any issue:
docker compose -f docker-compose.server.yml logs -f realm-serverAdd --since 1h to limit output to the last hour.
Common problems
Voice shows 0 bytes / ICE state stuck at new
Cause: UDP ports 40000-49999 are not reachable from the internet.
Fix:
- Check your VPS firewall. Make sure UDP 40000-49999 is open inbound.
- If you're using UFW:
ufw allow 40000:49999/udp - Test it: run
nc -u -l 40001on the server, thennc -u YOUR_SERVER_IP 40001from another machine.
Voice connects but no audio flows
Cause: REALM_WEBRTC_ANNOUNCED_IP is missing, wrong, or set to a private IP.
Fix: Set it to your server's public IP or a hostname that resolves to it:
REALM_WEBRTC_ANNOUNCED_IP="203.0.113.42"Restart the server after changing this. A wrong value here means ICE candidates advertise the wrong address, so voice media never reaches the server.
"Cannot start without a server ID"
Cause: The server can't reach Realm on first boot. It needs to register before it can start.
Fix:
- Check
REALM_CORE_API_BASE_URLis set tohttps://api.realmvoice.app - Test outbound connectivity:
curl https://api.realmvoice.app/health - Check DNS resolution:
nslookup api.realmvoice.app
"Running offline"
Cause: The server has a saved identity (server-identity.json) but can't currently reach Realm.
Impact: Existing users with valid session tokens can still connect. New users can't get session tokens until Realm is reachable again.
Fix: Check your outbound firewall rules and DNS. The server reconnects automatically.
"Version not allowed"
Cause: The version of @realm/server you're running has been blocked by the version policy.
Fix:
docker compose -f docker-compose.server.yml pull
docker compose -f docker-compose.server.yml up -dConnection refused on port 5000
Cause: The container isn't running, or port 5000 isn't open in the firewall.
Fix:
- Check containers:
docker compose -f docker-compose.server.yml ps - Check the firewall allows TCP 5000 inbound
- If you added a reverse proxy, make sure it's running too
WebSocket disconnects frequently
Cause: A reverse proxy timeout. Nginx defaults to 60s with no activity. Caddy is more lenient.
Fix: If using Nginx, add:
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;Database connection errors
Cause: The server can't connect to its database.
Fix:
- Check the database is running:
docker compose -f docker-compose.server.yml ps mongo - Check
REALM_STORAGE_MONGO_URL. In Docker Compose the hostname is the service name (mongo), notlocalhost. - Check database logs:
docker compose -f docker-compose.server.yml logs mongo
Server registered but disappears from the server list
Cause: The server's heartbeat to Realm failed, marking it offline.
Fix: Check outbound connectivity, then restart:
docker compose -f docker-compose.server.yml restart realm-serverDiagnostic commands
# Container status and uptime
docker compose -f docker-compose.server.yml ps
# Resource usage (CPU, memory)
docker stats realm-server
# Follow logs in real time
docker compose -f docker-compose.server.yml logs -f realm-server
# Check port 5000 is reachable (run from outside your server)
curl http://YOUR_SERVER_IP:5000/metadata
# Test a UDP port (requires netcat on both machines)
# On the server:
nc -u -l 40001
# On your machine:
echo "test" | nc -u YOUR_SERVER_IP 40001Getting help
- Collect the server logs:
docker compose logs --tail=100 realm-server - Note your server version from
GET /metadata - Reach out via the support channel or contact us directly