The repository includes Docker and Kubernetes assets for running SwarmKeyDb with a colocated Bee node.
BEE_MAINNET=false..env.example to .env and update the placeholder values.docker compose pull
docker compose up
The stack starts:
swarm-bee on ports 1633 and 1634swarm-keydb on port 6379A self-contained migration demo is available at deploy/migration/docker-compose.yml.
docker compose -f deploy/migration/docker-compose.yml up --build --abort-on-container-exit
The migration demo provisions a source Redis container, seeds sample data, migrates keys into SwarmKeyDb, and runs validation.
Manifests are under deploy/k8s/.
kubectl apply -f deploy/k8s/namespace.yaml
kubectl apply -f deploy/k8s/configmap.yaml
kubectl apply -f deploy/k8s/secrets.example.yaml
kubectl apply -f deploy/k8s/swarm-bee.yaml
kubectl apply -f deploy/k8s/swarm-keydb.yaml
Bee API traffic stays internal to the cluster by default. If you need internet-reachable P2P connectivity, set a public BEE_NAT_ADDR and adjust the swarm-bee-p2p service for your cluster networking model.
The production Helm chart is under helm/swarm-keydb/.
Install Bee first so SwarmKeyDb can reach a live Bee API.
helm repo add ethersphere https://ethersphere.github.io/helm
helm repo update
helm install --generate-name ethersphere/bee \
--namespace swarm-keydb \
--create-namespace
The SwarmKeyDb chart default env.beeUrl is https://bzz.limo. Override it with your Bee service DNS name when you want in-cluster Bee writes.
helm repo add swarm-keydb https://scholtz.github.io/swarm-keydb/
helm repo update
helm upgrade --install swarm-keydb swarm-keydb/swarm-keydb \
--namespace swarm-keydb \
--create-namespace \
--set secret.beePostageBatchId=<your-postage-batch-id>
Override for a generated Bee release service name:
kubectl -n swarm-keydb get svc
helm upgrade --install swarm-keydb swarm-keydb/swarm-keydb \
--namespace swarm-keydb \
--create-namespace \
--set env.beeUrl=http://<bee-service-name>.swarm-keydb.svc.cluster.local:1633 \
--set secret.beePostageBatchId=<your-postage-batch-id>
kubectl -n swarm-keydb get pods
kubectl -n swarm-keydb get svc
kubectl -n swarm-keydb logs deploy/swarm-keydb --tail=100
The env.beeUrl value must resolve to the Bee API service from inside the swarm-keydb pod.
SwarmKeyDb exposes:
/metrics (Prometheus)/health (liveness)/ready (readiness)/dashboard (HTML dashboard)Default ports:
METRICS_PORT=9090DASHBOARD_PORT=8080Example Prometheus scrape config:
scrape_configs:
- job_name: swarm-keydb
metrics_path: /metrics
static_configs:
- targets: ['swarm-keydb.default.svc.cluster.local:9090']
Example Grafana panel JSON:
{
"title": "SwarmKeyDb error rate",
"type": "timeseries",
"targets": [
{
"expr": "rate(swarmkeydb_operations_total{status=\"error\"}[5m])",
"legendFormat": "errors/sec"
}
]
}