Networking
Advanced networking options for WebRTC connections, including port forwarding and public IP configuration.
How connections work
EnderDash uses WebRTC to create a direct connection between your browser and the Minecraft server plugin. When you open the dashboard, the following happens:
- Your browser and the plugin exchange connection details through a signaling server
- Both sides gather network candidates (IP addresses and ports they can be reached at)
- They test each candidate pair until they find one that works
- A direct peer-to-peer connection is established
In most cases this works automatically. The plugin uses STUN servers to discover the server's public IP, and if a direct connection is not possible, it falls back to a TURN relay.
However, TURN relay connections are slower and cost money to operate. The options below let you guarantee direct connections by telling the plugin exactly what ports to use and what public IP to advertise.
Port restriction
By default, the plugin picks random ports for WebRTC traffic. This makes it impossible to set up port forwarding rules in advance because you do not know which ports will be used.
Enabling restrictPorts forces the plugin to only use ports within a specific range. You can then forward that exact range on your router or firewall.
# Restrict WebRTC to ports 10000-10010
restrictPorts: true
webrtcMinPort: 10000
webrtcMaxPort: 10010You need to forward both UDP and TCP on this range. WebRTC primarily uses UDP, but TCP candidates serve as a fallback for networks that block UDP.
A small range (10 ports) is usually enough. Each browser connection uses one port, so the range only needs to cover the number of simultaneous dashboard users you expect.
Public address advertising
If your server is behind NAT (for example, running at home behind a router), the plugin only knows its local IP address like 192.168.1.5. Browsers on the internet cannot reach that address directly.
Normally, STUN servers solve this by telling the plugin what its public IP is. But if STUN is blocked or unreliable, you can tell the plugin your public IP directly.
Enabling advertisePublicAddress rewrites the plugin's ICE host candidates to use the configured IP instead of the local one. Combined with port forwarding, this guarantees browsers can connect directly.
# Advertise your public IP in ICE candidates
advertisePublicAddress: true
publicAddress: "203.0.113.50"You can find your public IP by searching "what is my IP" in a search engine, or by asking your hosting provider.
Full example
Here is a complete configuration for a server behind NAT with port forwarding set up:
apiKey: "your-api-key"
signalingUrl: "wss://app.enderdash.com/api/signaling"
# Forward UDP+TCP ports 10000-10010 on your router to this server
restrictPorts: true
webrtcMinPort: 10000
webrtcMaxPort: 10010
# Replace with your actual public IP
advertisePublicAddress: true
publicAddress: "203.0.113.50"With this setup, STUN and TURN servers are not needed at all. Browsers will connect directly to your public IP on one of the forwarded ports.
When to use these options
| Situation | What to do |
|---|---|
| Everything works fine | Leave defaults, no changes needed |
| Connections work but fall back to TURN relay | Enable restrictPorts and set up port forwarding |
| Server is behind NAT and STUN is unreliable | Enable both restrictPorts and advertisePublicAddress |
| Hosted server with a public IP (VPS, dedicated) | restrictPorts alone is usually enough |