IntroductionInstallation
Docker Compose
Run Sharkord with Docker Compose and Caddy for automatic HTTPS.
This is the easiest way to get a working setup with HTTPS: Compose runs Sharkord, and Caddy sits in front of it and handles certificates for your domain automatically.
Prefer to watch it?
How To Deploy Sharkord In 1 Minute walks through this exact setup end to end.
Create a docker-compose.yml:
services:
sharkord:
image: sharkord/sharkord:latest
container_name: sharkord
restart: unless-stopped
expose:
- "4991"
ports:
- "40000:40000/tcp"
- "40000:40000/udp"
environment:
SHARKORD_PORT: "4991"
# the address clients send voice and video to
SHARKORD_WEBRTC_ANNOUNCED_ADDRESS: "your-domain.com"
volumes:
- ./data:/home/bun/.config/sharkord
caddy:
image: caddy:2-alpine
container_name: sharkord-caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- sharkord
volumes:
caddy_data:
caddy_config:And a Caddyfile next to it, replacing your-domain.com with your domain:
your-domain.com {
reverse_proxy sharkord:4991
}Then start it:
docker compose up -dCaddy requests a certificate from Let's Encrypt on the first request, so your instance is reachable at https://your-domain.com within a few seconds. Your domain must already point at the server's public IP.
Notes
- Media ports are published directly. Caddy proxies HTTP and WebSocket traffic only; WebRTC media goes straight to port
40000on both TCP and UDP. Open it in your firewall. - Forwarded addresses work out of the box. Sharkord trusts private ranges by default, which covers the Compose network Caddy talks to it over, so rate limits apply per user rather than per proxy. See Behind a Proxy if you put a CDN in front of Caddy.
- The access token from the first launch is in
docker compose logs sharkord. - Your data lives in
./data. Back it up before updating.