Sockudo
Getting Started

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 redis

The default server listens on:

ServiceURL
HTTP and WebSocket APIhttp://127.0.0.1:6001
Prometheus metricshttp://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 sockudo

Pin a release when your deployment needs repeatable installs:

cargo binstall sockudo --version 4.6.0

Run the installed binary with a local configuration file:

sockudo --config ./config/config.toml

Install from crates.io

Use cargo install when you prefer building the published crate on the target host:

cargo install sockudo --locked

Pin 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:latest

Use versioned tags for production rollouts:

docker pull ghcr.io/sockudo/sockudo:4.6.0
docker pull sockudo/sockudo:4.6.0

Start 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

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.toml

Run 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 --release

The 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 full

Feature flags

FeatureEnables
localIn-memory app, cache, queue, adapter, and rate limit implementations.
v2Sockudo-native protocol features. Enabled by default.
recoverySerial continuity, message_id, replay buffers, resume events, and rewind.
deltaFossil and Xdelta3/VCDIFF delta compression for V2 clients.
tag-filteringServer-side tag filter expressions for V2 subscriptions.
redisRedis adapter, cache, queue, and rate limiter support.
redis-clusterCluster-aware Redis transport and adapter support.
nats, kafka, rabbitmq, pulsar, google-pubsub, iggyHorizontal transport adapters.
mysql, postgres, dynamodb, scylladb, surrealdbPersistent app manager backends.
fullAll 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-features

Add 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 = false

Kubernetes 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=true

Use 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 | head

When health is green, continue with First connection.

On this page