Zrok Self Host with dynamic ip and cloudns

You're asking how to get a wildcard certificate when your DNS is provided by CloudNS.

Short answer:

The steps are the same as when DNS provider is Route53 because CloudNS and Route53 both have multiple login values, whereas CloudFlare uses a single token. Look in the zrok Docker guide in the troubleshooting section for "My DNS provider credential is composed of several values, not a single API token."


Detailed answer:

Here's the CloudNS instructions for their Caddy plugin: GitHub - caddy-dns/cloudns

After following the zrok instructions, you must change the Caddyfile you downloaded for the zrok Docker guide to resemble their instructions, e.g., like this to configure the plugin with inherited env vars:

tls {
  dns cloudns
}

In your zrok compose project's .env, assign the DNS-related variables. You'll get values starting with CLOUDNS_ from CloudNS.

CADDY_DNS_PLUGIN=cloudns
CLOUDNS_AUTH_ID=***
CLOUDNS_SUB_AUTH_ID=***
CLOUDNS_AUTH_PASSWORD=***

You must also declare these new env vars in the compose.override.yml file you renamed from compose.caddy.yml like this. You don't need to assign a value in the compose file because it's assigned in the .env and will pass through.

services:
  caddy:
    environment:
      CLOUDNS_AUTH_ID:
      CLOUDNS_SUB_AUTH_ID:
      CLOUDNS_AUTH_PASSWORD:
1 Like