Homelab,Network Infrastructure

Configuring Bitnami Gitlab on ESXi Behind NGINX Reverse Proxy

I wanted to be able to host and share my own git repositories. Here’s how I set up my personal Gitlab instance for self-hosting behind my NGINX reverse proxy.

Setup Steps:

  1. Download the GitLab CE virtual machine .OVA file from bitnami
  2. Deploy the .OVA file in ESXi as a new virtual machine (note: the OVA might not upload on its own through the NGINX proxy interface. If necessary, use the direct IP Address of the ESXi server rather than any reverse proxied subdomain links for this step)
  3. Once the deployment finishes, configure the storage, CPU, and memory limits for the new virtual machine (I used 4 CPU cores, 6GB of RAM, and 250GB of thin provisioned storage)
  4. Power on the new VM, and login with the default bitnami/bitnami username and password. You’ll be prompted to change the password – choose something secure
  5. Add a record to your NGINX Reverse Proxy sites-available file pointing to the newly created gitlab instance’s local IP address (see config below)
  6. Modify the bitnami instance host name to match the subdomain and domain assigned in your reverse proxy setup (not sure this was actually necessary, but I did it, and it worked…)
  7. Rename the automatic configuration script to prevent overwriting your hostname settings
  8. Edit the external_url setting in /etc/gitlab/gitlab.rb to contain your FQDN (ex: https://gitlab.dupuis.xyz)

NGINX Configuration:

   listen 443;
   server_name gitlab.dupuis.xyz;
   ssl on;
   ssl_certificate /etc/letsencrypt/live/dupuis.xyz/fullchain.pem;
   ssl_certificate_key /etc/letsencrpyt/live/dupuis.xyz/privkey.pem;
   location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-Forwarded-Proto https;
      proxy_redirect off;
      proxy_http_version 1.1;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.