02 · START

Install

XERJ ships as a single static binary. No JVM, no installer, no package manager yet — download the tarball, verify the checksum, move the binary into place, write a 20-line config, start it as a systemd unit.

System requirements

Download

$ curl -sLO https://xerj.dev/releases/xerj-0.1.0-linux-x86_64.tar.gz
$ tar xzf xerj-0.1.0-linux-x86_64.tar.gz
$ sudo install -m 0755 xerj /usr/local/bin/xerj
$ xerj --version

Write the config

The minimal config is three sections. Everything else uses defaults — see the config reference for the full key list.

# /etc/xerj/xerj.toml
[server]
rest_port    = 8080
bind_address = "0.0.0.0"
data_dir     = "/var/lib/xerj"

[auth]
enabled = true

[tls]
enabled   = true
cert_path = "/etc/xerj/certs/xerj.crt"
key_path  = "/etc/xerj/certs/xerj.key"

Run as a systemd unit

# /etc/systemd/system/xerj.service
[Unit]
Description=XERJ storage engine
After=network-online.target

[Service]
User=xerj
Group=xerj
ExecStart=/usr/local/bin/xerj --config /etc/xerj/xerj.toml
Restart=on-failure
LimitNOFILE=65536
ProtectSystem=strict
ReadWritePaths=/var/lib/xerj

[Install]
WantedBy=multi-user.target
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now xerj
$ sudo systemctl status xerj
$ curl -s http://localhost:8080/v1/health

Docker

Same binary, different shell. Useful for CI and for embedded dev.

$ docker run -d --name xerj \
    -p 8080:8080 -p 9200:9200 \
    -v xerj-data:/data \
    -v $PWD/xerj.toml:/xerj.toml:ro \
    xerj:0.1.0 --config /xerj.toml

Source · engine/README.md