Run Nova on machines

Run Nova on machines

Run novad on your own servers, as one standalone node or as a cluster of three or more.

You can run Nova on plain machines, virtual or physical, with the novad binary and an S3-compatible bucket. Each node serves clients, runs the background auditor, and keeps a share of the metadata store on its own disk. There is no other service to install. This guide starts one node, grows it into a three-node cluster, and then runs the cluster under systemd.

Clients connect to any node, and the node sends them to the leader of the stream they use. While a node restarts, its clients see slower calls: the SDKs reconnect to another node and retry for up to 30 seconds.

Choose a shape

The metadata store records which streams exist and where each record is stored in the bucket. It is oxia, and by default it runs inside novad. The shape you choose decides how many copies of it exist.

ShapeMachinesMetadata copiesSurvives the loss ofUse when
Standalone1One, on the node's diskNothing: a lost disk loses the metadataYou try Nova, or run an install you can rebuild
Cluster3 or moreThree of every shard, on three nodesOne machine, disk includedProduction on a few machines
External metadata store3 or more, plus oxia's own machinesThree, on oxia's machinesOne machine on each sideMany nodes, metadata backups, or metadata work kept off the serving machines

Use a cluster of three for production. A standalone node can grow into a cluster later without copying any data. The metadata store inside novad takes no scheduled backups; only an external one does. The external shape has its own guide in Metadata store.

Before you start

  • Build novad and the nova command line from a checkout of the Nova repository with Go 1.27. Set GOARCH to your machines' architecture, then copy novad to /usr/local/bin on every machine.

    CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o novad ./cmd/novad
    CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o nova ./cmd/novactl

    A binary built this way serves a placeholder page at /admin/. Only the Docker image builds the admin dashboard into novad.

  • Create one bucket and credentials that can read, write and delete in it. The examples use RustFS at http://rustfs:9000 with the bucket nova. On AWS S3, leave out --s3-endpoint and --s3-path-style. Nodes read credentials from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, a shared profile, or an IAM role. See Object storage.

  • Give each machine a name the other machines can resolve. This guide uses nova-1, nova-2 and nova-3. Clients use port 7780. The nodes reach each other on 7790 and on the metadata store's five ports, 6660 to 6664. Those five ports have no TLS and no authentication, so keep them on a private network. Keep the metrics port, 9090 here, private too: it serves the admin dashboard and profiling without authentication. See ports.

  • novad starts with --auth off, which is fine for these steps. Turn authentication on before anyone outside your network can reach a node; see Server authentication.

Start one node

Start novad

On nova-1, give the node a directory, a client listener, a metrics listener and the bucket:

nova-1
export AWS_ACCESS_KEY_ID=nova AWS_SECRET_ACCESS_KEY=novatest
novad --dir /var/lib/nova --listen :7780 --metrics-listen :9090 \
      --s3-bucket nova --s3-endpoint http://rustfs:9000 --s3-region us-east-1 --s3-path-style

The node prints its settings as a table, then its log:

[INFO] embedded: initialising metadata role=standalone metadata=local dir=/var/lib/nova/metadata namespace=nova peers=[] streams_shards=4 queues_shards=4 sessions_shards=8 registry_shards=1 dispatch_shards=4 shard_plan="founding floors; existing shards are preserved"
[INFO] embedded: metadata initialisation complete role=standalone detached=false addr=localhost:42575 dur=1.590755978s
[INFO] wal: ledger minted star=01a204e3-6e3e-7e36-afc9-7d7390252157 epoch=1 class=standard layout=hashed priors_fenced=0
[INFO] novad: serving node=01a204e3-6e3e-7e36-afc9-7d7390252157 addr=nova-1:7780 listen=[::]:7780 metrics_listen=[::]:9090 zone="" location=local audit=on storage=s3 version=…

Lines that start with embedded: come from the metadata store, and role=standalone says it runs in this node alone. Every line also carries the node's node_id, which the examples leave out. novad: serving means the node is ready.

Check that it serves

export NOVA_ADDR=nova-1:7780
nova health
curl -s http://nova-1:9090/readyz
SERVING  node=01a204e3-6e3e-7e36-afc9-7d7390252157 zone= version=… leading=0
ok

/readyz answers 200 ok while the node takes traffic and 503 while it drains, so use it as a load balancer's health check.

Write and read a record

nova bucket create demo
nova stream create --bucket demo --key events
printf 'hello\nworld\n' | nova append nova://demo/events
nova read nova://demo/events --from 0
appended 2 entries
0	2026-11-22T20:12:27Z	hello
1	2026-11-22T20:12:27Z	world

The records are now in the bucket, and the node's directory says where they are.

The directory holds the node's identity and the metadata store:

/var/lib/nova/
  node-id       the node's identity, created on first start
  metadata/
    wal/        the metadata store's write-ahead log, one folder per keyspace
    db/         the metadata store's data, one folder per keyspace

On one machine this directory is the only copy of the metadata. The bucket holds the records, and the directory says where they are, so neither is useful without the other. Keep the directory across restarts, and do not run production on a standalone node.

The metadata store is split into five keyspaces (streams, queues, sessions, registry and dispatch) and each keyspace into shards. It is founded with 4, 4, 8, 1 and 4 shards. Oxia can split a shard later but never merges two, so a node that will become a busy cluster can be founded with more, for example --oxia-server-shards streams=16,queues=8. Nova reads the flag only when it founds the keyspaces.

Start a cluster

In a cluster, every node runs a data server that holds copies of metadata shards. Three nodes, the metadata peers, also run the coordinator, which places shards on data servers and picks each shard's leader. The peers keep the coordinator's state in a raft group, so the cluster keeps working with one peer down. Any further node is a member: it holds shard copies and serves streams like a peer, and it joins or leaves without a change on the other nodes.

Every node gets the same peer list, --oxia-server-peers. Three rules follow from it:

  • Use one list, in one order, on every node. The first address founds the cluster when it has no state yet. Every other peer waits for a leader and asks to join, so two fresh nodes can never found two clusters.
  • A node's own address decides its role. That address is the node's advertised host at --oxia-server-port (default 6660). The host comes from --advertise, else from a specific --listen host, else from the machine's hostname. A node whose address is in the list is a peer; any other node is a member. The log says which, as role=peer or role=member.
  • Only the founder can start alone. On a new cluster, the first peer founds the raft group by itself and serves at once; the others join it. After that, the group has three voters and needs two of them to elect a leader. A peer that starts while the other two are down waits for one of them.

Start three nodes

Run this on each machine, with its own name and zone:

nova-1; on nova-2 and nova-3, change --advertise and --zone
export AWS_ACCESS_KEY_ID=nova AWS_SECRET_ACCESS_KEY=novatest
novad --dir /var/lib/nova --listen :7780 --fleet-listen :7790 --metrics-listen :9090 \
      --advertise nova-1:7780 --zone az-1 \
      --oxia-server-peers nova-1:6660,nova-2:6660,nova-3:6660 \
      --s3-bucket nova --s3-endpoint http://rustfs:9000 --s3-region us-east-1 --s3-path-style

--fleet-listen gives the nodes' calls to each other a listener of their own, so heavy client traffic cannot block them. --zone is the machine's availability zone. Nova uses it as a placement label and, for Express, to prefer the bucket in the same zone.

The first peer logs the founding:

nova-1
[INFO] embedded: initialising metadata role=peer metadata=raft dir=/var/lib/nova/metadata namespace=nova peers="[nova-1:6660 nova-2:6660 nova-3:6660]" streams_shards=4 queues_shards=4 sessions_shards=8 registry_shards=1 dispatch_shards=4 shard_plan="founding floors; existing shards are preserved"
[INFO] embedded: coordinator leading
[INFO] embedded: data server registered node=01a203d0-a82e-719c-81c8-d2019304a302 via=nova-1:6660
[INFO] embedded: metadata initialisation complete role=peer detached=false addr=nova-1:6663 dur=12.395281709s
[INFO] novad: serving node=01a203d0-a82e-719c-81c8-d2019304a302 addr=nova-1:7780 listen=[::]:7780 metrics_listen=[::]:9090 zone=az-1 location=local audit=on storage=s3 version=…
[INFO] embedded: replication factor raised namespace=nova-streams from=1 to=3 servers=3
[INFO] embedded: replication factor raised namespace=nova-queues from=1 to=3 servers=3
[INFO] embedded: replication factor raised namespace=nova-sessions from=1 to=3 servers=3
[INFO] embedded: replication factor raised namespace=nova-registry from=1 to=3 servers=3
[INFO] embedded: replication factor raised namespace=nova-dispatch from=1 to=3 servers=3

The first address in the list is the founding peer. A new cluster starts with one copy of each shard, because one data server exists at first. When the third data server registers, the leading peer raises every keyspace to three copies. It never stops at two, because a shard with two copies needs both for every write. It never lowers the count either.

Check the cluster

nova oxia peers
nova fleet
nova-1:6660	leader
nova-2:6660	voter
nova-3:6660	voter
01a203d0-a82e-719c-81c8-d2019304a302  zone=az-1 addr=nova-1:7780
01a203d0-ac60-7adf-916f-5fcd75cb94db  zone=az-2 addr=nova-2:7780
01a203d0-aff1-735c-ad9d-5aa6cc08c932  zone=az-3 addr=nova-3:7780

oxia peers lists the raft group as the node you ask sees it. A peer that is still catching up shows joining, and becomes voter within about half a minute. fleet lists every node that serves clients.

Grow a standalone node into a cluster

A standalone node becomes the first metadata peer in place. The cluster is founded over the shards already in its directory, so nothing is exported or copied. Its clients wait while it restarts, about 15 seconds.

Restart the node with the peer list

Stop the standalone node. Start it again on the same directory, with the peer list from Start a cluster and its own address first:

nova-1
novad --dir /var/lib/nova --listen :7780 --fleet-listen :7790 --metrics-listen :9090 \
      --advertise nova-1:7780 --zone az-1 \
      --oxia-server-peers nova-1:6660,nova-2:6660,nova-3:6660 \
      --s3-bucket nova --s3-endpoint http://rustfs:9000 --s3-region us-east-1 --s3-path-style

Wait until it logs novad: serving. Before that it founds the keyspaces itself, over its own shards, and starts a new ledger for its write path:

nova-1
[INFO] embedded: namespace created namespace=nova-streams shards=4 replication_factor=1
[INFO] embedded: namespace created namespace=nova-queues shards=4 replication_factor=1
[INFO] embedded: namespace created namespace=nova-sessions shards=8 replication_factor=1
[INFO] embedded: namespace created namespace=nova-registry shards=1 replication_factor=1
[INFO] embedded: namespace created namespace=nova-dispatch shards=4 replication_factor=1
[INFO] embedded: metadata initialisation complete role=peer detached=false addr=nova-1:6663 dur=10.897955858s
[INFO] wal: ledger minted star=01a204e3-6e3e-7e36-afc9-7d7390252157 epoch=2 class=standard layout=hashed priors_fenced=1

Start the other two nodes

Start nova-2 and nova-3 with empty directories and the same command, each with its own --advertise and --zone. Never give them a directory that already holds metadata, such as another standalone node's. Only the first peer in the list may bring existing metadata. The leading peer raises every keyspace to three copies, as in Start a cluster.

Start the other nodes only after the first is serving

If nova-2 or nova-3 starts while nova-1 is still founding, it can found the keyspaces instead. The coordinator then places their shards on any of the three data servers, and the cluster stops using the standalone node's metadata. nova ls prints No buckets found., and the records written in standalone mode cannot be read.

Check that the records survived

nova read nova://demo/events --from 0
nova oxia peers
0	2026-11-22T20:12:27Z	hello
1	2026-11-22T20:12:27Z	world
nova-1:6660	leader
nova-2:6660	voter
nova-3:6660	voter

You cannot undo this. The metadata store never lowers its copy count, and it refuses to remove a data server when fewer than three would remain.

Run it as a service

Under systemd, put the settings every machine shares in a YAML file and what differs per machine in an environment file. Flags, NOVAD_* variables and the YAML file use the same names; see the YAML file.

/etc/nova/nova.yaml, the same on every machine
dir: /var/lib/nova
listen: ":7780"
fleet-listen: ":7790"
metrics-listen: ":9090"
oxia-server-peers: nova-1:6660,nova-2:6660,nova-3:6660
s3-bucket: nova
s3-region: us-east-1
# For RustFS or another S3-compatible store; leave both out on AWS S3.
s3-endpoint: http://rustfs:9000
s3-path-style: true
/etc/nova/novad.env on nova-1
NOVAD_ADVERTISE=nova-1:7780
NOVAD_ZONE=az-1
AWS_ACCESS_KEY_ID=nova
AWS_SECRET_ACCESS_KEY=novatest
/etc/systemd/system/novad.service
[Unit]
Description=Nova node
After=network-online.target
Wants=network-online.target

[Service]
User=nova
Group=nova
EnvironmentFile=/etc/nova/novad.env
ExecStart=/usr/local/bin/novad --config /etc/nova/nova.yaml
Restart=on-failure
TimeoutStopSec=75

[Install]
WantedBy=multi-user.target
Create the user and the directory, then start
sudo useradd --system --home /var/lib/nova --shell /usr/sbin/nologin nova
sudo install -d -o nova -g nova -m 0750 /var/lib/nova
sudo chgrp nova /etc/nova/novad.env && sudo chmod 0640 /etc/nova/novad.env
sudo systemctl enable --now novad

Move a running cluster onto the service one machine at a time, so that two peers stay up. On a fresh cluster, start all three units: the first peer founds the cluster, and the other two wait for it.

systemctl stop sends one SIGTERM. The node stops taking new streams, waits 5 seconds, and hands the streams it leads to the other nodes within 30 seconds. Then it closes, with 25 seconds allowed for the close. TimeoutStopSec=75 covers both with a margin. With a shorter timeout, systemd kills the node during the handoff, and another node must recover its streams instead, which takes longer. A machine that reboots rejoins the cluster with the same identity and role, from the same directory.

Logs go to the journal: journalctl -u novad -f. For a log collector, add log-format: json. Metrics are at http://<node>:9090/metrics; see Metrics and dashboards.

Watch progress

WhatWhere to lookTypical time
A node is readynovad: serving in its log, or 200 from /readyz1 second standalone, 10 to 15 seconds in a new cluster
A peer has caught upvoter in nova oxia peersAbout 30 seconds after it starts
Metadata has three copiesembedded: replication factor raised on the leading peerOnce the third data server registers
A stop has handed off its streamsserving drain complete: this writer leads nothingAbout 5 seconds, at most 30

Day-two tasks

TaskWhere
Add a nodeAdding and removing nodes. A node whose address is not in the peer list joins as a member.
Remove a nodeDecommission. With exactly three nodes, start the replacement first.
Upgrade novadUpgrades
Replace a metadata peerMetadata store
Split a busy metadata shardMetadata store
Move the metadata store to its own machinesMetadata store
Protect the metadataBackups and restore

If it goes wrong

SymptomLikely causeWhat to do
The log stops at embedded: initialising metadataA member waits for a leader to accept it, or a peer waits for every shard to have a leaderStart the other peers, and check that ports 6660 to 6664 are open between nodes. --log-level debug shows the retries as registration pending and waiting for shard leaders.
embedded: waiting for own address to resolveThe advertised host has no DNS record yetThe node keeps retrying. Fix the name or --advertise.
role=member on a node you meant as a peerIts own address is spelled differently from its entry in the peer list, or uses another --oxia-server-portMake the advertised host and the port match the list entry exactly
a standalone star has no coordinatorYou ran a nova oxia command against a standalone node, or nova oxia peers against a memberRun it against a metadata peer of a cluster
this star serves no embedded oxiaThe node uses an external metadata storeRun the command against the oxia deployment
--oxia-server-port N must leave room for five portsThe port plus four is above 65535Choose a lower port
nova ls prints No buckets found. after a standalone node grewThe other nodes started before the first was servingSee the warning in Grow a standalone node

See also

On this page