this post was submitted on 23 Apr 2025
21 points (92.0% liked)

Selfhosted

46237 readers
494 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
 

I’m slightly freaking out. I recently ran some updates on my Linux Mint server computer. Afterwards, my modules, like Porkbun, had been removed and kept giving a 400 error when trying to add-package. Without the porkbun dns module, caddy can’t pass the keys and nothing with reverse proxy from me. The porkbun git page mentions some upgrade to the DNS system a few days ago that they said was connected to this. Any ideas of what to do? Do I downgrade Caddy until they resolve? I’m not the most computer savvy so I appreciate the help.

top 9 comments
sorted by: hot top controversial new old
[–] Auli@lemmy.ca 2 points 8 hours ago

Downgrade to 2.9 till the porkbun plugin gets updated to work withb2.10.

[–] Xanza@lemm.ee 4 points 12 hours ago* (last edited 12 hours ago) (1 children)

I guess it depends on how you got caddy to begin with. If you used xcaddy, you have to update caddy the same way (recompile via xcaddy) otherwise you'll get the default binary which has no misc modules by default, which kinda sounds like what's happened but who knows for sure.

If you're feeling daring, you can try to compile caddy yourself with xcaddy, it's super easy.

Save your Caddyfile's (ultra important), and uninstall caddy. Install xcaddy (apt install xcaddy [or go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest]). Then use xcaddy to compile caddy with the modules you need;

$ cd /tmp
$ xcaddy build --with github.com/caddy-dns/porkbun --with github.com/caddy-dns/cloudflare --with github.com/some-user/whatever-module

Caddy will build and be spit out in /tmp/caddy. Move it to /home/username/.local/bin or something, and make sure that directory is in your path. Don't forget to chmod +x caddy.

Run caddy like normal and see if this fixes your issue. If not, you'll likely have to try and older version of caddy (uninstall and specifically install the previous version or if you can't, use xcaddy with CADDY_VERSION to build a specific version with your modules), or wait until they push a fix for whatever they broke.

That's what I did for Cloudflare and it works well.

[–] someacnt@sh.itjust.works 1 points 12 hours ago (1 children)

What are you using the porkbun dns module for, and how does it integrate with caddy? I think reverse proxy is not so related with DNS service, unless you are advertising caddy domains to porkbun via API.

I'm guessing they are doing DNS challenge for getting Let's Encrypt certs.

[–] fishynoob@infosec.pub 1 points 13 hours ago

Sorry, I don't use either of those services. Would you be willing to explain your setup? I use my own CA with HAProxy for TLS termination (with servers side TLS) so I might be able to give some general tips. Maybe.

[–] sxan@midwest.social -4 points 11 hours ago (2 children)

I've never heard of Porkbun, but it doesn't sound like a caddy issue. Let's Encrypt requires being able to resolve the DNS name you're requesting a cert for, and to be able to connect to your web service and fetch a secret to prove you own the domain. If porkbun does something like punch a hole in your LAN firewall and let in http traffic, then porkbun is the problem. Not Caddy.

and to be able to connect to your web service and fetch a secret to prove you own the domain

This part isn't true, you can use DNS challenge and they don't need to connect to your service. I have several services on my LAN that have never been accessible from the internet that have Let's Encrypt certs.

That sounds like the method OP is trying to use.

[–] just_another_person@lemmy.world 1 points 10 hours ago

Then why did you comment? 😂