Self-hosting
Backup and recovery
What to back up, and how to rebuild a lost Relay.
What is durable
| Data | Where | Back up? |
|---|---|---|
| Accounts, devices, nodes, envelopes, events | Relay SQLite (relay_data volume) | Yes |
| Relay buffer, sessions, nonces | Redis / Relay buffer directory | No — transient |
| Files, catalogue, node identity | Storage Node data dir + ~/.nodus | Yes (this is the source of truth) |
| TLS certs | Caddy volumes | Optional (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 INTOinside the relay container (or stop the Relay first and copyrelay.dbwith its-wal/-shmsidecars). - Storage Node: back up the whole data directory and
~/.nodus/(identity + config). Losing the identity means the node must re-pair with a newnode_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.