Network ports

From mnema-talk v3.3.13, rendered on this site.

The one reference for every port Mnema Talk listens on and every outbound connection it makes. Use it to set up a router, a cloud firewall or a strict egress filter. The settings behind the ports are in operations.md; install steps per platform are in quick-start.md.

What to forward, in short

That is all: three things from the internet, and what breaks without each.

PortProtocolIf it is missing
443TCPThe site does not load
50000-50050UDPChat works, voice and video show "No media connection"
3479UDP and TCPVoice works for most members, but not for those behind strict firewalls or VPNs that block UDP

In detail:

  1. TCP 443 (and TCP 80 if your proxy fetches certificates over HTTP) to the reverse proxy. The proxy forwards to the app on 127.0.0.1:8080.
  2. UDP 50000-50050 to the host that runs Mnema Talk: voice, video and screen share. The proxy does not carry it (see Why voice needs UDP). Only one port of the range carries media in the default mode (the lowest, WEBRTC_UDP_MUX_PORT), so forwarding just that port would work today; the whole range is forwarded so the legacy per-peer mode (WEBRTC_UDP_MUX_PORT=0, one port per peer, about 25 people at once across all rooms) keeps working too.
  3. UDP and TCP 3479 to the same host: the built-in TURN relay for members whose network blocks UDP. Needed only while the relay runs (the default while WEBRTC_TURN_URLS is empty).

Nothing else must be reachable from the internet. PostgreSQL and SeaweedFS are not published at all, and 8080 stays closed.

Router and firewall copy-paste table

Create these entries in your router's port-forwarding page (it may be called port sharing, virtual servers or NAT). "Internal IP" is the LAN address of the machine that runs Mnema Talk (or of your reverse proxy for the first line when it is a different machine); give that machine a fixed address first.

NameProtocolExternal portInternal IPInternal port
mnema-webTCP443the proxy's LAN IP, e.g. 192.168.1.20443
mnema-web-http (only for certificates)TCP80the proxy's LAN IP80
mnema-voiceUDP50000-50050the server's LAN IP50000-50050
mnema-relay-udpUDP3479the server's LAN IP3479
mnema-relay-tcpTCP3479the server's LAN IP3479

Never forward 8080, 5432 or 8333. A router that asks for a single "protocol: TCP/UDP" entry can use "both" for 3479. For example, a Fritz!Box calls the page Internet > Permit Access > Port Sharing; menu names vary by model and firmware. On a VPS create the same ports in the host firewall and in the provider's security group (platform notes). Check the result with Test my connection.

Inbound ports

The addresses below are the defaults of docker-compose.yml and .env.example. "Internet" means members outside your network.

PortProtocolReached fromDefault and settingPurposeNeeded?Forward / open?
443TCPInternetYour reverse proxyWeb app, API and WebSocket (/api/ws) over HTTPSRequiredYes, to the proxy
80TCPInternetYour reverse proxyCertificate issuance and the redirect to HTTPSOnly if the proxy needs itYes, to the proxy
8080TCPReverse proxy onlyPORT (host side of the mapping; the container always listens on 8080), published on PUBLISH_ADDR (default 127.0.0.1)The app's HTTP server behind the proxyRequiredNo. Loopback by default. Set PUBLISH_ADDR=0.0.0.0 or a LAN address only when the proxy runs on another host, and then keep it off the router
50000-50050UDPInternetWEBRTC_UDP_PORT_MIN / WEBRTC_UDP_PORT_MAX, published on WEBRTC_PUBLISH_ADDR (default 0.0.0.0; 127.0.0.1 keeps voice on this computer, as setup --local sets)Voice, video and screen share from browsers (ICE and SRTP)Required for callsYes, the whole range
3479UDP and TCPInternetWEBRTC_BUILTIN_TURN_PORT, narrowed with TURN_PUBLISH_ADDRBuilt-in TURN relay for members behind firewalls that block UDPOptional: only while the relay runs (WEBRTC_BUILTIN_TURN=auto with WEBRTC_TURN_URLS empty, or on)Yes, both protocols, while the relay runs
3478UDP and TCPInternetFixed in the coturn serviceExternal coturn, only with docker compose --profile turnOptional: only if you use coturnYes, only with coturn
49152-49200UDPInternetFixed in the coturn servicecoturn relay portsOptional: only if you use coturnYes, only with coturn

Notes on the table:

  • Media range. All peers share one UDP port, by default the lowest of the range (WEBRTC_UDP_MUX_PORT, which must lie inside the range). Compose still publishes the whole range, and WEBRTC_UDP_MUX_PORT=0 (legacy mode) uses one port per peer from it. Forward the whole range so either mode works. If you change WEBRTC_UDP_PORT_MIN or WEBRTC_UDP_PORT_MAX, forward the new range; Compose publishes the same one.
  • Built-in relay. One port serves both UDP and TCP and needs no relay range of its own. It relays only to the server's own media port. With WEBRTC_BUILTIN_TURN=on the port must lie outside the media range. Compose publishes it even when the relay is off; with the relay off, nothing listens and the forward is unnecessary. TURN_PUBLISH_ADDR=127.0.0.1 stops Docker from publishing it. Details: Built-in TURN relay.
  • coturn. coturn uses host networking on 3478 and the range 49152-49200 and can run beside the built-in relay, which uses 3479. Details: coturn.
  • IPv6. Forwarding an IPv6 port is not needed; the server announces IPv4 addresses.
  • On a VPS the public address is on the machine, so open the same ports in the host firewall (for example ufw) and in the provider's security group.
  • Behind NAT (home router, NAS), set WEBRTC_NAT_1TO1_IP when the automatic detection does not find the public address, and forward to the host's LAN address. A server behind DS-Lite or CGNAT cannot receive forwarded ports; see operations.md.

Ports that stay closed

These exist only inside the Docker network or on loopback. Do not forward or publish them.

PortProtocolServiceExposure
5432TCPPostgreSQLDocker network only, never published. The development compose file publishes it on loopback (POSTGRES_HOST_PORT)
8333TCPSeaweedFS S3 APIDocker network only, never published. The development compose file publishes it on loopback (S3_HOST_PORT)
8080TCPApp HTTPLoopback by default (see above). /api/metrics is served here too, only with METRICS_TOKEN set; scrape it from inside your network (operations.md)

Outbound connections

The server and its sidecars start these connections themselves. Allow them in a strict egress filter, or turn the feature off where noted. Browsers make their own connections (to your server, and to the STUN or TURN servers you list in WEBRTC_STUN_URLS and WEBRTC_TURN_URLS); those are not the server's.

DestinationPort and protocolWhenPurposeSwitch off / change
stun.l.google.com, stun.cloudflare.com19302 and 3478, UDPAt startup and every 10 minutes, production only, while WEBRTC_NAT_1TO1_IP is emptyOne STUN request to find the server's public IPv4 address. The STUN server sees the server's IP address, nothing elseWEBRTC_AUTO_ANNOUNCE=false (then set WEBRTC_NAT_1TO1_IP); servers: WEBRTC_DETECT_STUN_URLS
api.github.com443, TCPEvery 30 minutesCheck for a newer release (admin System tab)UPDATE_CHECK_ENABLED=false
time.cloudflare.com, pool.ntp.org123, UDPAt startup and every 6 hoursCompare the server clock for the admin setup checksCLOCK_CHECK_ENABLED=false
Your mail serverSMTP_PORT: 587 (STARTTLS) by default, 465 with SMTP_TLS=tls, TCPOnly when mail is sentAddress confirmation and password resetLeave SMTP_HOST empty for no mail
Browser push services (the address each browser registered, for example the browser vendor's)443, TCPWhen a member has Web Push on and a notification is dueEncrypted Web Push notifications. Only public https:// addresses on port 443 are allowedPUSH_ENABLED=false
Websites members link to; youtube.com, vimeo.com, store.steampowered.com for rich previews80 and 443, TCP, public addresses onlyWhen a message with a link is postedLink previews and embedsLINK_PREVIEWS_ENABLED=false
Webhook targets an admin configuredPublic addresses; private ones only if listed in WEBHOOK_ALLOW_PRIVATE_TARGETSWhen a webhook firesOutgoing webhooksDo not create webhooks
ghcr.io443, TCPWhen you pull or update the imagedocker compose pull and the self-update sidecar pull ghcr.io/mnema-xyz/mnema-talkPin a tag and update by hand
registry-1.docker.io, auth.docker.io443, TCPOnly if MNEMA_IMAGE is the Docker Hub mirror (mnemaxyz/mnema-talk) instead of GHCRdocker compose pull and the self-update sidecar pull docker.io/mnemaxyz/mnema-talk; the sidecar also reads the signature from thereUse ghcr.io
tuf-repo-cdn.sigstore.dev443, TCPOnly with the autoupdate profileThe updater verifies the image signature through Sigstore before it pullsUPDATER_TRUSTED_ROOT with a local trusted_root.json
raw.githubusercontent.com443, TCPFresh install and manual upgradesDownload docker-compose.yml and .env.example of a releaseCopy the files yourself

The server never needs inbound access from any of these. DNS (port 53) is needed for every name above, as for any host.

Something wrong on this page? Tell us.