In a previous article I talked about switching to https.

Since the 3rd December, Let’s Encrypt is in public beta1, that means that everybody can have free trusted ssl certificates.

That’s right, you heard it.


What would be an agileek article without a little bit of Docker in it?


I will show you how to generate and use an ssl certificate with nginx.

First, you generate the certificate with:

docker run -it --rm -p 443:443 --name letsencrypt -v /etc/letsencrypt:/etc/letsencrypt -v /var/lib/letsencrypt:/var/lib/letsencrypt --server certonly -a standalone -d

Then you configure your nginx in order to use this certificates :

ssl_certificate      /etc/letsencrypt/live/;
ssl_certificate_key  /etc/letsencrypt/live/;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;

# modern configuration. tweak to your needs.
ssl_protocols TLSv1.1 TLSv1.2;
#    ssl_prefer_server_ciphers on;

# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
add_header Strict-Transport-Security max-age=15768000;

# OCSP Stapling ---
# fetch OCSP records from URL in ssl_certificate and cache them
ssl_stapling on;
ssl_stapling_verify on;

    ## verify chain of trust of OCSP response using Root CA and Intermediate certs

server {
        listen       443 ssl;

        location / {            
            add_header Content-Type text/plain;
            return 200 'Take a look at this awesome certificate!';

Aaaaaaand it’s done.

You can look at and see that everything is so green

  1. You can donate to them: or to EFF: