Installation

Run Sockudo with Docker, a prebuilt Linux binary, Cargo, or Helm, choose the right feature set, and verify the server with health probes.

8 min read
View .mdEdit on GitHub

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.

PathBest forFeatures includedNeeds a Rust toolchain
Container imageLocal evaluation, containers, CIfull and monolithNo
Docker ComposeLocal development with Redis from a repository checkoutfull and monolith (built from the repository Dockerfile)No
Linux binaryVMs and bare-metal Linux hostsfullNo
crates.iomacOS, Windows, or other platformsDefaults (local, v2, opentelemetry) unless you add --featuresYes
SourceContributors and custom feature setsWhatever you selectYes
HelmKubernetes clustersSame as the container imageNo

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.

Terminal window
docker pull ghcr.io/sockudo/sockudo:latest
docker pull sockudo/sockudo:latest

Use versioned tags for production rollouts:

Terminal window
docker pull ghcr.io/sockudo/sockudo:5.2.0
docker pull sockudo/sockudo:5.2.0

Start a local container with an in-memory app and Prometheus metrics exposed:

Terminal window
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
VariableWhat it does
HOSTInterface the WebSocket and HTTP server binds to. 0.0.0.0 is required inside a container.
PORTPort for the WebSocket server and HTTP API. Defaults to 6001.
METRICS_PORTPort for the Prometheus endpoint. Defaults to 9601.
METRICS_ENABLEDTurns the Prometheus endpoint on or off.
SOCKUDO_DEFAULT_APP_ID, SOCKUDO_DEFAULT_APP_KEY, SOCKUDO_DEFAULT_APP_SECRETDefine 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:

Terminal window
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

Docker Compose

Use Compose from a repository checkout when you want Redis and repeatable local dependencies:

Terminal window
git clone https://github.com/sockudo/sockudo.git
cd sockudo
docker compose up sockudo redis

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

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

SettingValue under Compose
App IDdemo-app
App keydemo-key
App secretdemo-secret
Client eventsEnabled
User authenticationDisabled

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.

Terminal window
curl --proto '=https' --tlsv1.2 -sSfL \
https://sockudo.io/install.sh | sh

sockudo.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:

Terminal window
curl --proto '=https' --tlsv1.2 -sSfL \
https://sockudo.io/install.sh \
| sh -s -- --version 5.2.0

Choose another writable installation directory with --bin-dir:

Terminal window
curl --proto '=https' --tlsv1.2 -sSfL \
https://sockudo.io/install.sh \
| sh -s -- --bin-dir "$HOME/bin"
Installer optionEnvironment variableWhat it does
--version <version>SOCKUDO_VERSIONInstalls a specific release instead of the latest one.
--bin-dir <directory>SOCKUDO_INSTALL_DIRInstalls into this directory instead of ~/.local/bin.

Run the installed binary with a local configuration file:

Terminal window
sockudo --config ./config/config.toml

Only 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:

Terminal window
cargo install sockudo --locked

Pin a release or enable the same production-oriented features you would use from source:

Terminal window
cargo install sockudo --version 5.2.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.

Run from source

The repository is a Cargo workspace with several binaries, so select the server package with -p sockudo:

Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/sockudo/sockudo.git
cd sockudo
cargo run --release -p sockudo

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

Terminal window
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 full

Feature flags

FeatureEnables
localDefault marker for the single-node development profile. The in-memory app manager, cache, queue, adapter, and rate limiter are always compiled in.
v2Sockudo-native protocol features: recovery, delta, and tag-filtering. 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.
opentelemetryOTLP traces, metrics, and logs export. Enabled by default.
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, plus the matching durable history and push storage.
pushThe push notification platform. Provider support is added with push-fcm, push-apns, push-webpush, push-hms, and push-wns.
versioned-messagesVersioned mutable messages.
ai-transportAI Transport. Also enables versioned-messages.
fullAll production backends and optional integrations.

Minimal Pusher-compatible build

If you only need a small Pusher-compatible server, build without default features:

Terminal window
cargo build --release -p sockudo --no-default-features

Add V2 features explicitly when needed:

Terminal window
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:

  1. 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.
  2. Without --config, Sockudo looks for config/config.toml, then config/config.json, relative to the working directory. If neither exists, it starts from built-in defaults.
  3. 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.

config/config.toml
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
[app_manager.array.apps.policy.limits]
max_connections = 10000
[app_manager.array.apps.policy.features]
enable_client_messages = false
KeyDefaultWhat it does
port6001Port for the WebSocket server and HTTP API.
host0.0.0.0Interface the server binds to.
debugfalseTurns on verbose debug-level logging. Keep it off in production.
app_manager.drivermemoryWhere apps are stored. memory reads them from app_manager.array.apps in this file.
apps.id, apps.key, apps.secretnoneThe app’s identity. Clients connect with key; backends sign with secret.
apps.enablednoneA disabled app rejects new WebSocket connections.
apps.policy.limits.max_connectionsnoneMaximum concurrent connections for this app.
apps.policy.features.enable_client_messagesfalseAllows 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.

Terminal window
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
ValueWhat it does
config.adapterDriverAdapter used to fan out between pods. Use a shared adapter such as redis for more than one replica.
redis.hostRedis host used by the Redis adapter and backends.
autoscaling.enabledCreates a HorizontalPodAutoscaler.
pdb.enabledCreates a PodDisruptionBudget so voluntary disruptions keep pods available.
ingress.enabledCreates an Ingress for external traffic.
serviceMonitor.enabledCreates 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:

Terminal window
curl -f http://127.0.0.1:6001/up
curl -f http://127.0.0.1:9601/metrics | head

A 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 counter

Sockudo exposes several probes on the main port. Use them for load balancers and orchestrators:

ProbeHealthy responseWhat it checks
/up200 OKThe 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 OKThe same checks for one app. Returns 404 NOT_FOUND for an unknown app ID.
/ready200 OKThe /up checks plus capacity. Returns 503 CAPACITY when the node should stop receiving new connections.
/live200The process is running.
/accept-traffic200 ACCEPTINGAdmission for new connections. Returns 503 MEMORY_PRESSURE or 503 DRAINING.

When health is green, continue with First connection. Before shipping, follow the Deployment guide.

Next steps