this post was submitted on 17 Sep 2024
29 points (100.0% liked)

Selfhosted

40198 readers
749 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 1 year ago
MODERATORS
 

Hopefully you all can help!

I've been to hundreds of threads over the last few days trying to puzzle this out, with no luck.

The problem:

  1. Caddy v2 with acme HTTP-1 ACME challenge (Changed from TLS-ALPN challenge)
  2. Cloudflair DNS with proxy ON
  3. All cloudflair https is off
  4. This is a .co domain

Any attempt to get certificates fails with an invalid challenge response. If I try and navigate (or curl) to the challenge directly I always get SSL validation errors as if all the requests are trying to upgrade to HTTPS.

I'm kind of at my wit's end here and am running out of things to try.

If I turn Cloud flare proxy off and go back to TLS-ALPN challenge, everything works as expected. However I do not wish to expose myself directly and want to use the proxy.

What should I be doing?


I have now solved this by using Cloudflair DNS ACME challenge. Cloudflair SSL turned back on. Everything works as expected now, I can have external clients terminate SSL at cloudflair, cloudflair communicate with my proxy through HTTPS, and have internal clients terminate SSL at caddy.

you are viewing a single comment's thread
view the rest of the comments
[–] Max_P@lemmy.max-p.me 6 points 2 months ago (1 children)

If you're behind Cloudflare, don't. Just get an origin certificate from CF, it's a cert that CF trust between itself and your server. By using Cloudflare you're making Cloudflare responsible for your cert.

[–] douglasg14b@lemmy.world 1 points 1 month ago* (last edited 1 month ago)

I stated in the OP that cloudflair HTTPS is off :/

I'm not using cloudflare for the certificate. I also can't use the cloud for certificate anyways for internal services through a loopback.

Similarly you can have SSL termination at multiple layers. That's works I have services that proxy through multiple SSL terminations. The issue that I'm having is that the ACME challenge seems to be having issues, these issues are documented and explained in various GitHub threads, however the set of solutions are seemingly different and convoluted for different environments.

This is why I'm asking this question here after having done a reasonable amount of research and trial and error.