Skip to content

v1.3.0 - More than one zone

Latest

Choose a tag to compare

@BattermanZ BattermanZ released this 04 Nov 15:46
2f4fb56

Docktornet 1.2.0 wrote every DNS record into one Cloudflare zone. With this release one server manages records in several zones of the same Cloudflare account, and each service picks its zone with a label. The backup script now saves every managed zone, and it no longer breaks on an env file value that holds a space.

Docktornet publishes no images. Build both from the tag:

git checkout v1.3.0
docker build -f crates/server/Dockerfile -t docktornet-server:1.3.0 .
docker build -f crates/agent/Dockerfile  -t docktornet-agent:1.3.0  .

Important

This release migrates the database. A 1.2.0 server cannot open the database 1.3.0 leaves, so copy docktornet.db before the first start. The server now reads each zone's name at startup and refuses to start when the API token cannot read it. Read Upgrade before you start.


What's new

Several Cloudflare zones

  • DOCKTORNET_CF_EXTRA_ZONE_IDS adds zones beside the default one. DOCKTORNET_CF_ZONE_ID stays the default zone, where a record without a zone label goes. The token needs Zone:Read and DNS:Edit on every managed zone. #27
  • docktornet.cf.dns.zone picks a zone by name, such as example.org. A name that is not a managed zone is a label error, and no record is created. #27
  • Changing a container's zone label moves its record to the new zone in the same update, with no grace period. #27
  • Taking a zone out of the configuration leaves its records alone. The server never writes to a zone it does not manage, and audit lists the records it still stores there under unmanaged_zone. #27
  • A running service whose record sits in a zone no longer managed gets a new record in the managed zone its labels ask for. The old one is kept as a stranded record, listed by audit with stranded set to true, and deleted once its zone is managed again. The deployment guide explains how to clear them. #29

Backups

  • scripts/backup_external_state.sh backs up every managed zone. Each zone's details, settings and DNS records go to cloudflare/zones/<zone ID>/, and the old single-zone files cloudflare/zone.json, cloudflare/zone-settings.json and cloudflare/dns-records.json are gone. #28
  • The script reads its env file as Docker Compose does instead of running it as shell code, so an unquoted value holding a space, such as a password, no longer stops every backup. It no longer expands ~, which Compose never did either. #30

Smaller things

  • The async runtime both binaries run on, tokio, is past a published memory-safety flaw (RUSTSEC-2026-0386).

Upgrade

  1. Copy docktornet.db somewhere safe. Migrations 0011 and 0012 run at the first start.
  2. Make sure the Cloudflare token has Zone:Read on the default zone. The server now reads the zone's name at startup and refuses to start without it.
  3. If anything reads the backup's Cloudflare files, point it at cloudflare/zones/<zone ID>/.
  4. If DOCKTORNET_BACKUP_DIR or DOCKTORNET_BACKUP_GATUS_DIR starts with ~, write it as a full path. The backup script refuses it otherwise.
  5. Set SERVER_IMAGE and AGENT_IMAGE to the 1.3.0 images you built, and recreate the server and every agent:
docker compose up -d

The first start puts every stored record and pending removal in the default zone. It changes nothing in Cloudflare. To manage more zones, list them in DOCKTORNET_CF_EXTRA_ZONE_IDS and give the token access to each.

The full list, line by line, is in the changelog.