Downgrade to 2.9 till the porkbun plugin gets updated to work withb2.10.
Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
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.
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.
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.
Hmmm. You're right; it's a mechanism I've never used because it's more work and it is slower, and I forget about it. All you need to do is be able to prove you own the domain, and control over the DNS record is certainly viable.
Is that what Porkbun does? Because Caddy can automate the http method, but not the DNS challenge method, because both require a handshake and that's updating the DNS record.
Porkbun is a domain registrar, so I'm guessing OP is using their API to edit a DNS record with the challenge so Let's Encrypt can prove ownership of the domain. Caddy can automate that, however, you need a Caddy build with a plugin for the registrar (use xcaddy), and then supply login details in the Caddyfile.
Here's the plugin for porkbun, and the README documents how to use it.
I prefer doing it this way so I don't need to expose my service to the internet to get a TLS cert, and I can also keep port 80 blocked.
Then why did you comment? 😂
Because they were wondering if it was a Caddy issue, and I'll bet real money it isn't.
Being able to exclude components from being a possible source of the issue is critical to problem solving.