Installing GitLab with Omnibus packages


  • Installation Requirements.
  • If you want to access your GitLab instance via a domain name, like, make sure the domain correctly points to the IP of the server where GitLab is being installed. You can check this using the command host
  • If you want to use HTTPS on your GitLab instance, make sure you have the SSL certificates for the domain ready. (Note that certain components like Container Registry which can have their own subdomains requires certificates for those subdomains also.)
  • If you want to send notification emails, install and configure a mail server (MTA) like Sendmail or Postfix. Alternatively, you can use other third party SMTP servers.

Installation and Configuration

These configuration settings are commonly used when configuring Omnibus GitLab. For a complete list of settings, see the README file.

Set up the initial password

Introduced in Omnibus GitLab 14.0.

By default, Omnibus GitLab automatically generates a password for the initial administrator user account (root) and stores it to /etc/gitlab/initial_root_password for at least 24 hours. For security reasons, after 24 hours, this file is automatically removed by the first gitlab-ctl reconfigure.

If GitLab can’t detect a valid hostname for the server during the installation, a reconfigure does not run.

To provide a custom initial root password, you have two options:

  • Pass the GITLAB_ROOT_PASSWORD environment variable to the installation command provided the hostname for the server is set up correctly. If during the installation GitLab doesn’t automatically perform a reconfigure, you have to pass the GITLAB_ROOT_PASSWORD variable to the first gitlab-ctl reconfigure run.
  • Before the first reconfigure, edit /etc/gitlab/gitlab.rb (create it if it doesn’t exist) and set:

    gitlab_rails['initial_root_password'] = '<my_strong_password>'

Both of these methods apply only during the initial database seeding, which happens during the first reconfigure. For subsequent reconfigure runs, neither of the aforementioned methods have any effect. In that case, use the random password in /etc/gitlab/initial_root_password to log in, or reset the root password.

Using Docker image

You can also use the Docker images provided by GitLab to install and configure a GitLab instance. Check the documentation to know more.