einschmidt / addon-caddy-2

Caddy 2 is a powerful, open source web server with automatic HTTPS
MIT License
30 stars 9 forks source link

module not registered: dns.providers.duckdns, at /share/caddy/Caddyfile:7 #206

Closed Jaykurb closed 6 months ago

Jaykurb commented 6 months ago

Hi, I am seem to facing some issues trying to configure caddy2. I get the following error: adapting config using caddyfile: parsing caddyfile tokens for 'tls': getting module named 'dns.providers.duckdns': module not registered: dns.providers.duckdns, at /share/caddy/Caddyfile:7

Full log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting

-----------------------------------------------------------
 Add-on: Caddy 2
 Open source web and proxy server with automatic HTTPS
-----------------------------------------------------------
 Add-on version: 1.5.4
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.3.1
 Home Assistant Supervisor: 2024.03.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
Log level is set to INFO
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service caddy: starting
s6-rc: info: service caddy successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
INFO: Prepare Caddy...
INFO: Use built-in Caddy
v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
INFO: Prepare Caddyfile...
INFO: Caddyfile found at /share/caddy/Caddyfile
INFO: Run Caddy...
{"level":"info","ts":1711030709.788712,"msg":"using provided configuration","config_file":"/share/caddy/Caddyfile","config_adapter":""}
Error: adapting config using caddyfile: parsing caddyfile tokens for 'tls': getting module named 'dns.providers.duckdns': module not registered: dns.providers.duckdns, at /share/caddy/Caddyfile:7
INFO: Service caddy exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service caddy: stopping
s6-rc: info: service caddy successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Caddyfile:

{
    email myemail@gmail.com
}

mydomain.duckdns.org {
    tls {
        dns duckdns mytoken
    }
    reverse_proxy https://192.168.1.105:9090
}
einschmidt commented 6 months ago

Hi @Jaykurb,

The addon does not support any custom modules out of the box.

In order to use the duckdns module, you will have to create/download a custom caddy binary. Via the config, you can then setup the addon to use your custom caddy binary.

Check also: https://github.com/einschmidt/addon-caddy-2/blob/main/caddy-2/DOCS.md#updatesplugins