Run Your Own Relay (Beta)

Beta. By default your machines meet on nfltr.xyz. You can instead run the relay on a VM or machine of your own and join your machines to it, so the path between them stays on your network. It is the same nfltr binary: nfltr relay serve. You bring the TLS certificate (or let the relay make a self-signed one); each machine enrols with a single-use code and holds a certificate of the relay's own machine CA. This tutorial goes from an empty Linux VM to your machines connected through it. Everything else on this site describes nfltr.xyz.


nfltr.xyz or your own relay

The relay carries traffic between your machines' agents and clients. Machines connect out to the relay, so only the relay needs an open port.

nfltr.xyzYour own relay (beta)
Who runs itWe do: updates, certificates, uptime.You do: a VM, its firewall, its certificate, upgrades and backups.
Where traffic goesThrough nfltr.xyz.Through your relay. Your machines need to reach it; nothing else does.
Accounts and machinesYour account; each machine enrols with its own certificate.The first start makes machine admin's enrolment code; each machine you add enrols with a code of its own, in admin's account or as an account of its own (section 4).
DashboardYes, with Google sign-in.No. Everything below works from the CLI.
SSH and TCP tunnelsYes.Yes.
Share linksYes, on nfltr.xyz.Yes, on a domain of yours, with a wildcard certificate (section 7).
AvailabilityOur service.One process on one machine: no failover. Agents reconnect by themselves after a restart.
SoftwareThe same closed-source nfltr binary.

Use your own relay when the requirement is that traffic between your machines does not leave your network, and the features in the next table are the ones you need. If you need the dashboard, use nfltr.xyz.

What works on your own relay

Checked on 2026-10-03 with four Linux containers on one Docker network, each standing in for a machine: a relay with a self-signed certificate (pinned by the others), two machines, and a second relay with a certificate from a private CA (no pin). Every command below ran with no relay flags, only the relay saved at enrolment.

UseResultWhat was checked
nfltr statusWorksAnswers from your relay.
A certificate from your CAWorksEnrolled without a pin; messages across it.
A share link from nfltr up, with a passwordWorks, with --share-domainChecked on 2026-11-01 with a test CA's wildcard certificate: the link on the relay's share domain answered 401 without the password and the page with it, and its TLS ended on the sharing machine, with the wildcard certificate given to it. Without --share-domain the relay refuses share links with a reason.
nfltr serve / forward, nfltr serve ssh --ssh with nfltr sshWorksChecked on 2026-10-26 with a relay, agents and clients on one machine, each with only the relay saved at enrolment: bytes through a forwarded service, and ssh through the embedded SSH server ran a command.
A second account (a machine enrolled without --account)WorksA client of that account reached its agent; neither account reached the other's agents. A machine added or revoked while the relay runs takes effect without a restart.
nfltr up with tcp services and connect:, nfltr pipeWorksChecked on 2026-11-01: bytes through a connect: mapping to a tcp service, and nfltr pipe to an end-to-end encrypted one.
Backup and restore, upgradeWorksChecked on 2026-11-01: the data directory copied with the relay stopped, deleted, restored: the same machines and share link. The previous release's data directory read by the new relay: its share link.
Health check and metricsWorksChecked on 2026-11-01: GET /healthz on the HTTPS port; Prometheus metrics on the loopback port named with --metrics-port (section 1).
Certificate files replacedWorksChecked on 2026-11-01: new files written over --tls-cert and --tls-key were served within seconds, with no restart; clients kept working unchanged.

1. Prepare a Linux VM

Any small Linux VM or machine that your other machines can reach, amd64 or arm64. Install the CLI with the relay (--with relay adds nfltr-relay, which nfltr relay serve runs), copy both where every user can run them, and give the relay its own user and data directory:

$ curl -fsSL https://nfltr.xyz/install.sh | sh -s -- --with relay
$ sudo install -m 755 ~/.local/bin/nfltr ~/.local/bin/nfltr-relay /usr/local/bin/
$ sudo useradd --system --create-home --home-dir /var/lib/nfltr-relay nfltr-relay
$ sudo chmod 00700 /var/lib/nfltr-relay

The relay listens on two TCP ports: 8443 (gRPC: agents and clients) and 8444 (HTTPS: API, artifacts). Open them to your machines only, for example with ufw:

$ sudo ufw allow from 10.0.0.0/8 to any port 8443,8444 proto tcp

Nothing else needs to be reachable: the internal API and the Prometheus metrics (/metrics) listen on 127.0.0.1, on ports the relay picks at each start and writes to <data-dir>/ports.json. To scrape the metrics at a fixed port, name it: --metrics-port 9464 (still on 127.0.0.1). For a health check, GET /healthz on the HTTPS port answers 200 while the relay serves. --grpc-port and --http-port change the two public ports; --listen binds one address instead of all.

2. Choose the TLS certificate

The relay does not listen on the network without TLS. Pick one:

3. Start the relay

Start it once in the foreground as the relay user to create the first machine's enrolment code and see the banner. With your certificate:

$ sudo -u nfltr-relay nfltr relay serve --data-dir /var/lib/nfltr-relay \
    --tls-cert /etc/nfltr-relay/fullchain.pem --tls-key /etc/nfltr-relay/privkey.pem

Or self-signed:

$ sudo -u nfltr-relay nfltr relay serve --data-dir /var/lib/nfltr-relay --tls-self-signed --tls-name relay.lan,192.168.1.10
nfltr-relay (beta): gRPC 0.0.0.0:8443, HTTPS 0.0.0.0:8444, data /var/lib/nfltr-relay
Enrolment code of the first machine (admin): /var/lib/nfltr-relay/admin-enrol-code (created now, single use, valid 24 h; it is not printed); nfltr-relay machines code --data-dir /var/lib/nfltr-relay --code-file /var/lib/nfltr-relay/admin-enrol-code prints it as the relay code that machine's nfltr join takes
Another machine: nfltr-relay machines code --data-dir /var/lib/nfltr-relay --name <machine> --account admin (one code per machine, one account; admitted without a restart), or nfltr machines add on the admin machine
TLS certificate SHA-256: 3f1c…9a07
On each machine: nfltr join, and paste its code (it carries this relay's address, URL and certificate pin)

Secure defaults, with no flags to turn them off: every client presents a certificate of the relay's machine CA; the relay always serves TLS (on loopback with neither flag it makes a self-signed certificate); a data directory other users can read is refused. Stop it with Ctrl+C and run it as a service:

# /etc/systemd/system/nfltr-relay.service
[Unit]
Description=nfltr relay (beta)
After=network-online.target

[Service]
User=nfltr-relay
ExecStart=/usr/local/bin/nfltr relay serve --data-dir /var/lib/nfltr-relay --tls-cert /etc/nfltr-relay/fullchain.pem --tls-key /etc/nfltr-relay/privkey.pem
Restart=on-failure

[Install]
WantedBy=multi-user.target
$ sudo systemctl enable --now nfltr-relay
$ journalctl -u nfltr-relay | grep 'TLS certificate SHA-256'

For the self-signed form, use the --tls-self-signed --tls-name … flags in ExecStart instead of the certificate files. Ports below 1024 need extra capabilities; keep the defaults.

The relay limits each agent to 1000 requests per second, with bursts up to twice that. The start-up log prints the limit, and a request over it is answered 429 with a body naming --agent-rate-limit. Change it with --agent-rate-limit N, or turn it off with --agent-rate-limit 0 (which also turns off the per-visitor limit on share links) when every machine on the relay is yours. The number of connected agents is not limited unless you set --max-agents N; an agent above it stops with an error naming the limit.

4. Machines and accounts

The relay authenticates every machine by a certificate of its own machine CA (<data-dir>/machine-ca/, its key 0600). A machine enrols once with a single-use code: it makes its key itself (never sent), the relay signs its certificate, and the certificate lasts 24 hours and renews itself. The first start wrote machine admin's code to /var/lib/nfltr-relay/admin-enrol-code (mode 0600, single use, valid 24 hours); it is never printed, logged or put on a command line. Enrol the first machine with it (section 5).

nfltr relay machines code prints each code as one relay code: the single-use code with the relay's gRPC address, HTTPS URL and, for a self-signed certificate, its pin (from --tls-name, or a --listen address, and the bound ports; --relay host:port --proxy-url https://host:port set the address a machine reaches when it is another, such as behind a port forward). For the first machine, --code-file /var/lib/nfltr-relay/admin-enrol-code prints the first start's code that way. Each other machine gets a code of its own, printed once (one hour; --ttl changes it; --json prints the bare code for scripts):

$ sudo -u nfltr-relay nfltr relay machines code --data-dir /var/lib/nfltr-relay --name laptop --account admin

With --account, naming a machine of an account (its id, or a name only one machine holds), the new machine joins that account: machines of one account reach each other by <machine>/<service> (nfltr pipe laptop/chat to nfltr serve chat on laptop). Files and commands (--recv, --exec) need an organisation's end-to-end encrypted sessions (section 6). Without --account the machine is an account of its own (a person or a group of machines whose agents the others must not reach); a machine of another account never reaches it. A running relay admits the new machine without a restart. nfltr relay machines list --data-dir … lists the machines; nfltr relay machines revoke --data-dir … <machine id> removes one, and the relay refuses it from then on: its connections end at once, and so do the sessions open on them. A client's open session ends with reason ERROR_REASON_UNAUTHENTICATED, and nfltr pipe exits 2 (auth). A revoked machine's name is free again at once.

5. Point each machine at the relay

On every machine, nfltr join reads its relay code at a prompt (or --code-file FILE|-), saves the relay and the pin it carries, and enrols the machine:

$ nfltr join --code-file - < admin.relaycode
Relay relay.lan:8443 saved (/home/you/.config/nfltr/nfltr.json)
This machine is enrolled at relay relay.lan:8443.
$ rm admin.relaycode
$ nfltr status

The admin machine by signing in, with no code. Start the relay with your IdP: --sign-in <issuer URL> --client-id <id> --admin-email <address> (all three; register <id> at the IdP as a public client with a loopback redirect). nfltr relay machines link --data-dir /var/lib/nfltr-relay then prints the relay's sign-in link: its address, URL, pin, IdP and client id, all public. On the admin machine, nfltr join <link> makes the machine's key, opens the IdP's sign-in in the browser and sends the ID token with a request for that key; the relay takes it only from <address> (verified), for <id>, unexpired, and with its nonce naming that key, and then spends the first start's code for it. It works once: a second sign-in, or the same token again, is refused (403); an IdP the relay cannot reach answers 503 and spends nothing. After the first start's 24 hours, mint the admin a code instead (machines code --name admin). The sign-in admits a relay machine only: the organisation's root still decides who is a member.

The machine enrolled with the first start's code is the relay's admin machine: there, nfltr machines add and nfltr people invite mint the next machines' codes over the relay's API (one hour, single use, in the admin's account; any other machine is refused with 403). Provisioning scripts can keep nfltr login --relay <host:port> --proxy-url <url> [--cert-sha256 <fp>] --code-file -, which takes a bare code or a relay code.

Copy each code to its machine the way you copy any secret (scp, your secrets manager) and keep it out of shell history and chat; a code works once. Leave out --cert-sha256 for a certificate your machines trust. From now on every nfltr command on that machine uses your relay, unless NFLTR_SERVER or NFLTR_PROXY_URL in the environment names another one. NFLTR_RELAY_CERT_SHA256 overrides the saved pin. nfltr login --relay hosted goes back to nfltr.xyz. A config directory (NFLTR_CONFIG) is one machine: a second identity on the same host is a second directory with its own code. A machine that already holds a certificate that has not expired (for nfltr.xyz or another relay) is not enrolled over: nfltr join says so and changes nothing. To enrol it here anyway, nfltr login --relay <host:port> --proxy-url <url> [--cert-sha256 <fp>] --code-file - --replace, then revoke the old machine where it was enrolled.

6. Messages and files between your machines

Files, messages and commands between your machines go through nfltr cp and nfltr pipe across your relay as in Send files and messages: cp to a serve --recv service, pipe to a serve service. They are end-to-end encrypted organisation sessions (Organisations), so both machines are enrolled, and your relay carries only ciphertext.

7. Share links on your domain

nfltr up gives an http service a link that a browser opens, with a password if you set one (Share a local app). On your own relay the links are names under a domain of yours:

  1. Choose the domain, for example share.example.com, and point a wildcard DNS record, *.share.example.com, at the relay.
  2. Get a wildcard certificate for *.share.example.com that your visitors' browsers trust: from your company CA, or a public CA for a public domain. Let's Encrypt cannot issue one for a private domain.
  3. Start the relay with --share-domain share.example.com (add it to ExecStart). That one flag is the relay's domain: share links <code>.share.example.com, each agent at <agent>.share.example.com for requests from its account's machines, and, with TLS, end-to-end encrypted links on the gRPC port. TCP tunnels need no flag.
  4. Give the wildcard certificate and key to each machine that shares, in its nfltr up file (e2ee_cert, e2ee_key) or as NFLTR_E2EE_CERT and NFLTR_E2EE_KEY in its environment.
services:
  web: { http: 8080, share_auth: "friend:${FRIEND_PASS}", e2ee_cert: /etc/nfltr/share.pem, e2ee_key: /etc/nfltr/share.key }
$ FRIEND_PASS=… nfltr up -c nfltr.yaml

The link is end to end encrypted: TLS ends on the sharing machine with that certificate, and the relay forwards the encrypted bytes on its gRPC port. The link therefore names that port unless it is 443, for example https://k3x9….share.example.com:8443/, and your visitors need to reach it. A machine that shares without the certificate gets a link whose TLS the relay ends with its own certificate, on its HTTPS port (--http-port), so the relay can read that link's traffic.

What your relay stores

On disk, under the data directory: the machine CA, the machines file and shares.db (share codes and the messages not yet received). Which agents are connected is kept in memory only.

What leaves your network

With your own relay, nfltr contacts nothing but your relay on its own: not nfltr.xyz, and no other service of ours or anyone else's. Checked on 2026-10-03 with the same containers as the table above, on a Docker network with no route out. Their only DNS server and gateway was a logger that recorded every name looked up and every connection attempt, while every row of that table ran:

What still goes out, and only because you set it up:

Restart, upgrade, back up

Not supported in the beta

Troubleshooting

The CLI printsCause and fix
relaytrust: certificate 623f…c7c9 is not the pinned relay certificate and does not verify: x509: certificate signed by unknown authorityThe saved pin (or NFLTR_RELAY_CERT_SHA256) is not the relay's certificate, e.g. after tls/ was recreated. Save the new pin with the fingerprint from the relay's log: nfltr login --relay <host:port> --proxy-url <url> --cert-sha256 <fingerprint>.
tls: failed to verify certificate: x509: certificate signed by unknown authorityA self-signed relay and no pin on this machine: enrol with a relay code (nfltr join), which carries the pin, or save it with nfltr login --relay … --cert-sha256. With your own CA, install the CA in the machine's trust store.
--cert-sha256: certificate fingerprint "…": want the 64 hex digits of a SHA-256The fingerprint was cut or mistyped. Copy the whole line from the relay's log.
no machine certificate for relay relay.lan:8443This machine has not enrolled: run nfltr join with its relay code.
HTTP 401 from the relayThe certificate is not this relay's machine CA's, or the machine was revoked: enrol it again with a new code.
dial tcp 192.168.1.10:8443: connect: connection refusedThe relay is not running or the firewall blocks the port: check systemctl status nfltr-relay and the ufw rule.
--listen 0.0.0.0: give --tls-cert and --tls-key, or --tls-self-signed (whose fingerprint clients pin)Started on a network address without a certificate. Add one of the TLS forms from step 2.
data dir /var/lib/nfltr-relay is open to other users (mode 755): chmod 700 /var/lib/nfltr-relayRun the chmod it names.

Related: Send files and messages · Share a local app · Organisations.