Skip to content

Install

ScrivaDB ships two binaries: scriva (server) and scriva-cli (client). Both are statically linked (no CGO) and there is nothing else to install.

You are on…Easiest path
macOS or Linux with HomebrewHomebrew
WindowsScoop
Debian / Ubuntu / Fedora / RHEL.deb / .rpm
You have Go installedGo install
Any server or container platformDocker
Anything elsePrebuilt binary
A Go program that just needs a databaseEmbed it
Terminal window
brew install --cask srjn45/scriva/scriva

This installs both scriva and scriva-cli from the srjn45/homebrew-scriva tap.

Terminal window
scoop bucket add scriva https://github.com/srjn45/scoop-scriva
scoop install scriva

Every GitHub Release attaches packages for amd64 and arm64. They install both binaries into /usr/bin.

Terminal window
VERSION=1.6.0 # the release you want
ARCH=amd64 # or arm64
# Debian / Ubuntu
curl -LO "https://github.com/srjn45/scriva/releases/download/v${VERSION}/scriva_${VERSION}_linux_${ARCH}.deb"
sudo dpkg -i "scriva_${VERSION}_linux_${ARCH}.deb"
# Fedora / RHEL
sudo rpm -i "https://github.com/srjn45/scriva/releases/download/v${VERSION}/scriva_${VERSION}_linux_${ARCH}.rpm"

There is no apt or yum repository, so these packages do not update themselves, and they do not ship a systemd unit — see Operations & security for running the server as a service.

With Go 1.24 or later, install the standalone server and CLI directly into $GOBIN (or $GOPATH/bin):

Terminal window
go install github.com/srjn45/scriva/cmd/scriva@v1.6.0
go install github.com/srjn45/scriva/cmd/scriva-cli@v1.6.0

Replace v1.6.0 with the release you want. Ensure that destination is on your PATH; use a tagged version rather than @latest for a repeatable deployment.

Archives for linux, macOS and windows on amd64/arm64 are attached to every release as scriva_<version>_<os>_<arch>.tar.gz (.zip on Windows).

Terminal window
VERSION=1.6.0 # the release you want
OS=linux # linux | darwin
ARCH=amd64 # amd64 | arm64
curl -LO "https://github.com/srjn45/scriva/releases/download/v${VERSION}/scriva_${VERSION}_${OS}_${ARCH}.tar.gz"
curl -LO "https://github.com/srjn45/scriva/releases/download/v${VERSION}/checksums.txt"
grep "scriva_${VERSION}_${OS}_${ARCH}.tar.gz$" checksums.txt | sha256sum -c -
# macOS: replace sha256sum with shasum -a 256
tar xzf "scriva_${VERSION}_${OS}_${ARCH}.tar.gz"
sudo mv scriva scriva-cli /usr/local/bin/

Multi-arch (amd64 + arm64) images are published to GitHub Container Registry as ghcr.io/srjn45/scriva. Tags are latest and one per release (v1.6.0). Pin a version tag in production so a restart never upgrades you by surprise.

Terminal window
docker run -d \
-p 5433:5433 -p 8080:8080 \
-v $(pwd)/data:/data \
-e SCRIVA_API_KEY=my-secret-key \
ghcr.io/srjn45/scriva:v1.6.0 \
--grpc-addr 0.0.0.0:5433 --rest-addr 0.0.0.0:8080

The image’s entrypoint is scriva serve --data /data; extra arguments are appended (do not repeat serve). Listeners default to 127.0.0.1 inside the container, so pass the two address flags as above for the published ports to be reachable. Binding all interfaces makes the server refuse to start unless an API key or TLS is configured. The image contains the server only; use scriva-cli from another install path or the REST/gRPC API.

With Compose (from a clone of the repository):

Terminal window
SCRIVA_API_KEY=dev-key docker compose up -d

gRPC is on :5433, REST on :8080, and data persists in a named scriva-data volume.

Requires Go 1.24+.

Terminal window
git clone https://github.com/srjn45/scriva
cd scriva
make build # produces bin/scriva and bin/scriva-cli
make test # run the suite with the race detector

If you only want the database inside a Go program, install nothing — add the module:

Terminal window
go get github.com/srjn45/scriva # ergonomic façade (recommended)
go get github.com/srjn45/scriva/engine # lower-level storage engine

See the Embedding guide.

Terminal window
scriva --version
scriva-cli --version

Release builds print the release version; a build from source prints dev. Continue to the Quickstart.

ScrivaDB has no self-update command: you upgrade by replacing the binaries (or the image tag) through the same channel you installed from, then restarting the server.

Installed withUpgrade
Homebrewbrew upgrade --cask srjn45/scriva/scriva
Scoopscoop update scriva
.deb / .rpmdownload the new package and dpkg -i / rpm -U it
Go installrepeat both go install commands with the new version
Binaryrepeat the download steps with the new version
Dockerchange the image tag, then docker compose pull && docker compose up -d (or docker pull and recreate the container)
Embeddedgo get github.com/srjn45/scriva@v1.6.0

The Homebrew and Scoop packages are updated by the release job when it has its publishing credentials, so a brand-new release can take a moment to appear there.

Before you upgrade a server with data you care about:

  1. Read the changelog for the versions you are crossing; Upgrade note entries call out behaviour changes (for example, the v1.6 secure-by-default listeners).
  2. Take a backup — see Durability & backup.
  3. Stop the old server cleanly, swap the binaries, and start the new one. Never run two versions against the same data directory at once.

Within a major version the wire API and client SDKs stay compatible, and older data directories open as-is (index files are rebuilt once on first open when needed). The exception is cross-collection transactions: once a data directory has run one, it can no longer be opened by a pre-v1.5 server. Plan rollbacks around your backup, and see the upgrade, downgrade and recovery playbook and Atomic batches & upgrading roots.