Installation
Run Sockudo locally or build a production binary with the right feature set.
The fastest way to evaluate Sockudo is Docker Compose. For a single binary, use cargo-binstall
or cargo install. For container platforms, pull the published image from GitHub Container Registry
or Docker Hub. The most controlled production path is a Cargo build with only the features you need.
Docker Compose
git clone https://github.com/sockudo/sockudo.git
cd sockudo
docker compose up sockudo redisThe 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 |
Use Compose when you want Redis, local configuration, and repeatable development infrastructure without compiling Rust first.
Install a prebuilt binary
Use cargo-binstall when you want the released Sockudo binary without cloning the repository or
compiling the server locally.
cargo install cargo-binstall
cargo binstall sockudoPin a release when your deployment needs repeatable installs:
cargo binstall sockudo --version 4.6.0Run the installed binary with a local configuration file:
sockudo --config ./config/config.tomlInstall from crates.io
Use cargo install when you prefer building the published crate on the target host:
cargo install sockudo --lockedPin a release or enable the same production-oriented features you would use from source:
cargo install sockudo --version 4.6.0 --locked
cargo 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.
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:latest
docker pull sockudo/sockudo:latestUse versioned tags for production rollouts:
docker pull ghcr.io/sockudo/sockudo:4.6.0
docker pull sockudo/sockudo:4.6.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:latestMount 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.tomlRun from source
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/sockudo/sockudo.git
cd sockudo
cargo run --releaseThe default feature set is intentionally local-friendly. Add only the backends your deployment needs:
cargo build --release --features "redis,postgres"
cargo build --release --features "redis-cluster,mysql"
cargo build --release --features "nats,postgres"
cargo build --release --features "kafka,postgres"
cargo build --release --features "iggy,postgres"
cargo build --release --features fullFeature flags
| Feature | Enables |
|---|---|
local | In-memory app, cache, queue, adapter, and rate limit implementations. |
v2 | Sockudo-native protocol features. 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. |
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. |
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 --no-default-featuresAdd V2 features explicitly when needed:
cargo build --release --no-default-features --features "recovery,delta,tag-filtering"Configuration file
Sockudo prefers TOML configuration. The server looks for config/config.toml first, with JSON kept as a fallback.
port = 6001
host = "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
max_connections = 10000
enable_client_messages = falseKubernetes with Helm
helm install sockudo ./charts/sockudo \
--set config.adapterDriver=redis \
--set redis.host=redis-master \
--set autoscaling.enabled=true \
--set pdb.enabled=true \
--set ingress.enabled=true \
--set serviceMonitor.enabled=trueUse Kubernetes when you need autoscaling, service monitors, disruption budgets, secret-backed app credentials, and cluster-level rollout controls.
Verify
curl -f http://127.0.0.1:6001/up
curl -f http://127.0.0.1:9601/metrics | headWhen health is green, continue with First connection.