1. Caddy version (caddy version
):
v2.5.2 h1:eCJdLyEyAGzuQTa5Mh3gETnYWDClo1LjtQm2q9RNZrs=
2. How I run Caddy:
Installation steps were:
NOT containerized by Docker, LXC, etc
a. System environment:
VM using Ubuntu 22.04 LTS
No LSB modules are available.
lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
b. Command:
service caddy start
c. Service/unit/compose file:
None
d. My complete Caddyfile or JSON config:
Copied from /etc/caddy/Caddyfile
my domain {
#Caddy DNS Challenge via Netcup DNS (ACME)
log {
level DEBUG
output file /data/log/caddy_test.log {
roll_size 10MiB
roll_keep 10
roll_keep_for 336h
}
}
tls {
dns netcup {
customer_number {env.NETCUP_CUSTOMER_NUMBER}
api_key {env.NETCUP_API_KEY}
api_password {env.NETCUP_API_PASSWORD}
}
}
}
3. The problem Iβm having:
Hi, I want to get my DNS-Provider-Plugin from Netcup working.
The Problem is that I have pretty much no experience in the DevOps Field.
I had to restore my Caddy-VM to an earlier Snapshot three times now because I cant the DNS-Provider-Plugin for Netcup-DNS working.
I want to use the Netcup DNS-Plugin for Caddy to automatically renew my Lets Encrypt certificate/s without having to interact with it.
Link to Netcup DNS Plugin: https://github.com/caddy-dns/netcup
I was following these instructions from Matt to install the Plugin:
The steps I was doing in my Caddy VM were the following:
apt install golang
git clone " "
cd caddy/cmd/caddy/
go build
Install xcaddy
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf '' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg
curl -1sLf '' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
sudo apt update
sudo apt install xcaddy
#Then setting the environment variable for xcaddy in my Home-Path
10. sudo nano /etc/environment
11. PATH="(...):/usr/bin/xcaddy"
12. source /etc/environment
Ran the xcaddy command following the instructions by Matt
xcaddy build --with github.com/caddy-dns/netcup
#Restarted Caddy Service
sudo service xcaddy restart
And this is where I get an error:
Jul 23 06:35:10 caddyserver caddy[13052]: run: adapting config using caddyfile: parsing caddyfile tokens for 'tls': /etc/caddy/Caddyfile:13 - Error during parsing: getting module named 'dns.providers.netcup': module not registered: dns.providers.netcup
The full Log below
4. Error messages and/or full log output:
caddy@caddyserver:~/caddy/cmd/caddy$ journalctl -xeu caddy.service
Jul 23 06:35:10 caddyserver systemd[1]: Starting Caddy...
ββ Subject: A start job for unit caddy.service has begun execution
ββ Defined-By: systemd
ββ Support:
ββ
ββ A start job for unit caddy.service has begun execution.
ββ
ββ The job identifier is 4347.
Jul 23 06:35:10 caddyserver caddy[13052]: caddy.HomeDir=/home/caddy
Jul 23 06:35:10 caddyserver caddy[13052]: caddy.AppDataDir=/home/caddy/.local/share/caddy
Jul 23 06:35:10 caddyserver caddy[13052]: caddy.AppConfigDir=/home/caddy/.config/caddy
Jul 23 06:35:10 caddyserver caddy[13052]: caddy.ConfigAutosavePath=/home/caddy/.config/caddy/autosave.json
Jul 23 06:35:10 caddyserver caddy[13052]: caddy.Version=v2.5.2 h1:eCJdLyEyAGzuQTa5Mh3gETnYWDClo1LjtQm2q9RNZrs=
Jul 23 06:35:10 caddyserver caddy[13052]: runtime.GOOS=linux
Jul 23 06:35:10 caddyserver caddy[13052]: runtime.GOARCH=amd64
Jul 23 06:35:10 caddyserver caddy[13052]: runtime.Compiler=gc
Jul 23 06:35:10 caddyserver caddy[13052]: runtime.NumCPU=4
Jul 23 06:35:10 caddyserver caddy[13052]: runtime.GOMAXPROCS=4
Jul 23 06:35:10 caddyserver caddy[13052]: runtime.Version=go1.18.3
Jul 23 06:35:10 caddyserver caddy[13052]: os.Getwd=/
Jul 23 06:35:10 caddyserver caddy[13052]: LANG=en_US.UTF-8
Jul 23 06:35:10 caddyserver caddy[13052]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Jul 23 06:35:10 caddyserver caddy[13052]: NOTIFY_SOCKET=/run/systemd/notify
Jul 23 06:35:10 caddyserver caddy[13052]: HOME=/home/caddy
Jul 23 06:35:10 caddyserver caddy[13052]: LOGNAME=caddy
Jul 23 06:35:10 caddyserver caddy[13052]: USER=caddy
Jul 23 06:35:10 caddyserver caddy[13052]: SHELL=/bin/bash
Jul 23 06:35:10 caddyserver caddy[13052]: INVOCATION_ID=72e80a31dc7f41a99bfdda168d0ff170
Jul 23 06:35:10 caddyserver caddy[13052]: JOURNAL_STREAM=8:59430
Jul 23 06:35:10 caddyserver caddy[13052]: SYSTEMD_EXEC_PID=13052
Jul 23 06:35:10 caddyserver caddy[13052]: {"level":"info","ts":1658558110.9286294,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
Jul 23 06:35:10 caddyserver caddy[13052]: run: adapting config using caddyfile: parsing caddyfile tokens for 'tls': /etc/caddy/Caddyfile:13 - Error during parsing: getting module named 'dns.providers.netcup': module not registered: dns.providers.netcup
Jul 23 06:35:10 caddyserver systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
ββ Subject: Unit process exited
ββ Defined-By: systemd
ββ Support:
ββ
ββ An ExecStart= process belonging to unit caddy.service has exited.
ββ
ββ The process' exit code is 'exited' and its exit status is 1.
Jul 23 06:35:10 caddyserver systemd[1]: caddy.service: Failed with result 'exit-code'.
ββ Subject: Unit failed
ββ Defined-By: systemd
ββ Support:
ββ
ββ The unit caddy.service has entered the 'failed' state with result 'exit-code'.
Jul 23 06:35:10 caddyserver systemd[1]: Failed to start Caddy.
ββ Subject: A start job for unit caddy.service has failed
ββ Defined-By: systemd
ββ Support:
ββ
ββ A start job for unit caddy.service has finished with a failure.
Relevant Debug-Log stays empty because service doesnt start: /var/log/caddy/debug.log
5. What I already tried:
Installing xcaddy without building Caddy from source. Probably a stupid idea, but as Iβve already mentioned, I have no experience in handling tasks like this. I dont know any programming language or how they work. I really just want to get my DNS-Challenge for Caddy working.
6. Links to relevant resources:
Cant post this, because my new Caddy Community Account is limited to 4 URLs only. I already had to butcher many URLs to get this posted. Lul