this post was submitted on 09 Apr 2025
112 points (96.7% liked)

Selfhosted

45788 readers
413 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
112
TIL - Caddy (lemmy.world)
submitted 5 days ago* (last edited 5 days ago) by irmadlad@lemmy.world to c/selfhosted@lemmy.world
 

Today I gained a little more knowledge about Caddy, and I thought I'd share in case someone is having the same issue.

I've been biting my nails worrying about Caddy updating certificates. Everything I had read told me not to sweat it. That Caddy had my back and wouldn't let any certs expire. Well, two did, today. So I set about today, after I got all my chores done, to see if I could figure out wtf.

Long story short, I had a inconsistency in the format of my Caddy file. It didn't affect the function of the file to the extent that it would not provide the certificate in daily use, but apparently I confused Caddy enough so that it couldn't determine when certs were expiring, and reissue the cert.

If you run the following:

caddy reload --config /etc/caddy/Caddyfile 

And you get something like this:

2025/04/09 21:49:03.376 WARN    Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies{"adapter": "caddyfile", "file": "/etc/caddy/Caddyfile", "line": 1}

It's a warning that something is askew. Not to worry tho, you can fix it thusly:

Make a backup assuming etc/caddy/Caddyfile is where your Caddyfile is:

cp /etc/caddy/Caddyfile /etc/caddy/Caddyfile.bak

Next we'll ask Caddy nicely to please reformat in an acceptible form:

sudo caddy fmt --overwrite /etc/caddy/Caddyfile

Trust but verify:

caddy validate --config /etc/caddy/Caddyfile

Now run:

caddy reload --config /etc/caddy/Caddyfile

You should be golden at this point.

Cheers

you are viewing a single comment's thread
view the rest of the comments
[–] irmadlad@lemmy.world 3 points 4 days ago (1 children)

As you were, Mr Milchick

Is this related to 'Severance"? Had to look it up. I apologize, I do not watch TV of any sort. It's not a religious thing, and it's not that I think that fact makes me better than everyone else, but I really have no interest in stuff on TV. I do read a lot. I can better digest the material if I can read it. However, it has to be online. If you gave me a traditional book of a topic I was keenly interested in, I'd never crack the binding. Give it to me digitally where I can read it on any of my devices, and I'll read it cover to cover. Yeah....I'm a weird old curmudgeon.

[–] droolio@feddit.uk 2 points 4 days ago (1 children)

Do ignore me then, I assumed you might know the reference and only I mean't it in good humour. :) (Without spoiling anything - in the unlikely event you might some day watch it - Mr Milchick is a character that uses 'big words'. Your choice of words struck a chord.) I will say though, you're seriously missing out. The cinematography alone is brilliant and the acting exceptional.

[–] irmadlad@lemmy.world 1 points 4 days ago

Naw man, it's cool. I get references, but they kind of have to be old school stuff Richard Pryor, Blazing Saddles, Young Frankenstein, that kind of stuff. I'm just a weird old man. LOL