Connection Setup
Understand the normal WebRTC connection flow and the advanced options that help when direct connections fail.
How connection normally works
EnderDash connects your browser to the agent over WebRTC. In the normal case:
Signal the session
Your browser and the agent both talk to the signaling service first.
Gather connection candidates
Both sides collect the addresses and ports they can potentially use.
Try viable paths
WebRTC tests those candidates until one of them succeeds.
Open the data channel
When a direct path works, the browser and agent exchange traffic over that direct channel.
Most installs do not need manual network changes
If a direct path is not possible, EnderDash can fall back to a TURN relay. That is slower than a direct connection, but it keeps the product usable on restrictive networks.
When to change anything
Good reasons to open this page
Open this page when one of these is true:
- the server stays offline even though the agent is running
- connections work, but often fall back to a relay
- you are hosting behind NAT and want a predictable port-forwarding setup
- STUN discovery is unreliable in your environment
If normal install is not finished yet
If you have not finished the normal install flow yet, start with Agent Setup.
Restrict the WebRTC port range
When restrictPorts helps
By default, the agent chooses ports dynamically. That is simple, but it makes firewall rules harder to preconfigure.
Enable restrictPorts if you want the agent to stay inside a fixed range:
restrictPorts: true
webrtcMinPort: 10000
webrtcMaxPort: 10010Forward both UDP and TCP
If you use this option, forward both UDP and TCP for the same range. UDP is preferred, but TCP is still useful as a fallback.
Advertise a public address
When to use it
If the server sits behind NAT and STUN is not giving the agent a usable public address, you can tell the agent what to advertise:
advertisePublicAddress: true
publicAddress: "203.0.113.50"What address to enter
Use the actual public IP for the host or edge router that you forwarded traffic to.
Example for a home or small-office network
apiKey: "your-api-key"
signalingUrl: "wss://app.enderdash.com/api/signaling"
restrictPorts: true
webrtcMinPort: 10000
webrtcMaxPort: 10010
advertisePublicAddress: true
publicAddress: "203.0.113.50"Why this works
That setup gives WebRTC a stable port range and a usable public address, which often avoids relay use.
Troubleshooting by symptom
Was this page helpful?
Send a quick note if anything is missing or unclear.
Last updated on