Transport
Remote work travels over iroh: QUIC + TLS 1.3 with mutual authentication.
What it gives you
- Dial by NodeID. No open inbound ports after provisioning, no host
certificates to manage. Provisioning a machine uses SSH once (or cloud-init);
after that, deploys, tunnels, and
ant nest worker updateneed no inbound port on either side. A machine that serves public domains still needs 80/443 inbound for Caddy and ACME. - Mutual authentication. Both sides prove possession of their key; the transport verifies the bound endpoint id equals the NodeID, so a peer cannot present a key it does not hold.
- A relay only forwards bytes. The relay, when one is used, never sees plaintext. See Relays and address lookup for what runs by default.
Relays and address lookup
Ant runs iroh with its standard production preset: n0's public relays and DNS-based (Pkarr) address lookup — the same defaults iroh itself ships.
- Dialing. A machine is reached by NodeID. Each endpoint publishes its home
relay to n0's address-lookup service (
dns.iroh.link) and resolves peers there, so no address or port has to be exchanged. - Direct first, relay fallback. Connections try a direct QUIC path through NAT hole-punching; when that fails (strict NAT, firewall), bytes are relayed. Direct connections keep working when the relay is unreachable but the path is punchable, and the relay only ever carries ciphertext. Like any packet forwarder it can observe endpoint NodeIDs, IP addresses, and traffic timing and volume; the address-lookup service sees which NodeIDs are resolved and from where. Neither can read payloads.
- Self-hosting the relay. Point the worker (
--relay URL) and every client (relayin~/.ant/config.json) at your own iroh relay to take n0 off the data path. Address lookup still uses the default DNS service; the current binding does not expose a fully self-hosted lookup. - Diagnostics.
ant nest ping <machine>is the quickest check; a failure usually means the machine is down, its NodeID changed, or the network blocks outbound UDP/QUIC.
Restrictive networks: iroh prefers QUIC over UDP, so allow outbound UDP and DNS from the client and the machine; relay and direct dials all ride that path. No inbound port is opened by the transport.
RPC and blobs
The transport carries two things:
| Kind | Used for |
|---|---|
| RPC | ping, whoami, users.*, invites.redeem, oidc.redeem, deploy.run, build.run, compose.apply, release.rollback, route.apply, … |
| Blob streaming | Image tarballs (image.load, a docker save stream) and build contexts (build.run, a gzipped tar with .dockerignore applied) |
| Tunnel | Raw TCP bytes to a container port (ant nest tunnel), on a separate ALPN |
A request frame is capped at 2 MiB (response frames at 8 MiB; larger payloads stream as blobs). The resolved compose file travels inside one request frame, so a compose file larger than 2 MiB fails today (see Known issues).
| Limit | Value |
|---|---|
| RPC request frame | 2 MiB |
| RPC response frame | 8 MiB |
Blob payload (image.load, build.run, worker.update) | 64 GiB |
| Extracted build context | 8 GiB |
Build log tail (build.run) | 1 MiB |
| Concurrent streams being read / handled | 32 / 64 |
Tunnels
A tunnel is a raw byte pipe to a published container port on a machine,
opened on its own ALPN (ant-tunnel/1) so it never shares the framing of an
RPC. The worker resolves the requested container:port only to a loopback port
ant published for a container ant manages; a tunnel can never reach the docker
socket, Caddy's admin API, or another local listener. Tunneling needs the
deploy capability, the same trust as running a container on the machine.
Direction, usage (CLI and dashboard), limits, and troubleshooting are covered in Tunnels.
Build tags
The transport is compiled only for Linux with CGO enabled (//go:build linux && cgo); the vendored iroh library ships for amd64 and arm64. On any
other build it is stubbed out: local-first works, and ant nest ping reports
that iroh is unavailable.
CGO_ENABLED=1 go build ./... # with transport
CGO_ENABLED=0 go build ./... # local-only, transport excluded
Authorization
The transport authenticates the channel. It does not decide what a caller may do; the daemon authorizes each RPC against its roster. See Security model.