Skip to content

Instantly share code, notes, and snippets.

@col
Last active January 19, 2016 09:37
Show Gist options
  • Save col/bf69a01a953a5bf1463c to your computer and use it in GitHub Desktop.
Save col/bf69a01a953a5bf1463c to your computer and use it in GitHub Desktop.
Setup_SSL_for_Dokku_App.md

Setup SSL for Dokku App

Create an SSL certificate signing request

dokku certs:generate <app_name> <mydomain>

Answer all the questions.

Submit that to an SSL signing authoority / online vendor. Wait for the cert to be generated.

Save the generated certificate as ssl.crt in the following path /home/dokku/<app_name>/tls/server.key.

Create a bundle crt file that contains your cert and the intermediate CA cert (you may need to include a root cert as well)

cat ssl.crt intermediate_ca.crt > bundle.crt

Tar up the bundle cert and the private key.

COPYFILE_DISABLE=1 tar cvf cert-key.tar bundle.crt server.key

Copy the cert-key.tar file to the server

scp cert-key.tar <mydomain>:<app_name>_bundle_cert_key.tar

Install the SSL cert

dokku certs:add <app_name> < <app_name>_bundle_cert_key.tar

Test the SSL is installed correctly using this tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment