Run in production
Install KVStash
The daemon is one static binary with no runtime dependencies. The engine side is one Python package per engine. This page lists every channel and what it puts on your machine.
Last updated
Install channels
| Channel | What it installs | Use it for |
|---|---|---|
| Static binary | kvblockd (daemon) and kvbctl (CLI), Linux x86-64 and arm64, with checksums | Bare metal and VMs, with the systemd unit below |
| Container image | The daemon on an empty base image: no shell, runs as a non-root user, CA certificates for S3 | Docker, Compose, any container platform |
| Helm chart | One StatefulSet, Service, ConfigMap and Secret; optional NVMe volume per pod | Kubernetes: Kubernetes setup |
| Python packages | The adapter for your engine, plus the client library | Every engine host |
Download the daemon from the install page: static binaries for Linux x86-64 and arm64 (macOS arm64 for development), with SHA-256 checksums, or run curl -fsSL https://kvstash.com/install.sh | sh. The container image and Helm chart are available on request.
PyPI packages, checked end to end on 8 November 2026 with the official engine images: kvblockd 0.2.0 with vllm-kvblockd 0.1.2 on vLLM 0.33.0, and sglang-kvblockd 0.2.1 on SGLang 0.5.23. Both store, reload into a restarted engine and give the answer the engine gives from its own cache. lmcache-kvblockd 0.2.1 is not recommended yet: in LMCache's own image (LMCache 0.5.6, vLLM 0.31.0) a prompt reloaded from LMCache's own cache answered wrongly, with or without KVStash. On vLLM, use the native vllm-kvblockd connector.
Static binary
Version 0.2.3. With an NVMe tier it reports blocks that left DRAM before reaching flash as kvb_nvme_dram_only_evictions_total (see write bursts). 0.2.2 starts with a DRAM arena under 128 MiB without setting pinned_bytes_cap, and its systemd unit links these docs. 0.2.1 added, over 0.2.0: a GET that finds the NVMe read buffers busy retries inside the same request instead of returning misses; parallel GETs from one tenant wait up to 5 s for response memory instead of closing the connection; and a write burst wakes the move to NVMe at once. Older versions stay available: set KVBLOCKD_VERSION for the install script. Each archive holds kvblockd, kvbctl, a working loopback config.yaml, a namespaces.yaml with a demo tenant, the systemd unit and a short README. The binaries are statically linked, so copying them anywhere works.
# picks your platform, checks the SHA-256, installs to /usr/local/bin
curl -fsSL https://kvstash.com/install.sh | sh
kvblockd --version - Linux x86-64
- Linux arm64
- macOS arm64 (development only)
- SHA-256 checksums
# by hand: Linux x86-64 shown; use linux_arm64 on Graviton and other Arm hosts
V=0.2.3
curl -fsSLO https://kvstash.com/downloads/kvblockd_${V}_linux_amd64.tar.gz
curl -fsSLO https://kvstash.com/downloads/kvblockd_${V}_checksums.txt
sha256sum -c kvblockd_${V}_checksums.txt --ignore-missing # must print OK
tar -xzf kvblockd_${V}_linux_amd64.tar.gz
sudo install -m 0755 kvblockd_${V}_linux_amd64/kvblockd kvblockd_${V}_linux_amd64/kvbctl /usr/local/bin/
kvblockd --version Start with the quickstart config, then add tiers from DRAM, NVMe and S3 tiers.
Run under systemd
For a long-running node, run the daemon as its own system user under this unit. It allows the memory the arena needs, protects the rest of the system, and gives the graceful drain time to finish.
[Unit]
Description=kvblockd, KV-cache block store daemon
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=kvblockd
Group=kvblockd
ExecStart=/usr/local/bin/kvblockd --config /etc/kvblockd/config.yaml
Restart=on-failure
RestartSec=2
# The arena is the working set: allow locked and hugepage memory,
# and make the OOM killer pick something else first.
LimitMEMLOCK=infinity
LimitNOFILE=1048576
OOMScoreAdjust=-500
# Hardening: the daemon needs the network and its data directories only.
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictSUIDSGID=true
# list every NVMe volume directory here too: systemd ignores text after a value
ReadWritePaths=/var/lib/kvblockd
StateDirectory=kvblockd
# SIGTERM starts a graceful drain; systemd must wait for it.
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target cd kvblockd_0.2.3_linux_amd64 # the extracted archive; ./kvblockd-0.2.3 after install.sh
sudo useradd --system --no-create-home --shell /usr/sbin/nologin kvblockd
sudo mkdir -p /etc/kvblockd
sudo cp config.yaml namespaces.yaml /etc/kvblockd/ # config.yaml already points at /etc/kvblockd/namespaces.yaml
sudo cp kvblockd.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now kvblockd
systemctl status kvblockd - NVMe directories must be listed in
ReadWritePaths, becauseProtectSystem=strictmakes everything else read-only. - Hugepages are reserved on the host before the daemon starts; see the DRAM tier.
- Stopping sends SIGTERM: in-flight requests finish, the listener closes, then the arena is released.
TimeoutStopSecmust be longer than that drain.
Container image
Available on request for now (contact us); the binary above runs in any container too. The image contains only the daemon binary and CA certificates. It exposes 9440 (data) and 9442 (metrics) and runs as user 65532. Settings come from a mounted config file or from KVBLOCKD_ environment variables (full list).
docker run --rm --name kvblockd \
-p 9440:9440 -p 9442:9442 \
-v $PWD/config:/config \
-e KVBLOCKD_NAMESPACES=/config/namespaces.yaml \
-e KVBLOCKD_METRICS_ADDR=0.0.0.0:9442 \
-e KVBLOCKD_DRAM_ARENA_BYTES=17179869184 \
KVBLOCKD_IMAGE:VERSION KVBLOCKD_NAMESPACESis required. Without a namespaces file the daemon accepts no clients.KVBLOCKD_METRICS_ADDR=0.0.0.0:9442is required to scrape from outside. The default binds the metrics port to loopback inside the container, which-pcannot reach.- Memory: give the container more memory than
dram_arena_bytes; the daemon's own overhead is small. - No shell inside. Debug from outside:
/healthz,/metricsandkvbctl.
Python packages
Install the adapter into the same Python environment as the engine. Each one pulls in the kvblockd client. Python 3.10 or newer.
| Package | What it is | For |
|---|---|---|
vllm-kvblockd | vLLM native KV connector (KvblockdConnector) and the tiered-offloading manager | vLLM |
sglang-kvblockd | SGLang HiCache storage backend (KvblockdHiCacheStorage) | SGLang |
lmcache-kvblockd | LMCache remote storage plugin | LMCache on vLLM |
kvblockd | The Python client: wire protocol, connection pool, key hashing. Installed automatically by the three adapters | Your own code |
kvstash | Alias that installs kvblockd | Your own code |
The engine itself is never a hard dependency of an adapter: the engine loads the adapter, so the adapter does not force an engine version on your environment. The tested engine versions are listed on each engine setup page.
PyPI packages, checked end to end on 8 November 2026 with the official engine images: kvblockd 0.2.0 with vllm-kvblockd 0.1.2 on vLLM 0.33.0, and sglang-kvblockd 0.2.1 on SGLang 0.5.23. Both store, reload into a restarted engine and give the answer the engine gives from its own cache. lmcache-kvblockd 0.2.1 is not recommended yet: in LMCache's own image (LMCache 0.5.6, vLLM 0.31.0) a prompt reloaded from LMCache's own cache answered wrongly, with or without KVStash. On vLLM, use the native vllm-kvblockd connector.
Platforms
- Linux, x86-64 and arm64: supported for production. The NVMe tier uses direct I/O; on filesystems that refuse it (tmpfs, overlay) the daemon falls back to buffered I/O and says so in the log.
- macOS: runs for development and testing. No performance or durability results apply there.
- Engines: the adapters run where the engine runs, which for GPU serving is Linux with NVIDIA GPUs. The LMCache adapter needs Linux x86-64, because LMCache publishes no macOS wheel.
Something missing or wrong on this page? Email rudray@kvstash.com and it gets fixed.