Think I’ve gone down the rabbit hole on this one.

I have more than one Debian machine that I host apps on. I want to serve them with https, so I decided it was best to centrally get the domain cert/key (I’ve used certwarden) and use a script/cron job on each server to get the certs. Then use caddy to reverse-proxy.

So, after some research I decided that certs should be placed in /etc/SSL/certs (keys in /etc/SSL/private). Problem is caddy can’t get to them. I’ve tried messing around with permissions etc but I suspect I’m running into issues because I’m not doing this the proper way.

What is the proper way of doing it? Or is there a much easier solution?

  • jobbies@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    7
    ·
    13 hours ago

    Because I have more than one server. It made sense to manage the cert in one place then distribute it to the places it needs to be.

    Caddy because its easy to use.

    • BlackEco@lemmy.blackeco.com
      link
      fedilink
      English
      arrow-up
      12
      ·
      12 hours ago

      But you’re still using Caddy as the sole reverse proxy, don’t you? Do you have multiple Caddy instances that require access to a single certificate?

      • Appoxo@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 hours ago

        Thing is, you may have some devices that should be accessible even if the reverse proxy is unreachable.
        And if you have HSTS and wamt to reach a device under the same local DNS suffix (example: External -> service.example.org, Internal: service.int.examole.org) you can’t just bypass the https warning.
        Same for devices reachable over RDP, SSH, etc. etc.

    • poVoq@slrpnk.net
      link
      fedilink
      English
      arrow-up
      6
      ·
      12 hours ago

      If you switch to the dns-01 challenge you can just generate the certs on multiple servers hasselfree. And as a bonus you can get wildcard certs for subdomains.