Docker

slash-socket-server as a container — the base for every other recipe.

slash-socket-server is the same runtime as the app, in a small image: ghcr.io/astrit/slash-socket-server:latest. It serves /live, /client.js, /types.d.ts, /health and the admin API on port 8080.

To pin a manifest instead of pushing one, mount it and point SOCKET_MANIFEST at it:

compose.yaml
PropTypeDescription
SOCKET_ADMIN_KEYrequired to manage itThe bearer key for /admin/*. The Slash Socket app and your backend use it. Use 24+ random characters: openssl rand -hex 24.
SOCKET_MANIFESToptionalThe manifest, inline JSON or a path to a file. When set, it's pinned. Leave it out to push manifests from the app or the admin API instead (kept in the data directory).
SOCKET_TOKEN_SECREToptionalThe secret your backend signs visitor tokens with, for manifests with auth.tokens.
SOCKET_DATA_DIR/data in the imageWhere field data and a pushed manifest are kept. Mount a volume here, or everything resets on redeploy.
SOCKET_ORIGINSoptionalComma-separated page origins allowed when the manifest lists none.
SOCKET_TRUST_PROXY1Read visitors' IPs from X-Forwarded-For — right behind Fly, Railway, Render or Caddy. Set 0 when clients connect straight to the container.
PORT8080The port to listen on. Most platforms set it for you.

Run one instance. A socket's state lives in that process (and its volume), so two replicas would be two separate sockets. One small instance holds thousands of open connections.

Then manage it from your Mac: in Slash Socket open Fields → + Server, enter its address and admin key, and push a manifest (or set SOCKET_MANIFEST). Pages connect to wss://your-domain with the client from https://your-domain/client.js.