Configuring a self-signed SSl certificate

The easiest way is not to attempt to set the certificates manually in gitlab.rb, but do this instead:

external_url ""
nginx['redirect_http_to_https'] = true
letsencrypt['enable'] = false

assuming that is the name of your server, then do:

mkdir /etc/gitlab/ssl

and in this directory put the SSL certificate and key files, so that they are named the same as your server, so:

then do:

gitlab-ctl reconfigure

I do this, with self-signed, or even with commercial certificates that I purchased, and it works every time. The key part, is putting the certs in /etc/gitlab.ssl and making sure they are the same name as your server FQDN as the example above.

1 Like