Sharkord
IntroductionInstallation

Docker Compose

Sharkord plus Caddy for automatic HTTPS. The recommended setup.

Your domain must already point at the server. 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_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:

Caddyfile next to it:

your-domain.com {
  reverse_proxy sharkord:4991
}
docker compose up -d
docker compose logs sharkord   # to read the access token on first run

Caddy gets the certificate on the first request. Open port 40000 TCP and UDP in your firewall, since media skips Caddy. Your data is in ./data.

Forwarded client IPs work without config. If you put a CDN in front of Caddy, see Behind a Proxy.