Chris Stryczynski

Software Developer / Consultant

How to use Letsencrypt certbot with your own webserver

It’s 2018, you should definitely be using SSL on you website!

If you want to integrate it with your existing web server rather than having to rely on certbot’s own web server configuration, in other words serving the challenge files directly from your web server:

certbot certonly -d --webroot --webroot-path path/to/your/webroot/

And then when you want to renew:

certbot renew -d --webroot --webroot-path path/to/your/webroot/

It’s that simple! :)

Don’t forget you need the acme challenge file to be publicly accessible. This nginx config might be useful if it’s not accessible be default:

    location ^~ /.well-known/acme-challenge/ {
        allow all;
        default_type "text/plain";
        root /path/to/your/webroot/;