Production deployment
Requirements
Section titled “Requirements”- A Linux server with Docker and Docker Compose.
- A domain name (for example
visio.example.org) pointing to that server. - An HTTPS certificate: browsers refuse camera and microphone access without HTTPS (except on
localhost). - These ports open in the firewall:
| Port | Protocol | Purpose |
|---|---|---|
443 (or your proxy’s port) |
TCP | Web page and WebSocket signalling, through the HTTPS proxy. |
10000-10100 (RTC_MIN_PORT-RTC_MAX_PORT) |
UDP and TCP | Audio and video streams to the SFU server. UDP is the normal path; TCP is a fallback when the network blocks UDP. Only the first NUM_WORKERS ports are actually used, but the whole range is published. |
-
Clone the repository and create the configuration file:
Terminal window git clone https://codeberg.org/Militant/militant-visio.gitcd militant-visiocp .env.example .env -
In
.env, set at leastDOMAIN=visio.example.org. If the server is behind NAT, or the domain does not point straight to it, also setANNOUNCED_IPto its public IP address. -
Start:
make up. -
Put an HTTPS proxy in front of port
3000. It must forward WebSocket connections (path/socket.io/). An example Nginx configuration is provided indocker/nginx.conf; add TLS termination to it or place it behind your own HTTPS access. -
Check:
curl https://visio.example.org/healthmust return{"status":"ok","mediasoup":"running"}.
Announced IP address
Section titled “Announced IP address”The SFU server has to tell browsers where to send their streams:
- if
ANNOUNCED_IPis set, it is used as is; - otherwise, if
DOMAINis notlocalhost, the domain’s IPv4 address is resolved at startup; - otherwise, no address is announced: this only works locally.
Restrictive networks (TURN)
Section titled “Restrictive networks (TURN)”Some networks (companies, universities, mobile connections) block UDP. A TURN server, such as Coturn, then lets the streams through. Two modes are supported:
- Ephemeral credentials (recommended):
WEBRTC_TURN_URLSandWEBRTC_TURN_AUTH_SECRET, with the same secret asstatic-auth-secretin Coturn (use-auth-secret). - Static credentials:
WEBRTC_TURN_URLS,TURN_USERNAMEandTURN_CREDENTIAL.
Example WEBRTC_TURN_URLS:
turn:turn.example.org:3478?transport=udp,turn:turn.example.org:3478?transport=tcp,turns:turn.example.org:5349?transport=tcp