Comment on Need some help with geoblocking caddy.
irmadlad@lemmy.world 3 days ago
I have a question about xcaddy, if anyone would be so kind as to school me. I too would like to geoblock with Caddy. I have investigated the process and of course it uses xcaddy. Having no knowledge of xcaddy, how does that work? Is xcaddy for building modules for Caddy? Does it run separately or in conjunction with Caddy? Does it interfere with Caddy in any way. My hesitation stems from the embarrassingly long time it took for me to wrap my noodle around how Caddy works. IKR? Now it seems so simple, but I’d like very much not to mess up my Caddy installation fat fingering my way through xcaddy. Yes, I know screw ups build knowledge bases, but I’m really trying to be careful and not go in like a bull in a china closet.
'presh
mik@sh.itjust.works 3 days ago
Xcaddy is a build tool. Caddy plugins are built into Caddy itself for optimization purposes, so xcaddy essentially makes you a custom version of Caddy. It only conflicts with Caddy so much as building a new version would conflict with the old version. You still get a normal “Caddy” executable after running xcaddy, just replace your existing Caddy with the new one created by xcaddy!
Vanilla_PuddinFudge@infosec.pub 3 days ago
I disabled and removed Ubuntu’s caddy before using xcaddy, then remade caddy.service and wrote up a small script to update it when I need. I may automate it down the line.
irmadlad@lemmy.world 3 days ago
Hmm that sounds like something you could do with n8n.
mik@sh.itjust.works 3 days ago
It probably would be easier to just write an “update Caddy” script. They don’t release updates very often, except for security fixes, so it’s not much effort to do manually. I automated mine with Forgejo Actions, you could do the same with GitHub actions as a free option for example. Lots of neat ways to accomplish this!
irmadlad@lemmy.world 3 days ago
Hey mik, thanks for that. Geoblocking with Caddy was on my list, and I can now bump it up to the front.