Install on macOS
KiviDB runs on macOS on both Apple Silicon and Intel.
KiviDB runs on macOS on both Apple Silicon and Intel.
Install with Homebrew (recommended)
brew install kividbio/tap/kividb
This installs the Default build, without Lua or TLS. Upgrade it with the rest of your Homebrew packages:
brew upgrade kividb
Install with Cargo
KiviDB is also published on crates.io, in every variant:
cargo install --locked kividb # default variant
cargo install --locked kividb --features lua,tls # full (or lua, or tls)
cargo binstall kividb # the release's binary
cargo installbuilds from source and needs Rust 1.89 or newer.--lockedbuilds with the dependency versions the release was built and tested with. The release profile uses fat LTO, so the build takes several minutes.cargo binstalldownloads the release's own binary of the Default build, for Apple Silicon or Intel, instead of compiling.- The binary goes in
~/.cargo/bin.
Start KiviDB
Run it from the directory where it should keep its data, or name one with --dir:
kividb # default settings, port 6380
kividb --threads 8 # an explicit worker thread count
kividb --requirepass "change-me" # with a password
kividb --aof # with AOF persistence
Test the connection:
redis-cli -p 6380 ping
# PONG
KiviDB listens on port 6380, so it can run beside a Redis on 6379.
Lua scripting or TLS
Homebrew installs the Default build. For the others, use Cargo with --features, or a release binary.
| Variant | When to use | File |
|---|---|---|
| Default | No Lua scripting or TLS needed | kividb-darwin-… (or Homebrew) |
| Lua | You need EVAL / EVALSHA | kividb-lua-darwin-… (or Cargo with --features lua) |
| TLS | You need TLS-encrypted connections | kividb-tls-darwin-… (or Cargo with --features tls) |
| Full | You need both | kividb-full-darwin-… (or Cargo with --features lua,tls) |
Release binaries
Without Homebrew, or for a Lua, TLS or Full build: each release has tarballs for Apple Silicon (darwin-aarch64) and Intel (darwin-x86_64). Each unpacks to a kividb/ directory holding the kividb binary, LICENSE and NOTICE.
# Apple Silicon (on Intel, kividb-darwin-x86_64.tar.gz)
curl -LO https://github.com/kividbio/kividb/releases/download/v1.2.2/kividb-darwin-aarch64.tar.gz
tar xzf kividb-darwin-aarch64.tar.gz
./kividb/kividb --version
# Lua (swap "lua" for "tls" or "full" as needed)
curl -LO https://github.com/kividbio/kividb/releases/download/v1.2.2/kividb-lua-darwin-aarch64.tar.gz
tar xzf kividb-lua-darwin-aarch64.tar.gz
Every file in a release is listed, with links, on the Downloads page.
Command-line flags
| Flag | Default | Description |
|---|---|---|
--port | 6380 | Port to listen on |
--bind | 0.0.0.0 | Address to listen on |
--requirepass | none | Password clients must AUTH with |
--threads | 0 (auto) | Worker threads. 0 uses cores − 2 (all cores below 4). |
--databases | 16 | Number of databases |
--aof | off | Append-only file persistence |
--dir | the current directory | Where dump.kdb, appendonly.aof and nodes.conf are kept |
--maxmemory | 0 | Memory limit in bytes, or with a unit (512mb, 3gb). 0 = unlimited. |
--loglevel | info | debug, verbose, notice (or info), warning, nothing |
--io-model | auto | I/O model: auto or tokio (uring is Linux only) |
--configfile | /etc/kividb/kividb.conf | Configuration file to read, when it exists |
While there is no password and bind is not set, the server accepts clients from the same machine only (protected mode). Set --requirepass before you open it to other machines.
Cluster mode (optional)
| Flag | Default | Description |
|---|---|---|
--cluster-enabled <yes|no> | no | Enable cluster mode and open a cluster bus on port + 10000. |
--cluster-node-timeout <ms> | 15000 | Failure detection timeout (lower for faster failover testing). |
See Set up a cluster for forming a multi-node cluster.
Run kividb --help for the full list.
Note: io_uring is Linux only; on macOS KiviDB uses Tokio. That is fine for development; for production benchmarking, use Linux.