The private network
Every server Yawl manages is on one private WireGuard network. An app in one environment can use a database in another environment of the same project over it, on another server, without the database listening on a public address.
Joining
Nothing to set up. When an agent joins (yawl agent join), it makes a WireGuard key, keeps the private half on the server and sends the public half. The panel gives the server the next free address of 10.73.0.0/16, from 10.73.0.1, and every server peers with every other on interface yawl0, UDP port 51820.
- The firewall. UDP 51820 must be open between your servers. The installer opens it in
ufwwhenufwis active and says so; Yawl’s own firewall (Firewall) opens it from your other servers by itself; a cloud firewall (Hetzner’s, for example) is yours to open. - After a reboot. The installer sets
net.ipv4.ip_nonlocal_bind = 1(in/etc/sysctl.d/90-yawl.conf), so a database listening on the private address starts at boot before the network is up. - A server joined before the private network has no key. The Servers page says
rejoin to use the private network; runyawl agent joinon it again. - The panel’s own channel to its agents does not use the private network. A broken mesh never cuts the way to repair it.
Watching it
The Servers page shows each server’s private address and, under it, each peer with its last handshake (fsn1: handshake 12 s ago). When a server’s agent cannot set the network up, the page says why, for example the private network is not up: the private network needs Linux with WireGuard.
When two online servers have not shaken hands for 5 minutes, one Telegram message says so:
fsn1 cannot reach hel1 on the private network (no handshake for 6 min). Open UDP 51820 between them.
and another when they reach each other again. A server that is offline gets its own offline message instead.
Using a database from another environment
Reference it with its environment’s name before it:
yawl env set api DATABASE_URL --ref production/acme-db.url
The same works in a service’s Environment tab. Only databases of the same project can be named, and both servers must be on the private network: a server joined before it is refused with fsn1 is not on the private network; rejoin it (yawl agent join) to use it.
-
On another server. The database listens on its server’s private address only (
10.73.x.y, a port from15432), over TLS, and accepts the private network only. Its agent seals the URL to the agent of each server whose apps use it; the panel never sees it. The first reference from a server makes the database share its address there:api uses acme-db in production over the private network. acme-db shares its address with fsn1 (it restarts once to listen on the private network).Deploy the app once the database’s deploy is live. Until then the app’s deploy says
acme-db has not shared its address with fsn1 yet; deploy acme-db first. -
On the same server. The app’s container (and its release command and cron runs) also joins the database’s environment network. Its URL names the database’s container (
yawl-acme-production-acme-db), never the short name, since its own environment may have anacme-dbtoo. The database shares that URL the same way, without a restart: deploy the app once the database’s deploy is live.
Moves
- Moving the environment that holds a referenced database ends by redeploying, without a build, every app elsewhere that uses it, so its URL follows the database. The move’s plan names them:
redeploy staging/api, which uses acme-db over the private network. - Moving an app that uses a database on another server waits, before it starts the app on the new server, until that database has shared its address there. If the database cannot (its deploy fails), the move stops with that cause; retry it once fixed.
- Rejoining a server drops the addresses databases shared with it (they were sealed to its old key); its apps’ next deploy says to deploy the database first, which shares them again.