Automatic DNS

Beta

Connect your domain on Cloudflare once, and Deplo creates the DNS record of every domain you add to an app. Optionally through a Cloudflare Tunnel.

Beta

This feature is currently beta/experimental and subject to change. It is not recommended for production. Try it out and share your feedback on our GitHub.

Connect example.com with your Cloudflare API token once. From then on, adding app.example.com to an app creates its DNS record in Cloudflare, and removing the domain deletes it.

Connect a domain

You need the domain on your Cloudflare account and an API token with:

TypeItemPermission
ZoneDNSEdit
ZoneZoneRead
AccountCloudflare TunnelEdit (only for Cloudflare Tunnel)

Open the dialog

Settings -> General, then Connect a domain in the Automatic DNS card.

Fill it in

  • DNS provider: Cloudflare.
  • Domain: example.com, exactly as Cloudflare lists it. app.example.com is refused when Cloudflare lists example.com; connecting example.com covers every name under it.
  • API token: Create one opens Cloudflare's token form with the permissions filled in.
  • Who can use it: the teams whose new domains get their DNS created. Only teams where you manage domains are listed.

Connect

Connect checks that the token reaches the domain, then saves it. A token without Cloudflare Tunnel: Edit still connects, and Deplo says the domain has no Cloudflare Tunnel.

Who can use it

The connection is yours, like an API token. Nobody else sees the token, and an API token or an AI agent cannot connect or change one.

Anyone in these teams can use itAutomatic DNS when adding a domain
Off (default)Only for you
OnFor every member of the selected teams who can manage domains, with your token
  • It stops working in a team where you no longer manage domains.
  • Edit, in the card, changes the teams and the switch. Disconnect removes the connection.
  • Every change is in the team's Activity.

Add a domain

Open the app, Domains -> Add Domain, and type a name under a connected domain, like app.example.com. The dialog says Deplo creates the DNS record in example.com.

Add domain creates an A record pointing at the app's server (AAAA on an IPv6-only server), not proxied, so the certificate is issued as usual. If Cloudflare already has a record on that name:

  • It points at the app's server: Deplo uses it and never deletes it.
  • It points somewhere else: Deplo refuses and names the record. Delete it in Cloudflare, or pick another name.

Cloudflare Tunnel

The same dialog shows Use Cloudflare Tunnel. Cloudflare then reaches the server over a connection the server opens itself: no port to open, and HTTPS is Cloudflare's.

  • The HTTPS group, Behind a proxy and the www redirect are hidden. The tunnel decides them.
  • The row shows a Cloudflare Tunnel badge.
  • The first tunnel domain on a server restarts its proxy for a few seconds.
  • The tunnel is chosen when the domain is added. To switch, remove the domain and add it again.
WhereWhat
CloudflareOne tunnel per connected domain and server, named like deplo-web-1-3f9a1c
CloudflareA route per domain, for example app.example.com
CloudflareA proxied CNAME record app.example.com -> <tunnel id>.cfargotunnel.com
Your serverA container next to the server's proxy, named like deplo-dns-tunnel-dnsp4f1c9a2b7e3d8c06

Updates keep the tunnel. If a server's proxy loses the connector anyway, Deplo puts it back within ten minutes.

A tunnel-served domain needs no certificate. Its editor shows no HTTPS fields and says: "Cloudflare serves this domain through a tunnel, HTTPS included: it needs no certificate of its own."

On a cluster, each app with a domain in a connected zone gets a tunnel of its own, with or without this switch, so the domain keeps one address when the app moves to another server. See Addresses and Cloudflare.

What Deplo deletes

Only the records it created. A record that was already there is never touched.

YouDeplo
Remove the domainDeletes its record
Rename itDeletes the old record, creates the new one
Delete the app or the teamDeletes the records of all its domains
Disconnect the domainDeletes its tunnels and their CNAME records. A records stay, so those sites keep working

A record still used by another row on the same name, like app.example.com and app.example.com/api, stays until the last one is removed.

Disconnect stops tunnel domains

Domains served through a Cloudflare Tunnel stop answering when their domain is disconnected. Add them again without the tunnel, or reconnect first.

Good to know

  • www: add www.example.com as a domain of its own. The www redirect does not create the other name's record.
  • Cloudflare only, for now.
  • The token stays encrypted. To replace it, connect the same domain again with the new token.

Next steps

Did this page help you?

On this page