Skip to main content
dnz proxy covers two things: adding a route (one hostname through a proxy) and managing the nodes of DNZ’s own reverse proxy, dnz-proxy. All dnz proxy commands need a superadmin. For the concepts, see Proxy overview, Routing and dnz-proxy.

Proxy routes

dnz proxy route does what Add route on a proxy’s page does: it sets up one hostname through a proxy, with its service (upstreams), router(s) and DNS record, in one go.

Find a hostname

The first argument is the proxy, by name or id. In the output, DNS shows a name’s record types, or new when the name has no record yet.

Add a route

What happens to DNS:
  • A name with no record yet gets an A (or AAAA) record pointing at the proxy.
  • A name that already has records keeps them, now proxied.
  • With --no-dns, DNS is left alone: no new record, and existing ones are not proxied.
The hostname must be in one of DNZ’s zones; *.example.com covers one label. A hostname outside every zone, or one the proxy already routes, is refused, and the closest names are offered. HTTPS with a redirect from http:// is the default.

Entry points

The server picks the entry points, the same ones the dashboard’s Add route uses:
  • under dnz-proxy, the proxy’s own HTTP and HTTPS entry points;
  • under Traefik, the ones its API lists, when the proxy has Traefik API set.
The one on port 80 serves http:// and the one on 443 serves https://; the command prints which it picked. Without either, or when no entry point is on that port, it uses web and websecure. --http-entry and --https-entry name them yourself.

dnz-proxy nodes

dnz proxy show prints the proxying backend, the proxies and the connect key new nodes join with. New nodes wait for approval. approve takes: Nodes are named by name or id.

Purging the cache

dnz proxy purge clears cached answers on every node of a proxy:
--prefix needs --host.