Free SSL Quickly and Easily with Dokku and Let’s Encrypt
Dokku gives you a Heroku-like workflow running on your own hardware. Let’s Encrypt gives you free SSL. Putting them together only takes 3 commands and is probably the fastest way to deploy SSL on any platform. This extremely short guide assumes a working dokku v0.4.0+ setup.
1. Install the plugin. This must be run on the server.
$ sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
2. Set an email address to be used as the Let’s Encrypt contact
$ dokku letsencrypt:email <app name> <an email address>
3. Enable (or renew) your certificate for the app
$ dokku letsencrypt <app name>
Done. Visiting your app will now redirect you to https. To encrypt other applications you only need to run commands 2 and 3. The Dokku Let’s Encrypt plugin offers more commands but these are the only ones you need to get setup and keep your app encrypted. The only caveat is that certificates expire after 90 days but this is easily solved by placing command #3 above in a cron job.