Gitlab with Docker and behind NGINX

On my server I host everything in a separate docker container and behind the nginx proxy manager.
I have a few issues:

  • The GitLab container still uses port 22 but in nginx I configured a stream that maps port 2222 to the container on port 22. How can I change the URL within GitLab to say but still uses port 22?
  • I have a wildcard certificate for all my subdomains so the gitlab container should run in http mode so it doesn’t request a ssl certificate (external_url ‘’). The connection to nginx is over https. How can I make the URL in GitLab say https butt doesn’t request a certificate?


image: ‘gitlab/gitlab-ce:latest’
container_name: gitlab-server
restart: unless-stopped
external_url ‘
gitlab_rails[‘gitlab_shell_ssh_port’] = 2222
letsencrypt[‘enabled’] = false
nginx[‘enable’] = true
nginx[‘listen_port’] = 80
nginx[‘listen_https’] = false
- ‘./data/config:/etc/gitlab’
- ‘./data/logs:/var/log/gitlab’
- ‘./data/data:/var/opt/gitlab’
shm_size: ‘256m’

In my NGINX Reverse Proxy container I added a proxy to gitlab-server:80 over http and a stream from 2222 to gitlab-server:22

Solved it!