Prevent caddy from trying to manage certificates

1. The problem I’m having:

Caddy is crashing trying to manage certificates for me. I already manage my certificates with certbot, and don’t want this behavior at all.

2. Error messages and/or full log output:

 Error: loading initial config: loading new config: http app module: start: finalizing automatic HTTPS: managing certificates for 1 domains: automate: manage [nmflight.com]: nmflight.com: caching certificate: open caddy/certificates/acme-v02.api.letsencrypt.org-directory/nmflight.com/nmflight.com.key: not a directory

3. Caddy version:

2.9.1

4. How I installed and ran Caddy:

Compiled via xcaddy

a. System environment:

Running on Fedora Server 41

b. Command:

Running via a service. Running normally works fine

[Unit]
Description=Start Caddy

[Service]
Type=forking
WorkingDirectory=/usr/local/bin/
ExecStart=/usr/local/bin/caddy start

[Install]
WantedBy=multi-user.target

c. Service/unit/compose file:

d. My complete Caddy config:

nmflight.com

redir /jellyfin /jellyfin/
reverse_proxy /jellyfin/* 127.0.0.1:8096

5. Links to relevant resources:

I have seen this, but I honestly have no clue how to interpret it. There is nothing that explicitly states how to completely and totally disable all certificate related actions.

If you want to give Caddy the certificates that were procured by certbot, use the tls directive like

example.com {
    tls cert.pem key.pem
    # everything else goes here ...
}

If you want Caddy to serve everything without HTTPS at all, prepend the site address with http://, but why? Why use certbot? Caddy can manage it for you just fine and with one less component to break. It’s the best at this job.

1 Like

Thank you! I was using certbot left over from some other projects, but I’ll switch over to using caddy

1 Like

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