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 install builds from source and needs Rust 1.89 or newer. --locked builds with the dependency versions the release was built and tested with. The release profile uses fat LTO, so the build takes several minutes.
  • cargo binstall downloads 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.

VariantWhen to useFile
DefaultNo Lua scripting or TLS neededkividb-darwin-… (or Homebrew)
LuaYou need EVAL / EVALSHAkividb-lua-darwin-… (or Cargo with --features lua)
TLSYou need TLS-encrypted connectionskividb-tls-darwin-… (or Cargo with --features tls)
FullYou need bothkividb-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

FlagDefaultDescription
--port6380Port to listen on
--bind0.0.0.0Address to listen on
--requirepassnonePassword clients must AUTH with
--threads0 (auto)Worker threads. 0 uses cores − 2 (all cores below 4).
--databases16Number of databases
--aofoffAppend-only file persistence
--dirthe current directoryWhere dump.kdb, appendonly.aof and nodes.conf are kept
--maxmemory0Memory limit in bytes, or with a unit (512mb, 3gb). 0 = unlimited.
--loglevelinfodebug, verbose, notice (or info), warning, nothing
--io-modelautoI/O model: auto or tokio (uring is Linux only)
--configfile/etc/kividb/kividb.confConfiguration 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)

FlagDefaultDescription
--cluster-enabled <yes|no>noEnable cluster mode and open a cluster bus on port + 10000.
--cluster-node-timeout <ms>15000Failure 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.