SonicRelay has two parts — the server (backend) and the client (web UI). You run both on one machine. Your friends connect through their browsers.
git clone https://github.com/AlecMcQuarrie/sonicrelay.git
cd sonicrelayInstall dependencies and start the backend. It listens on port 3000.
cd server
npm install
npm startIn a second terminal, build the web UI and serve it on port 3001.
cd client
npm install
npm run build
PORT=3001 npm startOn your router (or VPS firewall), allow inbound traffic on the following ports to the machine running SonicRelay:
Ports 3000 and 3001 stay local — nginx (step 5) reverse-proxies them to HTTPS.
SonicRelay requires HTTPS. Browsers block microphone, camera, and screen sharing on plain HTTP, and passwords sent over HTTP are unencrypted.
You'll need a domain pointed at your server's public IP. If you don't want to buy one, DuckDNS hands out free subdomains that work with Let's Encrypt. Register two — one for the client, one for the server:
Install nginx and certbot, then add a site config that reverse-proxies each subdomain to its local port:
server {
listen 80;
server_name chat.example.com;
location / { proxy_pass http://127.0.0.1:3001; }
}
server {
listen 80;
server_name api.example.com;
location / { proxy_pass http://127.0.0.1:3000; }
}Then let certbot issue the certificates and turn on HTTPS:
sudo certbot --nginx -d chat.example.com -d api.example.comShare https://chat.example.com with your friends. On first load they'll enter your server address (api.example.com) and pick a username and password. That's it.
Prefer Caddy, a Cloudflare origin certificate, or another reverse proxy? Any of them work — pick what you're comfortable with.