http works just fine

HTTP should not work, see "Redirect HTTP requests to HTTPS"

By default, when you specify an external_url starting with 'https', NGINX will no longer listen for unencrypted HTTP traffic on port 80.
If you want to redirect all HTTP traffic to HTTPS you can use the redirect_http_to_https setting.

external_url "https://gitlab.example.com"
nginx['redirect_http_to_https'] = true

So double-check your gitlab.rb, then sudo gitlab-ctl reconfigure

Answer from VonC on Stack Overflow
🌐
GitLab
forum.gitlab.com › infrastructure as code & cloud native
Gitlab-ce via docker container, shared CA certificate, SSL setup - Infrastructure as Code & Cloud Native - GitLab Forum
November 20, 2019 - Hi everybody, i am trying to get the following use case implemented: Web access for Gitlab-ce only via https, run as a docker container, with a domestically (distributed) CA certificate and server key/certificate pair. …
🌐
Docker Community
forums.docker.com › general
Enabling https in Gitlab on Docker - General - Docker Community Forums
August 10, 2018 - I want to mention up front, that ... I have installed Gitlab (gitlabce:latest) on Docker (17.05.0-0379) on my Synology NAS (918+ with DSM 6.2.23739) through the GUI. Gitlab per se worked right away, but I would like to force https connection, when someone from outside my network ...
Discussions

Gitlab Docker uses HTTPS despite being disabled
Problem to solve Describe your question in as much detail as possible: I’m trying to run gitlab as a docker container, behind a reverse proxy, however the container keeps trying to use https, regardless of me disabling it. What are you seeing, and how does that differ from what you expect to see? More on forum.gitlab.com
🌐 forum.gitlab.com
0
0
November 4, 2024
Change the SSL Certs in Docker Enviroment (GitLab 15.0.2)
I have setup a docker-GitLab with following docker-compose.yml: version: '3.6' services: web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'se69j4h32od.company.de' environment: GITL… More on forum.gitlab.com
🌐 forum.gitlab.com
0
0
July 18, 2022
Gitlab: Set external url to https without certificate - Stack Overflow
This fixed an issue I was having with infinite redirects from https://gitlab to https://gitlab:443 and back again when running the Docker image behind a reverse proxy. More on stackoverflow.com
🌐 stackoverflow.com
HTTP to HTTPS redirection with Docker Compose
Hello, I have just installed GitLab with Docker. Now I want to do an http to https redirection, e.g. I would redirect: http://localhost to https://localhost I have tried with: nginx[‘redirect_http_to_https’] = true accordingly to: https://docs.gitlab.com/omnibus/settings/nginx.html but ... More on forum.gitlab.com
🌐 forum.gitlab.com
0
0
January 5, 2020
🌐
GitHub
github.com › danieleagle › gitlab-https-docker › blob › master › README.md
gitlab-https-docker/README.md at master · danieleagle/gitlab-https-docker
GitLab Docker files to support self-hosted instance over HTTPS. - gitlab-https-docker/README.md at master · danieleagle/gitlab-https-docker
Author   danieleagle
🌐
Programster
blog.programster.org › dockerized-gitlab-configure-ssl
Dockerized GitLab - Configure SSL | Programster's Blog
February 21, 2022 - nginx['enable'] = true nginx['client_max_body_size'] = '250m' nginx['redirect_http_to_https'] = true nginx['redirect_http_to_https_port'] = 80 · Then, further down, un-comment the nginx['ssl_certificate'] and nginx['ssl_certificate_key'] lines, and provide values for where your certificate files are (from the first step). E.g. nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.mydomain.com/certificate.pem" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.mydomain.com/certificate.key"
🌐
GitHub
github.com › danieleagle › gitlab-https-docker
GitHub - danieleagle/gitlab-https-docker: GitLab Docker files to support self-hosted instance over HTTPS.
GitLab Docker files to support self-hosted instance over HTTPS. - danieleagle/gitlab-https-docker
Starred by 77 users
Forked by 38 users
🌐
GitHub
github.com › danieleagle › gitlab-https-docker › blob › master › docker-compose.yml
gitlab-https-docker/docker-compose.yml at master · danieleagle/gitlab-https-docker
GitLab Docker files to support self-hosted instance over HTTPS. - gitlab-https-docker/docker-compose.yml at master · danieleagle/gitlab-https-docker
Author   danieleagle
Find elsewhere
🌐
GitLab
docs.gitlab.com › install › docker › configuration
Configure GitLab running in a Docker container | GitLab Docs
GitLab occupies specific ports inside the container. If you want to use different host ports from the default ports 80 (HTTP), 443 (HTTPS), or 22 (SSH), you need to add a separate --publish directive to the docker run command.
🌐
GitLab
forum.gitlab.com › how to use gitlab › self-managed
Gitlab Docker uses HTTPS despite being disabled - Self-managed - GitLab Forum
November 4, 2024 - Problem to solve Describe your question in as much detail as possible: I’m trying to run gitlab as a docker container, behind a reverse proxy, however the container keeps trying to use https, regardless of me disabling it. What are you seeing, and how does that differ from what you expect to see?
🌐
GitLab
docs.gitlab.com › install › docker › installation
Install GitLab in a Docker container | GitLab Docs
This command downloads and starts a GitLab container, and publishes ports needed to access SSH, HTTP and HTTPS. All GitLab data are stored as subdirectories of $GITLAB_HOME. The container automatically restarts after a system reboot. ... sudo docker run --detach \ --hostname gitlab.example.com ...
🌐
GitLab
forum.gitlab.com › how to use gitlab › self-managed
Change the SSL Certs in Docker Enviroment (GitLab 15.0.2) - Self-managed - GitLab Forum
July 18, 2022 - I have setup a docker-GitLab with following docker-compose.yml: version: '3.6' services: web: image: 'gitlab/gitlab-ce:latest' restart: always hostname: 'se69j4h32od.company.de' environment: GITLAB_OMNIBUS_CONFIG: | external_url 'https://se69j4h32od.company.de' gitlab_rails['initial_root_password'] = 'topsecretpassword' # Add any other gitlab.rb configuration here, each on its own line ports: - '85:80' - '4443:443' - '2224:22...
🌐
Danieleagle
danieleagle.com › home › gitlab ce with https using docker
GitLab CE with HTTPS Using Docker - Daniel Eagle
November 17, 2025 - The author transitioned from TFS to GitLab CE due to Docker’s compatibility with Linux. A GitHub repository contains detailed instructions for setting up GitLab CE with HTTPS; the README.md in this repo provides updates.
🌐
GitHub
github.com › sameersbn › docker-gitlab
GitHub - sameersbn/docker-gitlab: Dockerized GitLab
When the user comes for the first time it sees a header from the server which states for how long from now this site should only be reachable via HTTPS - that's the HSTS max-age value. With NGINX_HSTS_MAXAGE you can configure that value. The default value is 31536000 seconds. If you want to disable an already sent HSTS MAXAGE value, set it to 0. docker run --name gitlab -d \ --env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \ --env 'NGINX_HSTS_MAXAGE=2592000' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ sameersbn/gitlab:18.6.2
Starred by 8.1K users
Forked by 2.2K users
Languages   Shell 91.0% | Ruby 5.0% | Dockerfile 2.8% | Makefile 1.2% | Shell 91.0% | Ruby 5.0% | Dockerfile 2.8% | Makefile 1.2%
🌐
Medium
gitlabfan.com › setting-up-your-own-fully-functional-gitlab-https-registry-ci-runners-79901ac617c0
Setting up your own fully functional GitLab: HTTPS, Registry, CI + Runners | by GitLab Fan | GitLab Fan Club
August 25, 2017 - Enabled registry_external_url ‘https://gitlab.domain.name:4567’ · Reconfigure & restart. It works! I have my registry tab: ... I can push docker images to the built-in registry!
🌐
Mike Polinowski
mpolinowski.github.io › devops › gitops › install gitlab with docker-compose (debian bullseye)
Install Gitlab with Docker-Compose (Debian Bullseye) | Mike Polinowski
docker-compose up -d docker-compose ps Name Command State Ports ---------------------------------------------------------------------------------------------------------- gitlab-ce /assets/wrapper Up (unhealthy) 0.0.0.0:2222->22/tcp,:::2222->22/tcp, 0.0.0.0:8443->443/tcp,:::8443->443/tcp, 0.0.0.0:80->80/tcp,:::80->80/tcp · Visit https...
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
HTTP to HTTPS redirection with Docker Compose - GitLab CI/CD - GitLab Forum
January 5, 2020 - Hello, I have just installed GitLab with Docker. Now I want to do an http to https redirection, e.g. I would redirect: http://localhost to https://localhost I have tried with: nginx[‘redirect_http_to_https’] = true accordingly to: https://docs.gitlab.com/omnibus/settings/nginx.html but ...
🌐
GitLab
forum.gitlab.com › how to use gitlab › self-managed
Configure HTTPS for gitlab with self hosted certificate - Self-managed - GitLab Forum
January 10, 2024 - I have create the self-signed ... looks like into my docker container: external_url 'https://{local server ip address}:8080' nginx['enable'] = true nginx['redirect_......
🌐
Docker Hub
hub.docker.com › r › ulm0 › gitlab
ulm0/gitlab - Docker Image
docker run -d \ --hostname ... /srv/gitlab/data:/var/opt/gitlab \ ulm0/gitlab Copy · You can then access your GitLab instance at http://1.1.1.1/ and https://1.1.1.1/....
🌐
Stack Overflow
stackoverflow.com › questions › 79162956 › use-https-with-gitlab-in-docker-container
Use HTTPS with Gitlab in Docker Container - Stack Overflow
It is connected to a subdomain (gitlab.example.com) using Nginx on the host system. Incoming calls to https://gitlab.example.com are then "proxy_pass" to the Docker Container at http://localhost:8081.