Install

Deployment examples ​

Two complete examples are in deploy/examples/. Each has its own README with the diagram and the steps.

ExampleUse it when
single-vmOne VM. One ndb and several apps (Go, Ruby, Node) share a unix socket. Compose file, direct-mode variant, voodu template.
cross-vm-wireguardndb on a db VM. Apps on other VMs use TCP inside a WireGuard tunnel.

Rules for both:

  • data_dir is on a local disk, never on NFS, EFS or another network volume.
  • One ndb replica owns the data dir.
  • Unix socket: share the socket dir, and set -unix-mode 0660 with a shared group.
  • TCP: listen on a private (WireGuard) address only, and add -token-file as defense in depth. The apps send the token with NDB_TOKEN.
  • Direct mode only for files on the same machine as ndb.

For a plain host, use deploy/systemd. For one container, see docker.md.