Early renewal for Caddy v1.04

I'm a pretty basic user here, and while trying to force a certificate renewal (which I just learned now I probably didn't need to do), I've stopped my web server from working. Here's some quick details, appreciate any assistance.

OS- Linux
Webserver- Caddy V1

I saw a comment while searching where someone said they deleted the contents of /etc/ssl/caddy and restarted the server to grab new certs, but that broke things for me. I'll detail the errors below. I copied the "caddy" directory first in case it didn't work, but after adding that directory back, I get the same errors.

When trying to run caddy, I get:

caddy.service - Caddy HTTP/2 web server
Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-01-26 09:44:48 PST; 5s ago
Docs: Welcome — Caddy Documentation
Process: 6207 ExecStart=/usr/local/bin/caddy -log stdout -log-timestamps=false -agree=true -conf=/etc/caddy/Caddyfile -root=/var/tmp (code=exited, sta
Main PID: 6207 (code=exited, status=1/FAILURE)

Jan 26 09:44:48 plexmini systemd[1]: Started Caddy HTTP/2 web server.
Jan 26 09:44:48 plexmini caddy[6207]: [INFO] Caddy version: v1.0.4
Jan 26 09:44:48 plexmini caddy[6207]: Activating privacy features... [INFO][cache:0xc0000adc20] Started certificate maintenance routine
Jan 26 09:44:48 plexmini caddy[6207]: decoding certificate metadata: unexpected end of JSON input
Jan 26 09:44:48 plexmini systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Jan 26 09:44:48 plexmini systemd[1]: caddy.service: Failed with result 'exit-code'.

Anyone know where I can go from here?

Is there anything I can simply delete to force caddy to grab fresh certificates?

Welcome @cdmi

Start here for good instructions

5 Likes

This thread was forked from the bigger questions thread since it's about a specific Caddy version. Maybe @mholt or another caddy user will be able to offer some guidance for this older version.

5 Likes

Thanks. I saw that!
I'm using an older version than v2.4.2.
Otherwise, I don't see any other information in that thread?

At the moment, my Caddy server will not launch.

1 Like

There was some advice for older Caddy versions after that first post from mholt. Just have to keep following their comments. See posts 33 and 38 especially

3 Likes

Thanks for pointing me in the right direction.

For anyone else in the same position, I had to delete the /etc/ssl/caddy folder, then make a new one with the same user and group that caddy operates with. My problem was that in order to delete the caddy folder that stored the certs, I had to be root.. then created the new folder with root privileges and caddy couldn't write to it.... I guess? Who knows. It's working now.

5 Likes

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