Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use existing let's encrypt certificates in caddy 2

I'm evaluating the possibility of changing my main webserver from nginx to caddy 2.
Is there any way to use existing letsencrypt certificates managed by certbot in caddy 2?

like image 643
fimdomeio Avatar asked Sep 05 '25 07:09

fimdomeio


1 Answers

You can. You need to have the following line in your Caddyfile. You have to obtain cert.pem and key.pem files and place them in same directory as Caddyfile.

tls cert.pem key.pem

You can refer this official documentation here. https://caddyserver.com/docs/v2-upgrade#tls

like image 50
navule Avatar answered Sep 08 '25 01:09

navule