Self-hosting
A Bellion Share deployment is one small signaling server. Media flows peer to peer (or through a member acting as relay); the server only introduces peers. Optionally add a TURN server for peers behind strict NAT, and a hosted relay that keeps fixed rooms open.
The code, binaries and environment variables still use the old blite name. Everything here builds from the source code on GitHub; the repository's docs/SELF_HOSTING.md has the same steps.
1. Signaling server
blite-signal is a single static Go binary (no cgo) listening on plain HTTP.
go build -o bin/blite-signal ./cmd/blite-signal
BLITE_ADDR=:8080 ./bin/blite-signal
# or
docker build -f Dockerfile.signal -t blite-signal .
docker run -p 127.0.0.1:8080:8080 blite-signal
Its routes: GET /ws (WebSocket signaling), GET /j/{code} (the share-link landing page), POST /v1/report (client log reports, only with BLITE_REPORT_DIR) and GET /healthz.
Put it behind any reverse proxy that terminates TLS and passes WebSocket upgrades (nginx, Caddy, HAProxy, ...). For example with Caddy:
share.example.com {
reverse_proxy 127.0.0.1:8080
}
Set BLITE_TRUST_PROXY=true only when the proxy sets X-Forwarded-For (rate limits are per client IP). Keep proxy idle timeouts above 30 seconds; the server pings every 30 seconds.
| Variable | Default | Meaning |
|---|---|---|
BLITE_ADDR | :8080 | Listen address |
BLITE_TRUST_PROXY | false | Take the client IP from CF-Connecting-IP / X-Forwarded-For |
BLITE_TURN_SECRET + BLITE_TURN_URLS | unset | coturn use-auth-secret credentials handed to peers (6 h lifetime) |
BLITE_ICE_JSON | unset | A fixed ICE server list (JSON array) instead |
BLITE_REPORT_DIR | unset | Accept client log reports into this directory (kept 30 days) |
BLITE_HOST_KEY | unset | Shared secret with a hosted relay (fixed room codes) |
BLITE_MAX_PEERS | 0 | Cap room size (0 = no cap) |
BLITE_STATE_FILE | unset | Keep rooms across restarts: saved every 30 s and on shutdown, loaded on start, reloaded on SIGHUP (rooms served since the last load are kept). Members resume into their slots instead of rejoining; after a crash, changes since the last save are lost. It holds password and token hashes, so put it on a private volume |
BLITE_MIN_COMPATIBLE_BUILD | 0 | Refuse clients below this build |
BLITE_MIN_RECOMMENDED_BUILD | 0 | Ask clients below this build to update |
With no ICE settings peers get public STUN only, so peers behind symmetric NAT can't connect; add TURN for those.
2. TURN (optional)
Run coturn with use-auth-secret and static-auth-secret=<secret>, open its ports (3478/udp, and 5349/tcp for TLS), and give the signaling server the same secret plus the URLs:
BLITE_TURN_SECRET=<secret>
BLITE_TURN_URLS=turn:turn.example.com:3478?transport=udp,turns:turn.example.com:5349?transport=tcp
3. Hosted relay (optional)
blite -host rooms.json keeps the listed rooms open around the clock and volunteers as each room's relay, so a room works without a member's machine relaying. It needs the GStreamer runtime (see Dockerfile.host) and the signaling server's BLITE_HOST_KEY.
Give it good upload bandwidth, run it with host networking, and tell it that bandwidth with -relay-upload-kbps (for example -relay-upload-kbps 200000 on a fast port): the server then gives it up to 16 members per room instead of 4, and it paces what it forwards to that rate. Member volunteers can relay alongside it when a room outgrows it.
[
{"code": "7K3Q-X9MD", "password": "a-room-password", "name": "Our relay",
"owners": ["<identity key from Room > Your identity key...>"]}
]
People whose identity keys are listed in owners own the room while they're in it. They find their key in the app under Room > Your identity key... during a session.
The relay guide walks through it step by step, with upload sizing. A hosted relay only works with your own server; with the official bellion.app server, run a dedicated relay machine instead, which joins a room by its share link.
The repository's docs/examples/ has a Docker Compose file running both services and an env.example.
4. Clients
Official builds can use your server as they are: under Room > Servers..., add share.example.com (or wss://share.example.com/ws) and, if you like, make it the default. Once a server is added, a picker at the bottom right of the window chooses where new sessions start. Share links name their server (https://share.example.com/j/CODE#password), so anyone can join from a link without adding the server; the first time, the app asks whether to join a session on a server not run by Bellion Share.
Discord integration isn't available on self-hosted servers yet.
Or point the app at your server with -server wss://share.example.com/ws or the BLITE_SERVER environment variable, or build it in:
export BLITE_DEFAULT_SERVER=wss://share.example.com/ws
scripts/build-windows.sh dist/windows # or scripts/build-deb.sh dist/linux
That server then replaces the built-in default.
Self-update is off unless the build is given an update server and release signing keys (BLITE_UPDATE_URL, BLITE_UPDATE_KEYS; see scripts/version.sh).