Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mesh Configuration

Enable multi-node journal synchronization over encrypted WireGuard tunnels.

Enable mesh

[mesh]
enabled = true
listen_addr = "0.0.0.0:4820"
peer_discovery = "static"     # or "dht"

[[mesh.peers]]
name = "node-beta"
endpoint = "192.168.1.20:4820"
public_key = "base64-encoded-wireguard-public-key"

[[mesh.peers]]
name = "node-gamma"
endpoint = "192.168.1.30:4820"
public_key = "base64-encoded-wireguard-public-key"

[mesh.sync]
interval_secs = 10
batch_size = 50
max_lag_before_full_sync = 1000

Field reference

FieldDescription
enabledEnable mesh networking
listen_addrAddress and port for incoming peer connections
peer_discoverystatic (explicit peers) or dht (distributed hash table)

Peer configuration

Each [[mesh.peers]] entry defines a remote node:

FieldDescription
nameHuman-readable peer name
endpointIP:port of the remote node
public_keyWireGuard public key for the peer

Sync settings

FieldDefaultDescription
interval_secs10How often to sync with peers
batch_size50Envelopes per sync batch
max_lag_before_full_sync1000Sequence lag threshold for full resync

DHT discovery

For dynamic environments, use DHT-based peer discovery:

[mesh]
peer_discovery = "dht"

[mesh.dht]
bootstrap_nodes = ["192.168.1.10:4821"]

Nodes announce themselves and discover peers automatically.

Key management

Generate WireGuard keys with:

akshi mesh keygen

This creates a keypair in the data directory. Share the public key with peers.