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.
12345678910export SOCKET_ADMIN_KEY=$(openssl rand -hex 24)echo "$SOCKET_ADMIN_KEY" # keep it — Slash Socket needs it to manage this server
docker volume create socket-datadocker run -d --name socket --restart unless-stopped \ -p 8080:8080 \ -e SOCKET_ADMIN_KEY \ -e SOCKET_TRUST_PROXY=0 \ -v socket-data:/data \ ghcr.io/astrit/slash-socket-server:latestTo pin a manifest instead of pushing one, mount it and point SOCKET_MANIFEST at it:
12345678910111213services: socket: image: ghcr.io/astrit/slash-socket-server:latest restart: unless-stopped ports: ["8080:8080"] environment: SOCKET_ADMIN_KEY: ${SOCKET_ADMIN_KEY} SOCKET_MANIFEST: /config/socket.json volumes: - ./socket.json:/config/socket.json:ro - socket-data:/datavolumes: socket-data: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.