Nodus
Self-hosting

Backup and recovery

What to back up, and how to rebuild a lost Relay.

What is durable

DataWhereBack up?
Accounts, devices, nodes, envelopes, eventsRelay SQLite (relay_data volume)Yes
Relay buffer, sessions, noncesRedis / Relay buffer directoryNo — transient
Files, catalogue, node identityStorage Node data dir + ~/.nodusYes (this is the source of truth)
TLS certsCaddy volumesOptional (reissued automatically)

The Relay's relay_data volume holds all durable server metadata. The Relay buffer and Redis are transient by design.

Backing up

  • Relay SQLite: use VACUUM INTO inside the relay container (or stop the Relay first and copy relay.db with its -wal/-shm sidecars).
  • Storage Node: back up the whole data directory and ~/.nodus/ (identity + config). Losing the identity means the node must re-pair with a new node_id.

Rebuilding a lost Relay

The Relay is not the source of truth. A Storage Node holds a full snapshot and can rebuild a new Relay database:

curl -X POST https://your-relay.example/rebuild \  # session-authenticated
  -H "content-type: application/json"

This initiates a full snapshot (snapshot_begin / snapshot_chunk / snapshot_end) from the primary node. Because the Relay only ever stored ciphertext and opaque envelopes, the rebuild restores exactly what it needs.

Recovering an account

Account recovery is separate and covered in Recovery and ADR-0002.

On this page