nf1 addresses: one service of your machine, for whoever holds the address

An address is permission to use a service on another machine. An nf1 address opens one service of your machine (a port on it) to whoever holds the address. The other side needs the nfltr command and nothing else: no account, no login, no open port on either machine. The session is end to end encrypted: the relay that introduces the two machines sees neither the address's secret nor the bytes, and the two take a direct path when their networks allow it.

a$ nfltr cat serve web --forward 127.0.0.1:8080 --address --address-file web.addr
Address of you/web written to web.addr (mode 0600; anyone who has it can open the service; keep it secret)
b$ nfltr cat forward --address-file web.addr --listen 127.0.0.1:8080
connect forward: listening -> nf1:14efa3ee@nfltr.xyz on 127.0.0.1:8080

Machine A serves its port 8080 under an address and writes the address to a file only its owner can read. Machine B, given that file, opens its own port 8080, and whatever connects there reaches A's service. The rest of this post is six services that work this way, each run end to end, how many clients one address serves and what happens when a path or a relay goes away, and what to keep safe.

What an nf1 address is

The address is a short line of text starting with nf1. It names the relay, a rendezvous id the relay knows the service by, the key the serving machine proves itself with, and a secret. Whoever holds it can do three things: ask the relay for the service, check that the machine answering is the one that minted the address (its key is pinned in the address), and prove to that machine that they hold the secret. The relay never receives the secret: the proof goes inside the encrypted session, which ends on the two machines.

So an address is a password for one service. It is never printed and never accepted on a command line, where other users of a machine could read it: it lives in a file of mode 0600 (--address-file), and nfltr cat forward refuses a file others can read. Serving the same service again brings back the same address; serving it with --new-address mints a new one, and the old one stops working at once wherever no copy of the serving machine's address file still runs it (Keeping it safe).

The serving machine is enrolled in an nfltr account (nfltr config login). The holder's machine is not: the address is all it needs.

Each example below ran on one Mac against a private relay built from the same source as nfltr.xyz's, with two separate nfltr configurations: A enrolled, B with none. B's address files were copies of A's, mode 0600.

A Claude Code session from another computer's browser

A Claude Code session in tmux on machine A, a terminal web server (ttyd) in front of it on A's loopback interface only, and that one port served under an address:

a$ tmux new -s claude claude
a$ ttyd -W -i 127.0.0.1 -p 7681 -c you:a-long-passphrase tmux attach -t claude
a$ nfltr cat serve claude --forward 127.0.0.1:7681 --address --address-file claude.addr
Address of you/claude written to claude.addr (mode 0600; anyone who has it can open the service; keep it secret)

-i 127.0.0.1 keeps ttyd off the network: only nfltr on the same machine reaches it. -W lets the browser type, and -c sets a user name and password ttyd asks for. On machine B, with claude.addr copied over a channel you trust:

b$ chmod 600 claude.addr
b$ nfltr cat forward --address-file claude.addr --listen 127.0.0.1:7681
connect forward: listening -> nf1:27ad86d5@nfltr.xyz on 127.0.0.1:7681

http://127.0.0.1:7681 in B's browser asks for ttyd's password and then shows the session. It is the same tmux session: tmux attach -t claude on A shows what B types, and closing the browser leaves Claude Code running.

The address carries ttyd's bytes untouched, so ttyd's own password is a second lock: someone holding the address and not the password gets ttyd's 401 and nothing else. Two caveats come with -c: ttyd's password sits on ttyd's command line, which other users of machine A can read, and it travels as HTTP Basic Auth, which is fine here because the whole session is encrypted between A and B.

Evidence: the terminal through an address

Setup
ttyd 1.7.7 serving a tmux session on A's 127.0.0.1:7681 with -W -c, served under an address; B forwarding it to 127.0.0.1:17681. The tmux session ran a shell rather than Claude Code itself (no model calls); ttyd carries the terminal's bytes the same way whatever runs in it. A Playwright test in TypeScript drove Chromium on B's side.
Numbers
3 of 3 checks passed: without credentials the forwarded port answered 401; with a wrong password, 401; with the right one the terminal loaded, its websocket opened and stayed open, and a command typed in the browser (echo <marker> \| tr a-z A-Z) ran in A's tmux pane, its upper-cased output read back from the pane. Then --new-address: the next connection through B's old forward failed ([not_found] no nf1 service at this address) and a forward of the new address answered 200.
Reproduce
the commands above on two machines, or on one with a second nfltr configuration for B (NFLTR_CONFIG pointing at an empty file).
Limits
one machine, so the session took the relayed path (still end to end encrypted), not a direct one; no Claude Code run inside the terminal; one browser.

nfltr http 7681 would also put ttyd in a browser, under a share link: a URL anyone can open with no nfltr at all. A share link's TLS ends at the relay, which then carries the request to your machine; the relay can read that traffic. That is fine for a web app you are happy for the relay to carry: a demo, a preview of a site, a dashboard with nothing secret in it. It is not fine for a shell. A terminal is your keyboard on that machine: whoever reads it sees what you type, and whoever can write to it runs commands as you. With an address the encryption ends on the two machines, and the relay carries bytes it cannot read.

The other side of the same fact: whoever holds the address can open the terminal, so with ttyd's password it is the key to a shell on machine A. Keep the file as you would keep that password, and when in doubt serve again with --new-address.

A remote desktop

Screen sharing is one TCP port: 5900 for VNC (macOS Screen Sharing is a VNC server), 3389 for Windows Remote Desktop. On the machine whose screen you want:

a$ nfltr cat serve desktop --forward 127.0.0.1:5900 --address --address-file desktop.addr
b$ nfltr cat forward --address-file desktop.addr --listen 127.0.0.1:15900

On a Mac B, open vnc://127.0.0.1:15900 opens Screen Sharing on it (a local port other than 5900 avoids the Mac's own screen sharing port); any VNC viewer works the same way. For Windows Remote Desktop, the serving side forwards 127.0.0.1:3389 instead, and the client connects to 127.0.0.1:13389.

On macOS, Screen Sharing is turned on in System Settings, General, Sharing. It still asks for the Mac's user name and password, and VNC's own password where one is set: the address only gets the viewer to the login.

Evidence: a VNC desktop through an address

Setup
a Linux desktop in a container (Xvfb, an xterm, x11vnc with a password) published on A's 127.0.0.1:5900, served under an address; B forwarding it to 127.0.0.1:15900; a scripted VNC client on B.
Numbers
with the right password the client completed the VNC handshake and saved a full 1024 x 640 frame showing A's xterm; with a wrong one the server refused it ("password check failed").
Reproduce
the commands above, with any VNC server on A and any VNC viewer on B.
Limits
macOS Screen Sharing and Windows Remote Desktop were not run: neither a second Mac with Screen Sharing on nor a Windows machine was available to this test. Both are TCP services on one port, as the VNC server here was.

A database for a colleague

A Postgres on A, for a colleague's psql on B:

a$ nfltr cat serve db --forward 127.0.0.1:5432 --agent db-box --address --address-file db.addr
b$ nfltr cat forward --address-file db.addr --listen 127.0.0.1:15432
b$ psql -h 127.0.0.1 -p 15432 -U postgres -c "select 'hello from machine A' as greeting;"
       greeting
----------------------
 hello from machine A
(1 row)

Postgres in a container works the same way. Publishing its port on the machine's loopback only keeps it off the network, and nfltr on the same machine reaches it there:

a$ docker run -d --name db --env-file pg.env -p 127.0.0.1:5432:5432 postgres:17
a$ nfltr cat serve db --forward 127.0.0.1:5432 --agent db-box --address --address-file db.addr

-p 127.0.0.1:5432:5432 binds the published port to 127.0.0.1, not to every interface, and pg.env (one line, POSTGRES_PASSWORD=..., mode 0600) keeps the password off the command line. The colleague's side is the same nfltr cat forward and psql as above, with that password.

--agent db-box gives this service its own agent name: one name serves one nfltr cat serve process at a time, so a machine that already serves a terminal under its default name serves the database under another (or runs both from one process, nfltr up -c FILE). Check that the database asks for a password from its own machine: every address holder's connection reaches it from 127.0.0.1, where nfltr cat serve connects, and many Postgres setups (the official container image among them) trust connections from 127.0.0.1 without one. A pg_hba.conf line host all all 127.0.0.1/32 scram-sha-256 makes it ask.

A model server's API

A model server on a machine with a GPU, used from a laptop: the server listens on the GPU machine's loopback, and the laptop sees it on its own.

gpu$ nfltr cat serve llm --forward 127.0.0.1:11434 --agent gpu-box --address --address-file llm.addr
laptop$ nfltr cat forward --address-file llm.addr --listen 127.0.0.1:11434
laptop$ curl -s http://127.0.0.1:11434/api/generate -d '{"model":"smollm:135m","prompt":"Say hello in five words.","stream":false}'

Tools on the laptop that expect the model server on its usual local port find it there. The server has no password of its own here, so the address is the only lock: anyone holding it can run the model.

A camera's stream

An IP camera or a media server speaks RTSP on port 554 or 8554. Served from a machine on the camera's network:

a$ nfltr cat serve camera --forward 192.168.1.50:554 --agent camera-box --address --address-file camera.addr
b$ nfltr cat forward --address-file camera.addr --listen 127.0.0.1:18554
b$ ffplay -rtsp_transport tcp rtsp://127.0.0.1:18554/stream

An address carries RTSP's TCP connection, and the player has to ask for the video over that connection too: -rtsp_transport tcp for ffmpeg's tools, "Use RTP over RTSP (TCP)" in VLC's preferences. Many players try UDP first and fall back to TCP when it fails.

A game server for friends

Many game servers speak UDP. An address carries UDP too, with --udp on both sides:

a$ nfltr cat serve game --udp --forward 127.0.0.1:27015 --agent game-box --address --address-file game.addr
b$ nfltr cat forward --udp --address-file game.addr --listen udp:127.0.0.1:27015

The friend's game then joins the server at 127.0.0.1:27015. A game server that uses TCP (many do) is served as the other examples here are, without --udp.

How an address carries UDP:

  • One flow per source. One nfltr cat forward --udp opens one encrypted session and carries every local sender inside it; each source ip:port at the listener is a flow, with its own socket on the serving machine, and replies go back to that source. A flow ends after 60 s with no datagram either way (--udp-idle).
  • Order and loss. Over the relay, datagrams travel inside the session's reliable stream: none is lost on the way and they arrive in order, so a lost packet on the way delays the ones behind it. On a direct path they travel as QUIC datagrams and behave like UDP: they can be lost or reordered, and never wait behind a lost one. None is delivered twice on either path.
  • Size. A datagram can be up to 65535 bytes (--max-datagram sets a lower limit); a larger one is dropped and counted, as any UDP loss would be.
  • Bounds. At most 256 flows per session (--udp-max-flows) and 1024 per service across all its sessions; a new source past either is dropped and counted, and its next datagram tries again.
  • One port per service. Ports a protocol negotiates inside its payload (SIP with RTP, FTP-style data ports) are not carried unless each is served as a service of its own; multicast and broadcast are not carried.

Evidence: a database, a model server, a camera stream and a UDP server

Setup
on A: Postgres 17 in a container on 127.0.0.1:5432; a model server (Ollama 0.21.0) on 127.0.0.1:21434 with a 135M-parameter model; an RTSP server in a container fed a 640 x 360 H.264 test pattern by ffmpeg; a UDP echo server on 127.0.0.1:27015 standing in for a game server. Each served under its own address and agent name; B forwarding each to a local port.
Numbers
psql through the address printed the server's version and the greeting row; through the model server's address, /api/version answered 0.21.0, a model pull through the API succeeded and a generation returned 20 tokens; ffprobe through the camera's address read one H.264 stream, 640 x 360, and ffmpeg saved a frame (with and without -rtsp_transport tcp); 3 of 3 datagrams sent to B's UDP port came back from the server on A.
Reproduce
the commands above, with each server listening where its --forward points.
Limits
one machine and the relayed path; no throughput or latency measured; the camera was a test pattern, not a camera, and the game server an echo server.

Many clients at once

One address serves many sessions at once, each connection to the friend's local port its own session. In lab runs on 2026-11-22 against a relay with its session caps lifted, 100 HTTP clients at once through one nfltr cat forward each got their own answer, 20 psql sessions at once to a Postgres in a container all answered, and 10 nfltr cat forward --udp clients each got all 100 of their datagrams answered. With 10 sessions held open, one client killed outright left the other 9 untouched: each finished with every byte back, in order. Afterwards the serving process was back to the goroutines and descriptors it had before.

The relay caps how many sessions one network opens at once and holds, and how many one address holds across all its holders; a connection past a cap is closed at once (nfltr cat pipe exits 4, refused), never left hanging, and a later one gets in once fewer are open. Give a Friend an Address gives nfltr.xyz's caps.

Direct or relayed, and what happens when a path goes

The two machines try a direct path between them and take it when their networks allow it; otherwise the relay carries the session, still end to end encrypted. In a lab of routers on 2026-11-22, both machines on public addresses, and both behind NATs that keep one port for every destination, went direct; a NAT that maps a new port for each destination, or a firewall that drops UDP, stayed relayed from the start, with every byte intact and no wait on a failed hole punch.

  • The direct path drops. With the direct path cut at one router in the middle of a 64 MiB session, the session moved to the relay about 4 s later and finished with every byte, exit 0.
  • The relay restarts under a direct session. Nothing changes: the bytes go between the two machines, not through the relay.
  • A relay replica goes away. When the relay is several replicas and the one a client's sessions go through is drained (a rolling deploy), it waits for its sessions to end, and both relayed and direct sessions finish. When it crashes, a relayed session through it ends with exit 6 and a prefix of what was sent (no wrong or repeated byte), a direct session stays direct and gets every byte, and new sessions open through the other replica at once.
  • The serving side stops. Stopping nfltr cat serve cuts a held direct session in under 0.1 s; a serving process killed outright is seen by the other end within the direct path's liveness bound, about 34 s.

The relay adds little to a round trip. Between two cloud machines in one zone (nfltr v2.1.79, 2026-11-22), a 1-byte request and its 1-byte answer through an address took 0.54 ms at the median relayed and 0.46 ms direct with the machines idle, and the relay added under 0.1 ms at the median while a relayed 10 GiB transfer ran beside it.

One transfer, one address

The examples above are services that stay up. For one transfer, a file or a folder or a stream, the address belongs to the transfer instead: nfltr-send sends a file or a folder to whoever holds an address, and nfltr-pipe joins two machines' standard input and output over one. And SSH to a machine behind NAT serves sshd under an address, with nfltr cat pipe as ssh's proxy, for ssh and rsync.

Keeping it safe

  • The file is the key. Whoever holds the address reaches the service, from anywhere, with no account. The address is never printed and never on a command line; it lives in a file of mode 0600 on both machines. It goes from one machine to the other over a channel you trust: a password manager's share, an encrypted message.
  • There is no per-person access. Everyone you gave the address to holds the same key, and any of them can pass it on. The service's own login (ttyd's password, the database's user, the Mac's login) is what tells people apart.
  • The service sees every holder as its own machine. Sessions arrive from the serving machine itself (127.0.0.1), so a service that trusts local connections without a login trusts everyone holding the address: give it a login of its own.
  • Revoking is serving again. Stopping nfltr cat serve makes the address reach nothing. Serving with --new-address ends the old address for everyone at once, and the file then holds the new one, for whoever should still have it. The old address keeps working only where a copy of the serving machine's old address file still runs: a copy served from another machine is a second server of that address, and serves it again whenever it restarts. Delete every copy of the old file; once none runs, the old address reaches nothing, and no one without the file, address holders included, can serve it.
  • What the relay sees. That a session to the service happens, when, and how many bytes cross it; the rendezvous id, not the secret. It cannot read the session or pose as your machine: the client checks the key pinned in the address. Like any carrier, it can refuse to carry a session.
  • A holder cannot take the address over. The relay accepts a machine's claim to serve an address only with proof that it holds the address's server key, so someone given the address cannot stop it being served by claiming it themselves.
  • Direct or relayed. The two machines take a direct path between them when their networks allow it; otherwise the relay carries the session, still end to end encrypted (Direct or relayed).

Is it for you?

Fits if you want to hand one service of a machine (a terminal, a desktop, a database, an API, a stream, a game server) to someone, or to your own other computer, without an account on their side and without the relay able to read it.

Not ready for access that differs per person: an address is one key for everyone who holds it, and revoking it revokes it for all. Nor for a browser with nothing else installed: the holder runs nfltr cat forward. A share link is the way to reach a web app from a bare browser, with the relay able to read it.

Try next: Give a Friend an Address, the tutorial behind the first example of this post, step by step; then SSH to a machine behind NAT and Send a folder and pipe a stream.

← All posts