Skip to main content
DNZ and a DNZ Proxy node can start together from one docker-compose.yml, with the node joined from the first start:
  • DNZ_PROXY_CONNECT_KEY sets the connect key, which DNZ otherwise makes up on first use. The same value goes into the node’s DNZ_PROXY_KEY.
  • DNZ’s environment declares the proxy (DNZ_PROXY_SEED_KIND=dnz-proxy). DNZ keeps Let nodes join without approval on for it, so a node with the key that names the proxy joins at once.
  • DNZ_ZONES makes the zone at the first start.
The same file is in the repository as deploy/dnz-proxy-stack/docker-compose.yml.

The file

Replace the values marked CHANGE. Make the connect key with:
and put the same value in both places.
docker-compose.yml
Then point the LAN’s devices (or the router’s DHCP) at this host for DNS. See Pointing clients at DNZ.

What happens at start

1

DNZ sets itself up

DNZ creates the admin, makes home.example.com, stores the connect key and adds the DNZ Proxy proxy edge, approved, with Let nodes join without approval on.
2

The node joins

The node waits until DNZ is healthy, then joins edge with the connect key and gets a token of its own. It shows up on the proxy’s Nodes tab as node-1, healthy.
More nodes on other servers join the same way: the same key, DNZ_PROXY_PROXY: edge, and DNZ’s address as they reach it in DNZ_URL. DNS answers edge’s names with every healthy node’s address.

Adding routes

Routes are made in DNZ. Each one makes the service, the router and the DNS record at once.
Open Proxy → edge → Add route, give the hostname and the upstream (http://whoami:80).
The node has the route within a second.

Certificates

DNZ gets the certificates for a DNZ Proxy itself and hands them to its nodes: set up an ACME account and a certificate resolver under Proxy → Certificates, then add routes without --http. For names that aren’t reachable from the internet, use DNS-01: through DNZ’s own zone when DNZ is the domain’s public nameserver, or a Cloudflare token. See Certificates.

The settings

DNZ_PROXY_SEED_NAME, DNZ_PROXY_SEED_IPV4 / IPV6 and the entry point settings are the same as for Traefik. The proxy’s addresses are answered only while it has no node. In the dashboard, Let nodes join without approval on the proxy’s Settings tab is greyed out, and Replace connect key under Settings → Proxy is not offered.