Point an A record (live.example.com) at the server's IP, then put these two files in one folder on it and run docker compose up -d. Caddy gets a certificate for the domain and passes WebSockets through on its own.
compose.yaml
123456789101112131415161718192021services: socket: image: ghcr.io/astrit/slash-socket-server:latest restart: unless-stopped environment: SOCKET_ADMIN_KEY: ${SOCKET_ADMIN_KEY} SOCKET_TOKEN_SECRET: ${SOCKET_TOKEN_SECRET} volumes: - socket-data:/data
caddy: image: caddy:2 restart: unless-stopped ports: ["80:80", "443:443"] volumes: - ./Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data
volumes: socket-data: caddy-data:Caddyfile
123live.example.com { reverse_proxy socket:8080}123printf 'SOCKET_ADMIN_KEY=%s\nSOCKET_TOKEN_SECRET=%s\n' $(openssl rand -hex 24) $(openssl rand -hex 32) > .envdocker compose up -dcat .env # the admin key Slash Socket needsThen 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.