Source is closed as of 2026-10-16. The relay remains self-hostable in principle, but neither the binary nor the source that builds it is published — there is nothing to download and nothing to clone yet. The configuration reference below is retained because it documents the relay’s surface; treat it as the guide-in-waiting it is, and see Install for what is actually available today.
Self-Hosting Relay
Run your own Tallow relay server for complete infrastructure control. The relay is lightweight and designed to be self-hosted. Its data model is in-memory and ephemeral, not stateless: rooms, peer membership, rate-limit counters and the memory budget all live in the process and die with it — nothing about a transfer is written to disk — but the relay does keep runtime state while it runs, which is what max_rooms, room_timeout_secs and rate_limit below are sizing and bounding. A restart drops every room; there is no state to migrate or back up.
Build from Source
Not available as of 2026-10-16. The source is closed and no relay binary is published for download, so there is nothing to build from and nothing to run — a build command with no source is not a recipe, it is decoration. When publication resumes, this section returns with the recipe it carried before.
Configuration
Create a relay.toml configuration file:
# Networkbind_addr = "0.0.0.0:4433" # QUIC (CLI clients)ws_bind_addr = "0.0.0.0:4434" # WebSocket (browser clients; front with TLS, e.g. Caddy)wt_bind_addr = "0.0.0.0:4435" # WebTransport (HTTP/3; terminates TLS directly)
# Limitsmax_connections = 10000 # Connection ceiling (reconciled with the memory budget at startup)max_rooms = 5000 # Concurrent-rooms ceiling (same reconciliation)room_timeout_secs = 600 # Rooms expire after 10 minutesmax_peers_per_room = 10 # Maximum peers per room (capped at 20)rate_limit = 100 # Room joins/min per IP (clamped 1..=600) + 5 concurrent connections
# Behind a loopback reverse proxy, trust its X-Forwarded-For — this is the# RELAY's setting only: the relay reads it to key per-IP rate limits, because# behind a proxy every socket peer is loopback. Only loopback peers are ever# trusted (a non-loopback peer's header is ignored). Keep false when the relay# is exposed directly. The static site application never reads this header.trust_proxy = true
# TLS (required for QUIC + WebTransport)tls_cert = "/etc/tallow/cert.pem"tls_key = "/etc/tallow/key.pem"Key Settings
| Setting | Reference value | Description |
|---|---|---|
bind_addr |
0.0.0.0:4433 |
QUIC listener (CLI clients) |
ws_bind_addr |
0.0.0.0:4434 |
WebSocket listener (front with TLS) |
wt_bind_addr |
0.0.0.0:4435 |
WebTransport listener (HTTP/3) |
max_connections |
10000 |
Connection ceiling, reconciled with the memory budget at startup |
max_rooms |
5000 |
Concurrent-rooms ceiling |
room_timeout_secs |
600 |
Room expiry (binary default 60; minimum 10s) |
max_peers_per_room |
10 |
Maximum peers per room (capped at 20) |
rate_limit |
100 |
Room joins per minute per IP (1..=600) + 5 concurrent connections |
trust_proxy |
true |
Relay-only: trust the loopback proxy’s X-Forwarded-For for rate-limit identity (loopback peers only; the site app never reads it) |
tls_cert / tls_key |
Required | PEM identity for QUIC + WebTransport |
Abuse control: shipped vs next. The shipped binary enforces the per-IP limits above (
rate_limit, plus the connection and room caps) — keying on nothing beyond the socket. The reference relay is migrating this to a proof-of-work challenge that needs no IP keying at all; that design and its challenge spec are published at Rate Limits (Proof-of-Work), and the relay-side change is tracked in the crypto register (row A09-30 / D-20). Until it lands, the binary reads none of the proof-of-work keys — configure the limits above.
X-Forwarded-For and trust_proxy
This setting is the relay’s own, and it applies to the relay only. Two processes behind the same edge behave differently, and the split is deliberate:
- The relay reads
X-Forwarded-Forto resolve the client address it keys per-IP rate limits on. Behind a reverse proxy every socket peer the relay sees is the proxy’s loopback address, so keying on the socket peer would collapse every client into a single rate-limit bucket. - The static site application never reads it. The site’s Caddy log deletes the
client-IP fields and the
X-Forwarded-For/X-Real-Ipheaders at the encoder (deploy/caddy/<site>.caddyin this repo); nothing in the web client or the static app consumes the header.
How the relay decides which value to trust, exactly as shipped
(crates/tallow-relay/src/client_ip.rs):
trust_proxy = false→ the socket peer address is used; no header is consulted, whatever it contains.trust_proxy = trueand the direct peer is a loopback address → the rightmostX-Forwarded-Forentry is used (proxies append the address they observed, so the rightmost entry is the one your own trusted hop wrote), falling back toX-Real-IPif that entry is missing or unparseable. Left-hand entries are client-supplied and ignored.trust_proxy = truebut the peer is not loopback → the header is still ignored and the socket peer is used. A relay exposed directly to the internet therefore cannot be given a spoofed identity by a client sending its own header.
Set it to true only when every path to the relay’s listener passes through a
proxy you control on the same host (or a private network), and keep it false
whenever clients reach the listener directly. With it true and a proxy that
fails to set the header, every client resolves to loopback and shares one bucket;
with it false behind a proxy, every client shares the proxy’s bucket. A restart
also drops the resolved-address state along with the rate-limit windows and rooms
— see the note at the top of this page on why the relay is not stateless.
Run
./tallow-relay --config relay.tomlOr with environment variables:
TALLOW_RELAY_LISTEN=0.0.0.0:4433 ./tallow-relaySystemd Service
Create /etc/systemd/system/tallow-relay.service:
[Unit]Description=Tallow Relay ServerAfter=network-online.targetWants=network-online.target
[Service]Type=simpleUser=tallowGroup=tallowExecStart=/opt/tallow/tallow-relay --config /etc/tallow/relay.tomlRestart=alwaysRestartSec=5
# Security hardeningNoNewPrivileges=yesProtectSystem=strictProtectHome=yesPrivateTmp=yesReadOnlyPaths=/etc/tallow
[Install]WantedBy=multi-user.targetEnable and start:
sudo systemctl enable tallow-relaysudo systemctl start tallow-relayDocker
Not available as of 2026-10-16. The Dockerfile this section carried built the relay from a copy of the source tree — there is nothing for it to copy and nothing for it to build. When publication resumes, this section returns with the multi-stage build and the docker run invocation it used to carry.
TLS Certificates
The relay requires TLS certificates for QUIC. Use Let’s Encrypt:
sudo certbot certonly --standalone -d relay.yourdomain.comOr use a self-signed certificate for testing:
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem \ -days 365 -nodes -subj "/CN=relay.yourdomain.com"Firewall Rules
Open the required ports:
# QUIC (UDP)sudo ufw allow 4433/udp
# WebSocket (TCP)sudo ufw allow 4434/tcpPoint Clients to Your Relay
Tell clients to use your relay:
# CLItallow send --relay your-relay.example.com:4433 file.txt
# Or set in configtallow config set relay your-relay.example.com:4433Security Considerations
- The relay is zero-knowledge — it only forwards encrypted bytes, and it holds no transfer data to disk
- Enable rate limiting to prevent abuse — and set
trust_proxycorrectly (above), or the rate limiter keys on your proxy instead of your clients - Use TLS certificates from a trusted CA for production
- Consider placing behind a reverse proxy for additional protection
- Monitor logs for unusual connection patterns
- Rooms are ephemeral and automatically expire; the relay keeps runtime state (rooms, membership, rate-limit windows) in memory only, so a restart is a clean slate rather than a resumption