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

Running the forwarder

This page gets a local ndn-fwd process listening on a Unix socket in under five minutes. For production deployments see Self-hosting.

Build and run

From the workspace root:

cargo run -p ndn-fwd

ndn-fwd reads ndn-fwd.toml from the current directory; if absent it uses defaults. The example config is at examples/ndn-fwd.example.toml.

By default the forwarder:

  • Listens on /tmp/ndn-fwd.sock for application IPC.
  • Listens on UDP/6363 for cross-host NDN traffic.
  • Stores PIB and KeyChain at ~/.ndn/.
  • Logs to stderr at info level (override with RUST_LOG).

WebRTC datachannel faces are opt-in: they pull in the full WebRTC stack, so build with --features webrtc to enable the [listeners.webrtc] config section.

Verify

In another terminal:

ndn-ctl status

ndn-ctl ships in binaries/tooling/ndn-tools/. It speaks the TLV management protocol over the same Unix socket and prints face / route / strategy state.

Minimal config

ndn-fwd.toml:

[mgmt]
socket = "/tmp/ndn-fwd.sock"

[face.udp]
listen = "0.0.0.0:6363"

[log]
filter = "info,ndn_engine=debug"

Every knob is documented in Config reference.

Stopping

Ctrl-C shuts down cleanly. The forwarder closes faces, persists strategy choices, and exits. State that survives a restart lives in ~/.ndn/ and the on-disk config.

Next steps

  • Connect an application to this forwarder: Five-minute app.
  • Run as a system service with systemd or docker-compose: Self-hosting.
  • Configure faces (UDP, TCP, Unix, WebTransport, WebRTC, BLE, Ethernet, shared memory): Face transports.
  • Tune for throughput: Performance.