Sharkord
IntroductionInstallation

Docker

Run Sharkord with Docker, covering ports, the data volume, file ownership, and updates.

docker run \
  -p 4991:4991/tcp \
  -p 40000:40000/tcp \
  -p 40000:40000/udp \
  -v ./data:/home/bun/.config/sharkord \
  --restart unless-stopped \
  --name sharkord \
  sharkord/sharkord:latest

Then open http://localhost:4991 in your browser.

Images are published for linux/amd64 and linux/arm64.

Ports

  • 4991/tcp carries HTTP and WebSocket traffic between the client and the server.
  • 40000/tcp and 40000/udp carry WebRTC media: voice, webcam, and screen sharing. Both protocols listen on this port, so publish both.

Data

The container stores everything under /home/bun/.config/sharkord. Mount it somewhere on the host, as above, or your server is gone with the container. See Data Directory.

First Launch

The access token is printed once, on the first start. If you missed it:

docker logs sharkord

Health Check

/healthz answers with {"status":"ok"} and needs no authentication, which makes it a usable container health check:

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost:4991/healthz"]
  interval: 30s
  timeout: 5s
  retries: 3

File Ownership

The container drops to the bun user. If the mounted directory belongs to another UID on the host, set PUID and PGID and the entrypoint remaps the user before starting:

docker run -e PUID=1000 -e PGID=1000 ...

Running the container as a non-root user directly (--user, Kubernetes securityContext, rootless Podman) also works; in that case PUID/PGID are ignored and the mounted directory has to be writable already.

Configuration

Every option in config.ini can be set with an environment variable, which is usually easier in Docker:

docker run -e SHARKORD_WEBRTC_ANNOUNCED_ADDRESS=203.0.113.10 ...
Behind a NAT or a reverse proxy?

Set SHARKORD_WEBRTC_ANNOUNCED_ADDRESS to the public IP or domain clients should send media to. Forwarded client addresses need no setup unless a CDN is involved: see Behind a Proxy.

Updating

docker pull sharkord/sharkord:latest
docker rm -f sharkord
# run the same command again

The in-app updater is disabled inside Docker. See Updating.

On this page