Managed Custom ctrld TOML Config
Use the dashboard TOML Config editor when you need advanced ctrld behavior on a Control D managed Endpoint, but you still want the Control D dashboard/API to remain the source of truth.
This is useful for cases such as:
- split-horizon DNS
- custom upstreams
- local resolvers such as
dnsmasq - custom listener or policy rules
- MDM/RMM-managed roaming clients where admins should not edit local files by hand
How this differs from editing ctrld.toml locally
When ctrld is installed with the Control D one-line installer or started with --cd RESOLVER_ID, it runs in CD Mode. In CD Mode, the local ctrld.toml file is generated from Control D API state.
That generated file may contain this warning:
# AUTO-GENERATED VIA CD FLAG - DO NOT MODIFYDo not treat that generated file as the durable source of truth. Manual edits can be replaced when ctrld restarts or fetches updated managed configuration.
The dashboard TOML Config editor is the managed path for persistent custom TOML. You save the custom TOML in Control D, and the Endpoint receives it on its next managed config fetch.
For a deeper comparison, see ctrld Local Config Mode vs CD Mode.
Important: this is a full ctrld config
The TOML Config editor stores a complete custom ctrld config for that Endpoint. Treat it as the full desired ctrld configuration, not a small patch on top of the generated config.
If the Endpoint should continue sending normal DNS traffic to Control D, include the Control D upstream/default route explicitly in the custom TOML.
If you only define local split-DNS rules and omit the Control D upstream, normal DNS traffic may not use Control D as intended.
Basic deployment flow
- Open the relevant Endpoint/Device in the Control D dashboard.
- Open the
ctrldconfiguration modal. - Enter or update the TOML config in the TOML Config editor.
- Save the config.
- Restart
ctrldon the target endpoint to force an immediate fetch, or wait for the next managed config fetch. - Confirm the dashboard shows the custom config as deployed after the endpoint fetches it.
Once fetched, the config is managed from the dashboard and persists across normal ctrld restarts/syncs. Do not make follow-up changes by editing the generated local ctrld.toml file.
Example: route local development domains to dnsmasq
This example sends .target and .internal queries to a local dnsmasq instance, while all other DNS uses Control D.
[upstream.0]
name = "Control D"
type = "doh"
endpoint = "https://dns.controld.com/YOUR_RESOLVER_ID"
timeout = 5000
[upstream.1]
name = "Local dnsmasq"
type = "legacy"
endpoint = "127.0.0.1:5354"
timeout = 1000
[listener.0]
ip = "127.0.0.1"
port = 53
[listener.0.policy]
rules = [
{"target" = ["upstream.1"]},
{"*.target" = ["upstream.1"]},
{"internal" = ["upstream.1"]},
{"*.internal" = ["upstream.1"]},
]Replace YOUR_RESOLVER_ID with the Control D resolver endpoint shown for your Endpoint.
In this example:
target/*.targetqueries go to localdnsmasqinternal/*.internalqueries go to localdnsmasq- all other queries use the Control D upstream
- the custom config is saved in the dashboard, not manually edited on disk
macOS dnsmasq port note
On macOS, port 5353 is commonly used by Apple's mDNS/Bonjour service. If your dnsmasq instance is already confirmed to be listening on 127.0.0.1:5353, you can point ctrld at that address.
For fleet or MDM deployments, we recommend using a loopback-only non-mDNS port such as 127.0.0.1:5354 or 127.0.0.1:15353 where possible.
The ctrld listener port and the dnsmasq upstream port are separate:
ctrldlistens for system DNS on local port53dnsmasqlistens on another local port, for example127.0.0.1:5354ctrldforwards only matching policy rules, such as.targetand.internal, todnsmasq
Do not configure dnsmasq to bind the same local DNS port that ctrld is using.
Troubleshooting
My local ctrld.toml edits disappear
The endpoint is probably running in CD Mode. Use the dashboard TOML Config editor for managed custom TOML, or switch to Local Config Mode if you want a local file to be the source of truth.
The dashboard says the config is not deployed
The endpoint has not fetched the saved custom config yet. Restart ctrld on the endpoint to force a fetch, or wait for the next managed config fetch.
Normal DNS stops using Control D
Check whether the custom TOML includes the Control D upstream/default route. The dashboard TOML Config editor stores a full config, so custom upstreams and the Control D upstream both need to be represented.
Local split DNS does not resolve
Check that the local resolver is reachable from the endpoint:
dnsmasqis running- it is listening on the expected loopback IP and port
- local firewall/security software permits
ctrldto query it - the policy rules include both apex and wildcard forms where needed, such as
internaland*.internal
Before contacting support
Include:
- the Endpoint/Resolver ID
- the intended custom TOML, with secrets removed
- the operating system and deployment method, such as MDM/RMM
- whether the dashboard shows the custom config as deployed
ctrlddebug logs from How to Debug ctrld