Docker Community Forums

Share and learn in the Docker community.

Configure GitLab Docker container with Plesk and LetsEncrypt


Hi I have an issue with my Docker GitLab setup.

What I’m trying to achieve:

  • running GitLab inside a Docker container
  • access GitLab through a subdomain ( at ports 80 and 443 for https
  • manage SSL through a wildcard certificate for * provided by LetsEncrypt and Plesk (already in use for subdomains managed by Plesk)
  • beeing able to run build tasks in GitLab container (npm scripts etc.) and finally move specific output files to directories of subdomains managed by Plesk (outside of container)

What I did so far:

  • got a v-server running Ubuntu 18.04.2 with preinstalled Plesk Onyx 17.8.11
  • setup mydomain through Plesk
  • setup LetsEncrypt wildcard certificate for mydomain through Plesk
  • installed Docker via ssh (not Plesk)
  • ran GitLab inside a container at

I’m completely new to server envs and Docker so I’m not sure about the needed structure of things. Maybe you guys know what to do?



I solved my problem by:

  1. Creating a subdomain in plesk
  2. Add existing wildcard certificate to subdomain
  3. Installing nginx service (and docker extension, optional)
  4. Running gitlab container with specific ports for http, https and ssh
  5. Routing ports in subdomain settings either with additional nginx directives or through docker extension

But there a still 2 problems to solve:
I can connect using the ssl certificate provided by plesk, but the Gitlab connection itself is http only. So I need a seperate certificate for Gitlab

I can only route one port using docker extension or additional nginx directives. So I can’t use e.g. Sourcetree to access Gitlab over ssh, as I can’t tell Sourcetree to use port xxx for ssh connection. I still need to find a solution for this one.


Nope I did it manually myself, as my problem also adresses docker. Either way, not a nice way to reply.