WeaveDocs
Weave Dht Daemon

Usage

Running the Weave DHT daemon — operational node process wrapping `weave-dht` services.

Purpose

Runtime daemon wrapper around Weave DHT services and operational node process.

This page follows the real source shape for Weave Dht Daemon and explains the workflow a developer is likely to use first.

Developer workflow

Start from the smallest constructor or builder, perform one meaningful operation, inspect the returned state, then add the relevant policy, storage, or network integration. The examples below should be expanded whenever the crate API changes.

Primary types to know

  • No public items were detected by the source scan. This page should be updated when the crate exposes new items.

Example shape

# Operational walkthrough: bring up a daemon, bootstrap into the network,
# write a record, and verify replication from a second host.

# Host A — primary writer.
weave-dht-daemon \
  --listen /ip4/0.0.0.0/udp/4040/quic \
  --storage /var/lib/weave-dht/a \
  --bootstrap /ip4/198.51.100.7/udp/4040/quic &

# Wait for the routing table to populate, then write.
sleep 5
weave-dht-daemon-cli put audit:2026-05-14 '{"kind":"login","actor":"alice"}'

# Host B — second daemon that bootstraps off Host A.
ssh host-b -- weave-dht-daemon \
  --listen /ip4/0.0.0.0/udp/4040/quic \
  --storage /var/lib/weave-dht/b \
  --bootstrap /ip4/<host-a-ip>/udp/4040/quic &

# Verify replication. Repeat until the value resolves on Host B.
ssh host-b -- weave-dht-daemon-cli get audit:2026-05-14