Skip to content

Getting started

Coming from DNSControl

Migrate from DNSControl to DNSMigrator by mapping creds.json connections, importing dnsconfig.js, replacing preview and push, and checking known differences.

8 min read

On this page

How to migrate from DNSControl#

Compare the ongoing-management options in DNSControl alternatives: Terraform, octoDNS, and a web UI before deciding which zones to import.

DNSControlDNSMigratorWhere to use it
creds.json entryConnectionConnections → Connect a provider
NewDnsProviderConnection mapping plus a managed-zone providerZones → Add zone → dnsconfig.js
NewRegistrarRetained registrar metadata; connection selected separatelyConnections, then Settings → Registrar account or migration cutover
dnsconfig.jsSaved managed-zone draftZone → Config as code
previewPer-provider planZone → Preview changes → Changes
pushTyped-confirmation pushZone → Changes → Push to N providers
get-zonesImport a provider zone or select a migration sourceZones → Add zone → Import from a provider; New migration
check-credsAccess verificationCreating a connection; Connections → Check access
checkConfig evaluation or zone checksCLI dnsmigrator check-config dnsconfig.js; Zone → Records → Zone checks; CLI dnsmigrator lint for BIND
fmtNormalized regenerated outputZone file validator; CLI dnsmigrator export or convert
print-irEvaluated desired zones as JSONCLI dnsmigrator check-config dnsconfig.js --ir
initConnect and add-zone flowsConnect a provider, then Add zone

A one-time migration uses a separate New migration workflow with source translation, destination apply, authoritative verification, rollback, and optional registrar cutover. A managed zone is closer to DNSControl’s ongoing desired-state loop. See How it works.

Recreate creds.json as connections#

Do not paste a creds.json file into the app. Open Connections, choose Connect a provider, and create one connection for each DNS or registrar account you need. The provider form validates its own credential fields and immediately checks access.

Use a name that preserves the intent of the old credkey, such as cloudflare_production. During dnsconfig.js import, DNSMigrator shows each declared DnsProvider key and lets you match it to an existing connection. The first connection with a matching provider is suggested automatically, so verify the selection when the workspace has several accounts at that provider.

creds.json
{
  "cloudflare_production": {
    "TYPE": "CLOUDFLAREAPI",
    "apitoken": "replace-me"
  }
}

The equivalent is not a new JSON file. It is a Cloudflare DNS connection named cloudflare_production, created with the token field shown by the provider guide. See Connecting providers and Credential security.

Import dnsconfig.js#

Open Zones, choose Add zone, then choose dnsconfig.js under How to add the zone. Use Open file or paste the script, then choose Read the config.

dnsconfig.js
var REG_NONE = NewRegistrar("none");
var DSP_CLOUDFLARE = NewDnsProvider("cloudflare_production", "CLOUDFLAREAPI");

D("example.com", REG_NONE,
  DnsProvider(DSP_CLOUDFLARE),
  DefaultTTL(300),
  A("@", "192.0.2.10"),
  CNAME("www", "@"),
  MX("@", 10, "mail.example.net."),
  IGNORE("_acme-challenge", "TXT"),
  NO_PURGE,
);

The script runs in a sandboxed Web Worker in your browser. The importer blocks script network and filesystem access, stops after its execution limit, and rejects files over the UI limit. Expand Variables (dnscontrol -v name=value) to supply one value per line; CLI_DEFAULTS() fills omitted variables. HASH() supports SHA1, SHA256, and SHA512.

SPF_BUILDER flattening can ask DNSMigrator for TXT records after the script finishes, with at most 50 lookups per import and a separate 20-second lookup timeout. Results, warnings, and errors appear before anything is saved.

For each declared provider, use Match each DnsProvider to a connection. Selecting Skip for now keeps the zone import but does not attach that provider connection. Choose Import N zones when the mapping is correct. Existing zones in the workspace are skipped rather than overwritten by a bulk config import.

After import, open each zone. Config as code shows the saved zone as generated DNSControl-compatible JavaScript; unsaved editor changes are not included. The same tab can load a matching D("zone") back into the editor for review before Save changes.

Replace preview and push#

DNSControl’s command loop:

bash
$ dnscontrol preview
$ dnscontrol push

becomes this app loop:

Edit the saved draft

Use Records, Settings, or Config as code, then choose Save changes.

Build a live plan

Choose Preview changes. DNSMigrator reads every attached provider and opens Changes.

Review every provider

Expand each provider plan and inspect its Add, Change, and Delete rows, unchanged count, unsupported records, and provider errors.

Confirm the push

Copy or Download plan, handle any Large change, unsupported-record, or nameserver acknowledgement, type the zone name, and choose Push to N providers. The worker re-reads every provider and writes only if the combined fingerprint still matches.

NO_PURGE maps to Never delete records at the provider. The additional ownership mode deletes only record-set keys DNSMigrator previously pushed. Push safety defaults to 30% update and delete limits from 10 existing record sets, an apex-NS Never change guard, and optional Block when records can't be represented and Publish a verification record controls. A large plan requires the typed word force; all acknowledgements are audit-logged with the plan fingerprint.

Push requires the saved draft version and freshly computed provider plans to match the reviewed preview. A mismatch stops with “The zone changed since you reviewed the plan — review again.” It never substitutes new operations under an old confirmation. Creates and deletes are dependency-ordered, each usable provider is backed up first, and a configured Registrar account is updated only after a clean DNS push and only when registry DNSSEC does not require the cutover sequence. Read Preview and push before the first production push.

For a provider-to-provider move rather than ongoing desired-state management, use Quickstart: your first migration. Migration Keep extra records is the one-time counterpart to merge behavior; Make an exact copy allows destination-only deletions.

Replace get-zones and check-creds#

To bootstrap from a provider, choose Zones → Add zone → Import from a provider, then select the connection and visible zone. DNSMigrator reads the live records into a saved draft and excludes provider-managed SOA and apex NS records. You can also choose a connected source under New migration without first making it a managed zone.

Creating a connection performs the access check that check-creds provided. Use Check access later to run it again. The row records whether the adapter confirmed read or read-and-write scope; a provider error is shown as Access failed.

The credential-free CLI does not implement provider get-zones because it never accepts provider credentials. From BIND, octoDNS YAML, or dnsconfig.js, dnsmigrator export emits BIND, canonical JSON, dnsconfig, djs, octoDNS YAML or starter config, TSV, nameonly, and /etc/hosts. convert converts among the three config-as-code formats.

Functions that carry across#

The browser runtime supports the core domain declarations, standard record functions, the provider-specific functions marked supported in the parity reference, ignore rules, NO_PURGE, nameserver declarations, DNSSEC intent, reverse-zone helpers, import transforms, and the SPF, DMARC, CAA, DKIM, Microsoft 365, and LOC builders. The zone editor exposes the same builders under Records → Use a builder.

Use the DNSControl parity reference for a row-by-row inventory. Important mappings include:

  • IGNORE, IGNORE_NAME, and IGNORE_TARGET → Settings → Ignore rules.
  • IGNORE_EXTERNAL_DNS → Leave Kubernetes external-dns records alone.
  • DISABLE_IGNORE_SAFETY_CHECK → Turn off the ignore safety check.
  • NO_PURGE and PURGE → Never delete records at the provider on or off; the UI also offers ownership-based deletion beyond DNSControl.
  • Per-record provider selection → Serve from with All providers, Only, or All except.
  • AutoArpa behavior → Generate PTR records from my forward zones on managed reverse zones.
  • AUTODNSSEC_ON and AUTODNSSEC_OFF → DNSSEC → Sign or Unsign.
  • NAMESERVER and NAMESERVER_TTL → extra nameservers and the saved config model.
  • DnsProvider(provider, count) → attached providers and Nameservers used.
  • IMPORT_TRANSFORM and IMPORT_TRANSFORM_STRIP → the managed-zone transform model.

Known deviations#

  • Use Variables (dnscontrol -v name=value) for import variables; CLI_DEFAULTS() supplies defaults for omitted names.
  • HASH() supports SHA1, SHA256, and SHA512 in both browser and CLI evaluation.
  • Browser SPF_BUILDER flattening resolves selected includes through DNSMigrator after evaluation. The offline CLI has no resolver, so check-config keeps the policy unflattened and warns.
  • Glob matching follows DNSControl’s implementation where it differs from older prose examples.
  • The DMARC and CAA builders validate policy, URI, tag, flag and range inputs instead of preserving invalid builder input.
  • IGNORE_NAME_DISABLE_SAFETY_CHECK is rejected; use the domain-wide DISABLE_IGNORE_SAFETY_CHECK form.
  • Deprecated AUTODNSSEC is a no-op with a warning; use the explicit _ON or _OFF form.
  • Provider metadata with no canonical equivalent is reported and dropped. Several Cloudflare domain-level settings can be preserved as config metadata but are not applied as provider operations.
  • Export warns when an exact DNSControl representation is unavailable. Non-weighted routing metadata is dropped from generated dnsconfig.js, obsolete SPF records export as TXT, unsupported types become comments, and Hurricane Electric DDNS keys are omitted unless a caller explicitly requests secret export. The web UI does not request it.
  • Unicode domain, owner, and hostname labels are normalized to lowercase IDNA ASCII form.
  • BUNNY_DNS_PZ, BUNNY_DNS_RDR, and PORKBUN_URLFWD now create canonical provider-feature records instead of being skipped. Cloudflare redirect and Worker Route records can be read and pushed when the token has the extra permissions listed on the Cloudflare provider page.

Review all import and export warnings. Passing the parser means the JavaScript could be converted; it does not mean every attached provider can represent every record. Run Preview changes to get the provider-specific answer.

DNSControl migration questions#

Can I import a DNSControl dnsconfig.js file?
Yes. The browser importer evaluates the supported DSL in a sandboxed Web Worker and turns each D() declaration into a managed-zone draft. Read every warning because valid JavaScript does not guarantee that each destination provider supports every resulting record.
Should I upload DNSControl creds.json?
No. Recreate each account as an encrypted Connection, then map imported DnsProvider keys to those connections. DNSMigrator does not import or export provider secrets in dnsconfig.js.
What replaces dnscontrol preview and push?
Select Preview changes, inspect or download the fingerprinted plan, and acknowledge any safety guards. After you type the zone name, DNSMigrator re-reads every provider and pushes only if the combined plan fingerprint is unchanged; otherwise it stops for another review.
What replaces dnscontrol get-zones?
Use Zones → Add zone → Import from a provider to create a managed draft, or choose a connected provider directly in New migration. The credential-free CLI does not implement get-zones because it never accepts provider credentials.
Can the browser importer use variables, hashes, require, or fetch?
It accepts variables through Variables (dnscontrol -v name=value) and supports HASH() with SHA1, SHA256, or SHA512. It does not expose require, glob helpers, FETCH, or fetch; put local dependencies and materialized remote data into the reviewed script.