This guide explains how to run Elastickv as a Raft cluster across multiple VMs using only docker run.
- No Docker Compose
- Not a single-VM deployment
- One Elastickv node per VM
Use docker run on 4 or 5 separate VMs and bootstrap the cluster from a fixed voter list via --raftBootstrapMembers.
Start all initial nodes (n1 to n4/n5) with both --raftBootstrapMembers and --raftBootstrap, then wait for quorum before sending write traffic.
Use private VM IPs for all bind addresses and lock down network access because gRPC, Redis, and DynamoDB-compatible endpoints are unauthenticated by default.
- 1 node = 1 VM
- Total nodes: 4 or 5
- VMs must be able to reach each other over TCP (at minimum
50051/tcp) - S3-compatible API clients must be able to reach
9000/tcpon each node - Prometheus must be able to reach each node's metrics endpoint if you want centralized monitoring (
9090/tcpin the examples below) - Docker Engine installed on every VM
Example (5 nodes):
| Node ID | VM | IP |
|---|---|---|
| n1 | vm1 | 10.0.0.11 |
| n2 | vm2 | 10.0.0.12 |
| n3 | vm3 | 10.0.0.13 |
| n4 | vm4 | 10.0.0.14 |
| n5 | vm5 | 10.0.0.15 |
For a 4-node cluster, remove n5.
| Nodes | Quorum | Tolerated Simultaneous Failures |
|---|---|---|
| 4 | 3 | 1 |
| 5 | 3 | 2 (recommended) |
If fault tolerance is a priority, use 5 nodes.
These examples prioritize operational clarity, not hardening. Treat them as baseline only.
- Mandatory isolation: do not expose any Elastickv cluster port to the public Internet or to shared/multi-tenant networks.
- Restrict inbound sources with firewall/security groups/NACLs so only Elastickv nodes and tightly controlled admin hosts can connect.
- All endpoints use plaintext transport (no TLS) and are unauthenticated by default: gRPC (including
RaftAdmin), Redis API, DynamoDB-compatible API, and S3-compatible API. The S3-compatible API remains plaintext HTTP even when--s3CredentialsFileis configured; that option only enables SigV4 authentication. Buckets marked aspublic-read(viaPutBucketAclorx-amz-aclheader onCreateBucket) allow unauthenticated read access (GetObject, HeadObject, ListObjectsV2) even when credentials are configured. - Any principal with network access to these ports can read/modify data and reconfigure cluster membership.
- Run Elastickv on dedicated private subnets/VPCs for the cluster, without direct Internet routing and without cross-tenant sharing.
- Enforce network segmentation and, where possible, add TLS/mTLS and authentication via Elastickv features or a trusted terminating proxy/service mesh.
- Do not bind advertised service addresses to
0.0.0.0orlocalhostin cluster flags; use each VM's routable private IP (for example,10.0.0.11).
docker pull ghcr.io/bootjp/elastickv:latestsudo mkdir -p /var/lib/elastickvRAFT_TO_REDIS_MAP and RAFT_TO_S3_MAP are for Redis/S3 leader routing only.
They are not used for Raft transport membership.
Raft node-to-node communication uses --address (gRPC transport).
Shared RAFT_TO_REDIS_MAP (5-node example):
RAFT_TO_REDIS_MAP="10.0.0.11:50051=10.0.0.11:6379,10.0.0.12:50051=10.0.0.12:6379,10.0.0.13:50051=10.0.0.13:6379,10.0.0.14:50051=10.0.0.14:6379,10.0.0.15:50051=10.0.0.15:6379"Shared RAFT_TO_S3_MAP (5-node example):
RAFT_TO_S3_MAP="10.0.0.11:50051=10.0.0.11:9000,10.0.0.12:50051=10.0.0.12:9000,10.0.0.13:50051=10.0.0.13:9000,10.0.0.14:50051=10.0.0.14:9000,10.0.0.15:50051=10.0.0.15:9000"Shared fixed bootstrap voters (5-node example):
RAFT_BOOTSTRAP_MEMBERS="n1=10.0.0.11:50051,n2=10.0.0.12:50051,n3=10.0.0.13:50051,n4=10.0.0.14:50051,n5=10.0.0.15:50051"Shared metrics bearer token (required because the examples bind --metricsAddress to non-loopback VM IPs):
ELASTICKV_METRICS_TOKEN="$(openssl rand -hex 32)"For a 4-node cluster, remove the n5 entry from RAFT_TO_REDIS_MAP, RAFT_TO_S3_MAP, and RAFT_BOOTSTRAP_MEMBERS.
This guide uses --network host and explicit VM private IPs.
Binding guidance:
- Set
--address,--redisAddress,--dynamoAddress, and--s3Addressto the VM private IP. - Set
--metricsAddressto the VM private IP if Prometheus scrapes from another host. - Set
--metricsTokento the same shared bearer token on every node whenever--metricsAddressis non-loopback. - Do not use
0.0.0.0as the advertised address. - Do not use
localhostfor cluster communication.
n1 (initial voter):
docker rm -f elastickv 2>/dev/null || true
docker run -d \
--name elastickv \
--restart unless-stopped \
--network host \
-v /var/lib/elastickv:/var/lib/elastickv \
ghcr.io/bootjp/elastickv:latest /app \
--address "10.0.0.11:50051" \
--redisAddress "10.0.0.11:6379" \
--dynamoAddress "10.0.0.11:8000" \
--s3Address "10.0.0.11:9000" \
--s3Region "us-east-1" \
--s3PathStyleOnly=true \
--metricsAddress "10.0.0.11:9090" \
--metricsToken "${ELASTICKV_METRICS_TOKEN}" \
--raftId "n1" \
--raftDataDir "/var/lib/elastickv" \
--raftRedisMap "${RAFT_TO_REDIS_MAP}" \
--raftS3Map "${RAFT_TO_S3_MAP}" \
--raftBootstrapMembers "${RAFT_BOOTSTRAP_MEMBERS}" \
--raftBootstrapn2 (initial voter):
docker rm -f elastickv 2>/dev/null || true
docker run -d \
--name elastickv \
--restart unless-stopped \
--network host \
-v /var/lib/elastickv:/var/lib/elastickv \
ghcr.io/bootjp/elastickv:latest /app \
--address "10.0.0.12:50051" \
--redisAddress "10.0.0.12:6379" \
--dynamoAddress "10.0.0.12:8000" \
--s3Address "10.0.0.12:9000" \
--s3Region "us-east-1" \
--s3PathStyleOnly=true \
--metricsAddress "10.0.0.12:9090" \
--metricsToken "${ELASTICKV_METRICS_TOKEN}" \
--raftId "n2" \
--raftDataDir "/var/lib/elastickv" \
--raftRedisMap "${RAFT_TO_REDIS_MAP}" \
--raftS3Map "${RAFT_TO_S3_MAP}" \
--raftBootstrapMembers "${RAFT_BOOTSTRAP_MEMBERS}" \
--raftBootstrapStart n3 to n5 the same way by replacing:
--address--redisAddress--dynamoAddress--s3Address--metricsAddress--raftId
Recommended startup sequence:
- Start
n1. - Immediately start enough peers to form quorum (
n2andn3at minimum). - Start remaining nodes (
n4,n5). - Send write traffic only after quorum is confirmed and leader election is stable.
Important behavior:
- In a 5-node cluster, at least 3 voters must be up for writes to commit.
- In a 4-node cluster, at least 3 voters must be up for writes to commit.
- If fewer than quorum nodes are running, leader election/commit may stall and writes may fail or hang.
Run on n1:
# Pin to an immutable digest.
GRPCURL_IMG="fullstorydev/grpcurl@sha256:085e183ca334eb4e81ca81ee12cbb2b2737505d1d77f5e33dabc5d066593d998"
# Optional: re-check the current digest for v1.9.3 before use.
# TOKEN=$(curl -fsSL 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:fullstorydev/grpcurl:pull' | jq -r .token)
# curl -fsSI -H "Authorization: Bearer ${TOKEN}" -H 'Accept: application/vnd.docker.distribution.manifest.list.v2+json' \
# https://registry-1.docker.io/v2/fullstorydev/grpcurl/manifests/v1.9.3 | tr -d '\r' | grep -i docker-content-digest
# Wait for every node gRPC endpoint
for ip in 10.0.0.11 10.0.0.12 10.0.0.13 10.0.0.14 10.0.0.15; do
until docker run --rm --network host "${GRPCURL_IMG}" \
-plaintext "${ip}:50051" list >/dev/null 2>&1; do
sleep 1
done
done
# Check Raft members
docker run --rm --network host "${GRPCURL_IMG}" \
-plaintext -d '{}' 10.0.0.11:50051 RaftAdmin/GetConfigurationFor a 4-node cluster, remove 10.0.0.15 from the loop.
Check leader:
docker run --rm --network host "${GRPCURL_IMG}" \
-plaintext -d '{}' 10.0.0.11:50051 RaftAdmin/LeaderWrite/read through Redis endpoints:
redis-cli -h 10.0.0.11 -p 6379 SET health ok
redis-cli -h 10.0.0.12 -p 6379 GET healthCheck the local Prometheus endpoint on any node:
curl -fsS -H "Authorization: Bearer ${ELASTICKV_METRICS_TOKEN}" \
http://10.0.0.11:9090/metrics | grep '^elastickv_'Prometheus must send the same bearer token when scraping:
scrape_configs:
- job_name: elastickv
authorization:
type: Bearer
credentials: ${ELASTICKV_METRICS_TOKEN}Grafana/Prometheus provisioning examples are available under monitoring/.
With 5 nodes, the cluster should continue serving with up to 2 node failures.
Example: stop n4 and n5:
docker stop elastickvThen verify writes/reads still succeed from remaining nodes:
redis-cli -h 10.0.0.11 -p 6379 SET survive yes
redis-cli -h 10.0.0.12 -p 6379 GET surviveCurrent DynamoDB-compatible API coverage:
CreateTable/DeleteTable/DescribeTable/ListTablesPutItem/GetItem/DeleteItem/UpdateItemQuery/ScanBatchWriteItemTransactWriteItems/TransactGetItems
Unknown X-Amz-Target operations return an unsupported-operation error. Per-operation restrictions (for example ConsistentRead on a global secondary index) are rejected with a descriptive error.
Stop/remove on each VM:
docker rm -f elastickv 2>/dev/null || trueRemove persisted data (if required):
sudo rm -rf /var/lib/elastickv/*