Installation
Run Sockudo with Docker, a prebuilt Linux binary, Cargo, or Helm, choose the right feature set, and verify the server with health probes.
This page gets a Sockudo server running and proves it is healthy. Pick the install path that matches where you are: a container for the quickest local evaluation, a prebuilt binary for Linux hosts, Cargo for other platforms or custom feature sets, and Helm for Kubernetes. Every path ends at the same verification step.
Choose an install path
The paths differ mainly in which backends are compiled in. Sockudo uses Cargo features to include drivers such as Redis or PostgreSQL, so a binary can only use the backends it was built with.
| Path | Best for | Features included | Needs a Rust toolchain |
|---|---|---|---|
| Container image | Local evaluation, containers, CI | full and monolith | No |
| Docker Compose | Local development with Redis from a repository checkout | full and monolith (built from the repository Dockerfile) | No |
| Linux binary | VMs and bare-metal Linux hosts | full | No |
| crates.io | macOS, Windows, or other platforms | Defaults (local, v2, opentelemetry) unless you add --features | Yes |
| Source | Contributors and custom feature sets | Whatever you select | Yes |
| Helm | Kubernetes clusters | Same as the container image | No |
All paths serve the WebSocket server and HTTP API on port 6001 and Prometheus metrics on port 9601 by default.
Pull a container image
Sockudo publishes multi-architecture images to GitHub Container Registry and Docker Hub. GHCR is the primary registry; Docker Hub mirrors the same release tags.
docker pull ghcr.io/sockudo/sockudo:latestdocker pull sockudo/sockudo:latestUse versioned tags for production rollouts:
docker pull ghcr.io/sockudo/sockudo:5.2.0docker pull sockudo/sockudo:5.2.0Start a local container with an in-memory app and Prometheus metrics exposed:
docker run --rm --name sockudo \ -p 6001:6001 \ -p 9601:9601 \ -e HOST=0.0.0.0 \ -e PORT=6001 \ -e METRICS_PORT=9601 \ -e METRICS_ENABLED=true \ -e SOCKUDO_DEFAULT_APP_ID=demo-app \ -e SOCKUDO_DEFAULT_APP_KEY=demo-key \ -e SOCKUDO_DEFAULT_APP_SECRET=demo-secret \ ghcr.io/sockudo/sockudo:latest| Variable | What it does |
|---|---|
HOST | Interface the WebSocket and HTTP server binds to. 0.0.0.0 is required inside a container. |
PORT | Port for the WebSocket server and HTTP API. Defaults to 6001. |
METRICS_PORT | Port for the Prometheus endpoint. Defaults to 9601. |
METRICS_ENABLED | Turns the Prometheus endpoint on or off. |
SOCKUDO_DEFAULT_APP_ID, SOCKUDO_DEFAULT_APP_KEY, SOCKUDO_DEFAULT_APP_SECRET | Define one app from the environment. When any of these is set, it replaces the apps defined inline in the config file. |
The guides in this documentation use app-id, app-key, and app-secret. Set the three SOCKUDO_DEFAULT_APP_* variables to those values if you want to copy examples without editing them.
Mount a checked-in configuration file when you need the same settings locally, in CI, and in production:
docker run --rm --name sockudo \ -p 6001:6001 \ -p 9601:9601 \ -v "$PWD/config/config.toml:/app/config/config.toml:ro" \ ghcr.io/sockudo/sockudo:latest \ sockudo --config /app/config/config.tomlDocker Compose
Use Compose from a repository checkout when you want Redis and repeatable local dependencies:
git clone https://github.com/sockudo/sockudo.gitcd sockudodocker compose up sockudo redisThe Compose file builds the image from the repository’s Dockerfile, so the first up compiles Sockudo inside Docker. You do not need a local Rust toolchain, but expect the first build to take several minutes.
The default server listens on:
| Service | URL |
|---|---|
| HTTP and WebSocket API | http://127.0.0.1:6001 |
| Prometheus metrics | http://127.0.0.1:9601/metrics |
The Compose service runs the Redis adapter, cache, queue, and rate limiter, and defines its app through environment variables:
| Setting | Value under Compose |
|---|---|
| App ID | demo-app |
| App key | demo-key |
| App secret | demo-secret |
| Client events | Enabled |
| User authentication | Disabled |
Install a Linux binary
The installer supports x86_64 and ARM64 Linux, detects GNU libc or musl, and verifies the release
archive against its published SHA-256 checksum. It installs to ~/.local/bin by default.
curl --proto '=https' --tlsv1.2 -sSfL \ https://sockudo.io/install.sh | shsockudo.io/install.sh is the stable public URL. It redirects to the installer attached to the
latest GitHub release; the installer then downloads and verifies the selected version from GitHub.
On success it prints the installed version and path, and reminds you to add the directory to PATH
if it is not already there.
Pin the binary version in deployments:
curl --proto '=https' --tlsv1.2 -sSfL \ https://sockudo.io/install.sh \ | sh -s -- --version 5.2.0Choose another writable installation directory with --bin-dir:
curl --proto '=https' --tlsv1.2 -sSfL \ https://sockudo.io/install.sh \ | sh -s -- --bin-dir "$HOME/bin"| Installer option | Environment variable | What it does |
|---|---|---|
--version <version> | SOCKUDO_VERSION | Installs a specific release instead of the latest one. |
--bin-dir <directory> | SOCKUDO_INSTALL_DIR | Installs into this directory instead of ~/.local/bin. |
Run the installed binary with a local configuration file:
sockudo --config ./config/config.tomlOnly Linux binaries are published, and they are built with the full feature set. cargo binstall sockudo remains available for the same Linux
release assets; use a source build on macOS, Windows, and other platforms.
Install from crates.io
Use cargo install when you prefer building the published crate on the target host or need a
platform without a prebuilt binary:
cargo install sockudo --lockedPin a release or enable the same production-oriented features you would use from source:
cargo install sockudo --version 5.2.0 --lockedcargo install sockudo --locked --features "redis,postgres,push"This path compiles on the machine where you run it, so it needs a Rust toolchain and any native libraries required by the selected storage or adapter features.
Run from source
The repository is a Cargo workspace with several binaries, so select the server package with -p sockudo:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shgit clone https://github.com/sockudo/sockudo.gitcd sockudocargo run --release -p sockudoRun from the repository root, the server loads config/config.toml, which defines the app-id development app used throughout the guides. The compiled binary is written to target/release/sockudo.
The default feature set is intentionally local-friendly. Add only the backends your deployment needs:
cargo build --release -p sockudo --features "redis,postgres"cargo build --release -p sockudo --features "redis-cluster,mysql"cargo build --release -p sockudo --features "nats,postgres"cargo build --release -p sockudo --features "kafka,postgres"cargo build --release -p sockudo --features "iggy,postgres"cargo build --release -p sockudo --features fullFeature flags
| Feature | Enables |
|---|---|
local | Default marker for the single-node development profile. The in-memory app manager, cache, queue, adapter, and rate limiter are always compiled in. |
v2 | Sockudo-native protocol features: recovery, delta, and tag-filtering. Enabled by default. |
recovery | Serial continuity, message_id, replay buffers, resume events, and rewind. |
delta | Fossil and Xdelta3/VCDIFF delta compression for V2 clients. |
tag-filtering | Server-side tag filter expressions for V2 subscriptions. |
opentelemetry | OTLP traces, metrics, and logs export. Enabled by default. |
redis | Redis adapter, cache, queue, and rate limiter support. |
redis-cluster | Cluster-aware Redis transport and adapter support. |
nats, kafka, rabbitmq, pulsar, google-pubsub, iggy | Horizontal transport adapters. |
mysql, postgres, dynamodb, scylladb, surrealdb | Persistent app manager backends, plus the matching durable history and push storage. |
push | The push notification platform. Provider support is added with push-fcm, push-apns, push-webpush, push-hms, and push-wns. |
versioned-messages | Versioned mutable messages. |
ai-transport | AI Transport. Also enables versioned-messages. |
full | All production backends and optional integrations. |
Minimal Pusher-compatible build
If you only need a small Pusher-compatible server, build without default features:
cargo build --release -p sockudo --no-default-featuresAdd V2 features explicitly when needed:
cargo build --release -p sockudo --no-default-features --features "recovery,delta,tag-filtering"Configuration file
Sockudo prefers TOML configuration and resolves settings in this order:
- If you pass
--config <path>, Sockudo loads that file. If it cannot be read or parsed, the server exits instead of falling back to defaults. - Without
--config, Sockudo looks forconfig/config.toml, thenconfig/config.json, relative to the working directory. If neither exists, it starts from built-in defaults. - Environment variables are applied on top, so
PORT,ADAPTER_DRIVER,SOCKUDO_DEFAULT_APP_ID, and similar variables override the file.
Config files can reference the environment with ${VAR} or ${VAR:-default} placeholders, which keeps secrets out of checked-in files. A placeholder whose variable is unset and has no default is reported as an error at startup.
port = 6001host = "0.0.0.0"debug = false
[app_manager]driver = "memory"
[app_manager.array][[app_manager.array.apps]]id = "app-id"key = "app-key"secret = "app-secret"enabled = true
[app_manager.array.apps.policy.limits]max_connections = 10000
[app_manager.array.apps.policy.features]enable_client_messages = false| Key | Default | What it does |
|---|---|---|
port | 6001 | Port for the WebSocket server and HTTP API. |
host | 0.0.0.0 | Interface the server binds to. |
debug | false | Turns on verbose debug-level logging. Keep it off in production. |
app_manager.driver | memory | Where apps are stored. memory reads them from app_manager.array.apps in this file. |
apps.id, apps.key, apps.secret | none | The app’s identity. Clients connect with key; backends sign with secret. |
apps.enabled | none | A disabled app rejects new WebSocket connections. |
apps.policy.limits.max_connections | none | Maximum concurrent connections for this app. |
apps.policy.features.enable_client_messages | false | Allows clients to send client- events directly to other subscribers on private and presence channels. |
For exact loading precedence, equivalent JSON, secret injection, and clustered examples, see Static configuration. Every key is listed in the Configuration reference.
Kubernetes with Helm
The Helm chart is published alongside each release, and its version matches the Sockudo release version.
helm install sockudo oci://ghcr.io/sockudo/charts/sockudo --version 5.2.0 \ --set config.adapterDriver=redis \ --set redis.host=redis-master \ --set autoscaling.enabled=true \ --set pdb.enabled=true \ --set ingress.enabled=true \ --set serviceMonitor.enabled=true| Value | What it does |
|---|---|
config.adapterDriver | Adapter used to fan out between pods. Use a shared adapter such as redis for more than one replica. |
redis.host | Redis host used by the Redis adapter and backends. |
autoscaling.enabled | Creates a HorizontalPodAutoscaler. |
pdb.enabled | Creates a PodDisruptionBudget so voluntary disruptions keep pods available. |
ingress.enabled | Creates an Ingress for external traffic. |
serviceMonitor.enabled | Creates a Prometheus Operator ServiceMonitor for metrics scraping. |
Use Kubernetes when you need autoscaling, service monitors, disruption budgets, secret-backed app credentials, and cluster-level rollout controls. Continue with the production Kubernetes and Helm guide.
Verify
Check the health probe and the metrics endpoint:
curl -f http://127.0.0.1:6001/upcurl -f http://127.0.0.1:9601/metrics | headA healthy server answers /up with HTTP 200 and the body OK, and the metrics endpoint returns Prometheus text whose series start with sockudo_:
OK# HELP sockudo_http_received_bytes Total amount of bytes that sockudo's REST API received# TYPE sockudo_http_received_bytes counterSockudo exposes several probes on the main port. Use them for load balancers and orchestrators:
| Probe | Healthy response | What it checks |
|---|---|---|
/up | 200 OK | The app manager responds and at least one app is configured, plus dependency health. Returns 503 ERROR on failure and 503 DRAINING during shutdown. A 200 DEGRADED body means the server is up with a degraded dependency. |
/up/{app_id} | 200 OK | The same checks for one app. Returns 404 NOT_FOUND for an unknown app ID. |
/ready | 200 OK | The /up checks plus capacity. Returns 503 CAPACITY when the node should stop receiving new connections. |
/live | 200 | The process is running. |
/accept-traffic | 200 ACCEPTING | Admission for new connections. Returns 503 MEMORY_PRESSURE or 503 DRAINING. |
When health is green, continue with First connection. Before shipping, follow the Deployment guide.