Importing existing certificates

Just discovered caddy and it looks a good fit for what I am trying to do. I have an existing setup using docker and nginx that is (mostly) working to reverse proxy docker containers and automatically get LE certificates for selected containers.

Is there a way I can import the LE certificates from this setup into a caddy environment?

What about sites that are using other certificate sites - can caddy work with ‘static’ certificates?

Thanks

Hey @cannfoddr, welcome.

You can “bring your own certificates” by using the tls directive: https://caddyserver.com/docs/tls - like so: tls cert.pem key.pem. But this is the traditional way of using TLS, you’ll have to renew your certificates and reload the web server like you’re used to.

You could import certificates but you’d have to follow the file and folder structure for the $CADDYPATH (~/.caddy). It is unlikely your existing tooling exports cert metadata as .json.

If you don’t have many subdomains and if you don’t make switches like this more than once or twice a week (I imagine this is a one-time thing anyway!) you can just have Caddy get new certificates and manage them, that’s probably easiest. But if you have a lot of subdomains you could run into LE rate limits.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.