Self Hosting
Docker Compose
Run the published GHCR image with persistent storage and verify the instance over Redis and HTTP.
Compose File
This is the baseline self-hosting configuration for Chabi:
services:
chabi:
image: ghcr.io/envsync-cloud/chabi:latest
ports:
- "6379:6379"
- "8080:8080"
environment:
BIND_HOST: 0.0.0.0
REDIS_PORT: 6379
HTTP_PORT: 8080
SNAPSHOT_PATH: /data
SNAPSHOT_INTERVAL_SECS: 60
volumes:
- ./data:/data
restart: unless-stoppedBring it up:
docker compose up -dWhy These Settings
BIND_HOST=0.0.0.0lets the container listen on the published interfaces.SNAPSHOT_PATH=/datapoints persistence at the mounted volume.SNAPSHOT_INTERVAL_SECS=60keeps the default background snapshot cadence explicit../data:/datapreserveschabi.kdboutside the container.
Verification
Verify the Redis protocol surface:
redis-cli -p 6379 PINGVerify the HTTP listener:
curl http://127.0.0.1:8080/
curl http://127.0.0.1:8080/metrics
curl http://127.0.0.1:8080/snapshotExpected behaviors:
PINGreturnsPONG/returns{"status": "ok"}/metricsreturns Prometheus text such aschabi_connected_clients/snapshotreturns JSON keyed by database number
Notes
- On startup, Chabi attempts to restore an existing
chabi.kdbfromSNAPSHOT_PATH. SAVEtriggers a synchronous snapshot write.- If you change published ports, keep the container-side ports at
6379and8080unless you also change the environment variables.