Documentation Index
Fetch the complete documentation index at: https://docs.iroh.computer/llms.txt
Use this file to discover all available pages before exploring further.
Logging
iroh uses thetracing crate for logging. To see what’s happening inside iroh, you need to enable logging in your application.
Setup
First, add the tracing subscriber dependency:main function, initialize the subscriber:
Running with logs
Now run your application with theRUST_LOG environment variable to control the log level:
Doctor CLI
iroh doctor is a command-line tool that helps you diagnose network connectivity issues with your iroh setup.Installation
Home Relay
All iroh endpoints will maintain a single home relay server that they’re reachable at. On startup iroh will probe its configured relays & choose the one with the lowest latency. Report on the current network environment, using either an explicitly provided stun host or the settings from the config file by usingiroh-doctor report.
use1-1.relay.iroh.network relay, and that it has a latency of 10ms. This is the relay that the endpoint will use to establish connections with other endpoints.
Network Diagnostics
To diagnose connectivity issues on your users’ endpoints in production, use Network Diagnostics. It runs the same kinds of probes asiroh-doctor (UDP connectivity, NAT type, relay latency, port mapping) but you trigger them from the Iroh Services dashboard against any of your project’s online endpoints. The report comes back to the dashboard, so you can see what your user is experiencing without asking them to run a CLI tool.
To enable diagnostics on an endpoint, grant the NetDiagnosticsCap::GetAny capability and run a ClientHost. See the Network Diagnostics integration guide for the full setup.