Hosting behind a home router
At home, the router stands between your crew and the server. Give the server a fixed address, forward three things to it, and check first whether your line can receive forwarded ports at all.
Can you host at home?
Only if your internet line has its own public IPv4 address. Many providers share one address between many customers (CGNAT), or give you IPv6 plus a shared IPv4 (DS-Lite). Ports you forward on such a line never receive anything. Check it in a minute:
- Read the WAN or internet address on your router's status page (on a Fritz!Box: Internet > Online Monitor).
- On a computer at home, run the command below.
- If the two differ, or the router's address starts with
10.,192.168.,172.16.to172.31.or100.64.to100.127., you are behind CGNAT.
curl -4 https://ifconfig.me
The setup assistant, the startup log (setup check: lines) and the Internet connection item in Admin > Status warn about CGNAT and DS-Lite too. Your options when the line cannot host:
- Ask your provider for a public IPv4 address (often a free option or a business tariff), or a dual-stack line instead of DS-Lite.
- Run Mnema Talk on a small VPS, which has a public address.
- Keep the server at home and put an external relay in front of voice: coturn on a VPS (TURN (coturn)).
A fixed address in your network
Give the machine that runs Mnema Talk a fixed LAN address first, in the router's DHCP settings or on the machine itself. Every forward points at that address.
The forwards
Create these on your router's port-forwarding page (it may be called port sharing, virtual servers or NAT; on a Fritz!Box it is Internet > Permit Access > Port Sharing):
| Name | Protocol | External port | Internal IP | Internal port |
|---|---|---|---|---|
| mnema-web | TCP | 443 | the proxy's LAN IP, e.g. 192.168.1.20 | 443 |
| mnema-web-http (certificates) | TCP | 80 | the proxy's LAN IP | 80 |
| mnema-voice | UDP | 50000–50050 | the server's LAN IP | 50000–50050 |
| mnema-relay-udp | UDP | 3479 | the server's LAN IP | 3479 |
| mnema-relay-tcp | TCP | 3479 | the server's LAN IP | 3479 |
Never forward 8080, 5432 or 8333. Forwarding an IPv6 port is not needed.
The announced address
Before a call the server tells browsers where to send media. It learns its public address at startup with one STUN request. Behind NAT, if that detection fails, set it yourself in .env:
WEBRTC_NAT_1TO1_IP=203.0.113.7
A current dynamic-DNS name works too. Run docker compose up -d after changing it, and look for the webrtc announce line in docker compose logs app: it must show your public IP, not only a 172.x or 10.x address.
Works from outside, not at home?
Many routers have no NAT loopback: a device inside your network cannot reach your own public address. Tell the server its LAN address too, and browsers at home use that one:
WEBRTC_LAN_IP=192.168.1.20
The setup assistant asks for it. Alternatively list it after the public one, WEBRTC_NAT_1TO1_IP=203.0.113.7,192.168.1.20, or use split-horizon DNS.
Check it from outside
Admin > Status > Test my connection, opened on a phone on mobile data (Wi-Fi off), tells you whether direct UDP works, only the relay works, or nothing does. The Voice port item turns green with the time once a member from outside has connected. Nothing you test from inside your own network proves the forwards.