Setup Caddy with Google Domain


I’m new to caddy and trying to set it up with a google domain that I own. Currently it isn’t working out very well, could someone give me a hand.

        "access_token": “SUPERTOPSECRETKEY”,
        "keep_expired_records": false


docker.mysitecom {
  reverse_proxy docker:80

Blockquote Error: adapting config using caddyfile: /etc/caddy/Caddyfile:2: unrecognized global option: access_token

INF ts=1688841337.1309664 msg=using provided configuration config_file=/etc/caddy/Caddyfile config_adapter=caddyfile

1 Like

Caddyfile is not JSON. And you can’t arbitrarily put config anywhere. Please review the docs: Caddyfile Concepts — Caddy Documentation

Please fill out the help topic template, as per the forum rules. We can’t help otherwise.

1 Like

1. The problem I’m having:

I’m new to Caddy and trying to setup a reverse proxy using a google domain and raspberry pi.

2. Error messages and/or full log output:

INF ts=1688867018.9608455 msg=using provided configuration config_file=/etc/caddy/Caddyfile config_adapter=caddyfile
Error: adapting config using caddyfile: parsing caddyfile tokens for 'acme_dns': /etc/caddy/Caddyfile:2 - Error during parsing: getting module named 'dns.providers.google_domains': module not registered: dns.providers.google_domains

3. Caddy version:


4. How I installed and ran Caddy:

Install method

a. System environment:

PRETTY_NAME=“Debian GNU/Linux 11 (bullseye)”
NAME=“Debian GNU/Linux”

b. Command:


c. Service/unit/compose file:


d. My complete Caddy config:

	acme_dns google_domains YVdinotrealnotrealnotrealakjfbiubvnotrealw==
} {
  reverse_proxy blahblah:80

5. Links to relevant resources:

  1. Fire up a VM of debian
  2. Follow’s instructions and install docker using the script
  3. Use the Amd64 Ubuntu, Debian Portainer App Template url on the site
  4. Install Caddy using the app template in portainer
  5. TaDa!
1 Like

I’ve resolved my own issue.

  1. I removed my janky Caddyfile, I just used the one below to get me by.
localhost {
        respond "Hello, world!"
  1. Restarted my docker container, which would not allow me to get to a shell so I could move a file over.
  2. Downloaded caddy-dns/google-domains from (Download Caddy)
  3. Renamed the downloaded file to ‘caddy’
  4. From terminal, ‘docker cp caddy caddy:/src/’
  5. In Portainer, attached to the container using /bin/sh
  6. Change permissions for caddy and ownership. ‘chmod +xwr caddy’, ‘chmod 1001:ntp caddy’
  7. Moved caddy into the proper file path, ‘mv caddy /usr/bin/’
    9, Stopped the container
  8. Edited the Caddyfile with the proper info, and fired up the container.
  9. Tada!
1 Like

Thanks for filling out the help template!

It looks like your initial Caddy build didn’t have the google domains plugin plugged in.

Huge thank you for writing up your solution for others!

Just FYI, Google Domains is being shut down in a few months and it’s unlikely their API will continue to function. Maybe it will, but I’d be surprised since it uses a Google DNS property.

(Their API only launched a few months ago, too. Sigh.)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.