doc/install/package/suse.md
{{< details >}}
{{< /details >}}
[!note] See supported platforms for the full list of supported distributions and architectures.
https://gitlab.example.com in the following commands with your
preferred GitLab URL. GitLab is automatically configured and started at that address.https:// URLs, GitLab automatically
requests a certificate with Let's Encrypt,
which requires inbound HTTP access and a valid hostname. You can also use
your own certificate,
or just use http:// (without the s) for an unencrypted URL.https://packages.gitlab.com/*
- https://storage.googleapis.com/packages-ops/*To open the needed firewall ports (80, 443, 22) and be able to access GitLab:
Enable and start the OpenSSH server daemon:
sudo systemctl enable --now sshd
With firewalld installed, open the firewall ports:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=ssh
sudo systemctl reload firewalld
To install GitLab, first add the GitLab package repository.
Install the needed packages:
sudo zypper install curl
Use the following script to add the GitLab repository (you can paste the
script's URL to your browser to see what it does before piping it to
bash):
{{< tabs >}}
{{< tab title="Enterprise Edition" >}}
curl --location "https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh" | sudo bash
{{< /tab >}}
{{< tab title="Community Edition" >}}
curl --location "https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh" | sudo bash
{{< /tab >}}
{{< /tabs >}}
Install GitLab using your system's package manager.
[!note] Setting the
EXTERNAL_URLis optional but recommended. If you don't set it during the installation, you can set it afterwards.
{{< tabs >}}
{{< tab title="Enterprise Edition" >}}
sudo EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ee
{{< /tab >}}
{{< tab title="Community Edition" >}}
sudo EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ce
{{< /tab >}}
{{< /tabs >}}
GitLab generates a random password and email address for the root
administrator account stored in /etc/gitlab/initial_root_password for 24 hours.
After 24 hours, this file is automatically removed for security reasons.
After GitLab is installed, go to the URL you set up and use the following credentials to sign in:
root/etc/gitlab/initial_root_passwordAfter signing in, change your password and email address.
You can customize your GitLab installation by setting the following optional
environment variables before installation. These variables only work during the first
installation and have no effect on subsequent reconfigure runs. For existing
installations, use the password from /etc/gitlab/initial_root_password or
reset the root password.
| Variable | Purpose | Required | Example |
|---|---|---|---|
EXTERNAL_URL | Sets the external URL for your GitLab instance | Recommended | EXTERNAL_URL="https://gitlab.example.com" |
GITLAB_ROOT_EMAIL | Custom email for the root administrator account | Optional | GITLAB_ROOT_EMAIL="[email protected]" |
GITLAB_ROOT_PASSWORD | Custom password (8 characters minimum) for the root administrator account | Optional | GITLAB_ROOT_PASSWORD="strongpassword" |
If GitLab can't detect a valid hostname during installation, reconfigure won't run automatically.
In this case, pass any needed environment variables to your first gitlab-ctl reconfigure command.
[!warning] While you can also set the initial password in
/etc/gitlab/gitlab.rbby settinggitlab_rails['initial_root_password'], it is not recommended. It's a security risk as the password is in clear text. If you have this configured, make sure to remove it after installation.
Choose your GitLab edition and customize with the environment variables above:
{{< tabs >}}
{{< tab title="Enterprise Edition" >}}
sudo GITLAB_ROOT_EMAIL="[email protected]" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ee
{{< /tab >}}
{{< tab title="Community Edition" >}}
sudo GITLAB_ROOT_EMAIL="[email protected]" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ce
{{< /tab >}}
{{< /tabs >}}
Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.
Twice a month, we send out the GitLab news you need to know, including new features, integrations, documentation, and behind the scenes stories from our development teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.
[!note] If you do not opt-in to the security newsletter, you will not receive security alerts.
After completing your installation, consider the recommended next steps, including authentication options and new user account restrictions.