From dcbf9e37c2f7aee3fbc519cd228764fa9ce0fd2c Mon Sep 17 00:00:00 2001 From: GitLab Duo Date: Thu, 18 Sep 2025 22:00:19 +0000 Subject: [PATCH] Duo Workflow: Resolve issue #570513 --- doc/install/next_steps.md | 8 +++ doc/install/package/almalinux.md | 89 +++++++++++++++---------- doc/install/package/amazonlinux_2.md | 89 +++++++++++++++---------- doc/install/package/amazonlinux_2023.md | 89 +++++++++++++++---------- doc/install/package/debian.md | 89 +++++++++++++++---------- doc/install/package/suse.md | 89 +++++++++++++++---------- doc/install/package/ubuntu.md | 89 +++++++++++++++---------- 7 files changed, 332 insertions(+), 210 deletions(-) diff --git a/doc/install/next_steps.md b/doc/install/next_steps.md index edee4c548457de..c4007278c6cfa9 100644 --- a/doc/install/next_steps.md +++ b/doc/install/next_steps.md @@ -15,6 +15,14 @@ title: Steps after installing GitLab Here are a few resources you might want to check out after completing the installation. +## Initial sign-in + +After you install GitLab, you can visit the URL you set up during installation +and sign in as the user `root`. + +If you haven't set up your own password during installation, a random one is assigned. You can +find it in the server you installed GitLab, under `/etc/gitlab/initial_root_password`. + ## Email and notifications - [SMTP](https://docs.gitlab.com/omnibus/settings/smtp.html): Configure SMTP diff --git a/doc/install/package/almalinux.md b/doc/install/package/almalinux.md index abab83caf8609d..299eb368684004 100644 --- a/doc/install/package/almalinux.md +++ b/doc/install/package/almalinux.md @@ -33,10 +33,9 @@ supported distributions and architectures. - See the [installation requirements](../requirements.md) to learn about the minimum hardware requirements. - Before you begin, make sure you have correctly - [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns), - and change `https://gitlab.example.com` to the URL at which you want to access - your GitLab instance. The installation automatically configures and starts - GitLab at that URL. + [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns). + Replace `https://gitlab.example.com` in the commands below with your + preferred GitLab URL. GitLab is automatically configured and started at that address. - For `https://` URLs, GitLab automatically [requests a certificate with Let's Encrypt](https://docs.gitlab.com/omnibus/settings/ssl/#enable-the-lets-encrypt-integration), which requires inbound HTTP access and a valid hostname. You can also use @@ -98,28 +97,57 @@ To install GitLab, first add the GitLab package repository. ## Install the package -Install GitLab using your system's package manager. You can customize the -initial setup by configuring environment variables before installation. +Install GitLab using your system's package manager. -If you don't customize the root credentials during installation: +{{< alert type="note" >}} -- GitLab generates a random password and email address for the root - administrator account. -- The password is stored in `/etc/gitlab/initial_root_password` for 24 hours. -- After 24 hours, this file is automatically removed for security reasons. +Setting the `EXTERNAL_URL` is optional but recommended. +If you don't set it during the installation, you can +[set it afterwards](https://docs.gitlab.com/omnibus/settings/configuration/#configure-the-external-url-for-gitlab). -{{< alert type="note" >}} -While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting -`gitlab_rails['initial_root_password'] = "password"`, it is not recommended. If -you do set the password with this method, be sure to remove the password from -`/etc/gitlab/gitlab.rb` as it only gets read with the first reconfigure after -the package is installed. {{< /alert >}} +{{< tabs >}} + +{{< tab title="Enterprise Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ee +``` + +{{< /tab >}} + +{{< tab title="Community Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" dnf 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. + +## Initial sign-in + +After GitLab is installed, you can navigate to the URL you set up +and use the following credentials to sign in: + +- Username: `root` +- Password: See `/etc/gitlab/initial_root_password` + +After signing in, you should change your [password](../../user/profile/user_passwords.md#change-your-password) +and [email address](../../user/profile/_index.md#add-emails-to-your-user-profile). + +## Advanced configuration + ### Available environment variables You can customize your GitLab installation by setting the following optional -environment variables. **These variables only work during the first +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](../../security/reset_user_password.md). @@ -134,7 +162,14 @@ installations, use the password from `/etc/gitlab/initial_root_password` or 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. {{< /alert >}} -### Installation commands +{{< alert type="warning" >}} + +While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting +`gitlab_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. + +{{< /alert >}} Choose your GitLab edition and customize with the environment variables above: @@ -142,14 +177,6 @@ Choose your GitLab edition and customize with the environment variables above: {{< tab title="Enterprise Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ee -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ee ``` @@ -158,14 +185,6 @@ sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" {{< tab title="Community Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ce -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ce ``` diff --git a/doc/install/package/amazonlinux_2.md b/doc/install/package/amazonlinux_2.md index 3531629051afe3..f642f2492b9202 100644 --- a/doc/install/package/amazonlinux_2.md +++ b/doc/install/package/amazonlinux_2.md @@ -27,10 +27,9 @@ supported distributions and architectures. - See the [installation requirements](../requirements.md) to learn about the minimum hardware requirements. - Before you begin, make sure you have correctly - [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns), - and change `https://gitlab.example.com` to the URL at which you want to access - your GitLab instance. The installation automatically configures and starts - GitLab at that URL. + [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns). + Replace `https://gitlab.example.com` in the commands below with your + preferred GitLab URL. GitLab is automatically configured and started at that address. - For `https://` URLs, GitLab automatically [requests a certificate with Let's Encrypt](https://docs.gitlab.com/omnibus/settings/ssl/#enable-the-lets-encrypt-integration), which requires inbound HTTP access and a valid hostname. You can also use @@ -92,28 +91,57 @@ To install GitLab, first add the GitLab package repository. ## Install the package -Install GitLab using your system's package manager. You can customize the -initial setup by configuring environment variables before installation. +Install GitLab using your system's package manager. -If you don't customize the root credentials during installation: +{{< alert type="note" >}} -- GitLab generates a random password and email address for the root - administrator account. -- The password is stored in `/etc/gitlab/initial_root_password` for 24 hours. -- After 24 hours, this file is automatically removed for security reasons. +Setting the `EXTERNAL_URL` is optional but recommended. +If you don't set it during the installation, you can +[set it afterwards](https://docs.gitlab.com/omnibus/settings/configuration/#configure-the-external-url-for-gitlab). -{{< alert type="note" >}} -While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting -`gitlab_rails['initial_root_password'] = "password"`, it is not recommended. If -you do set the password with this method, be sure to remove the password from -`/etc/gitlab/gitlab.rb` as it only gets read with the first reconfigure after -the package is installed. {{< /alert >}} +{{< tabs >}} + +{{< tab title="Enterprise Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" yum install gitlab-ee +``` + +{{< /tab >}} + +{{< tab title="Community Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" yum 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. + +## Initial sign-in + +After GitLab is installed, you can navigate to the URL you set up +and use the following credentials to sign in: + +- Username: `root` +- Password: See `/etc/gitlab/initial_root_password` + +After signing in, you should change your [password](../../user/profile/user_passwords.md#change-your-password) +and [email address](../../user/profile/_index.md#add-emails-to-your-user-profile). + +## Advanced configuration + ### Available environment variables You can customize your GitLab installation by setting the following optional -environment variables. **These variables only work during the first +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](../../security/reset_user_password.md). @@ -128,7 +156,14 @@ installations, use the password from `/etc/gitlab/initial_root_password` or 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. {{< /alert >}} -### Installation commands +{{< alert type="warning" >}} + +While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting +`gitlab_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. + +{{< /alert >}} Choose your GitLab edition and customize with the environment variables above: @@ -136,14 +171,6 @@ Choose your GitLab edition and customize with the environment variables above: {{< tab title="Enterprise Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" yum install gitlab-ee -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" yum install gitlab-ee ``` @@ -152,14 +179,6 @@ sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" {{< tab title="Community Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" yum install gitlab-ce -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" yum install gitlab-ce ``` diff --git a/doc/install/package/amazonlinux_2023.md b/doc/install/package/amazonlinux_2023.md index cf55f99026a13f..4209faad75dec7 100644 --- a/doc/install/package/amazonlinux_2023.md +++ b/doc/install/package/amazonlinux_2023.md @@ -27,10 +27,9 @@ supported distributions and architectures. - See the [installation requirements](../requirements.md) to learn about the minimum hardware requirements. - Before you begin, make sure you have correctly - [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns), - and change `https://gitlab.example.com` to the URL at which you want to access - your GitLab instance. The installation automatically configures and starts - GitLab at that URL. + [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns). + Replace `https://gitlab.example.com` in the commands below with your + preferred GitLab URL. GitLab is automatically configured and started at that address. - For `https://` URLs, GitLab automatically [requests a certificate with Let's Encrypt](https://docs.gitlab.com/omnibus/settings/ssl/#enable-the-lets-encrypt-integration), which requires inbound HTTP access and a valid hostname. You can also use @@ -92,28 +91,57 @@ To install GitLab, first add the GitLab package repository. ## Install the package -Install GitLab using your system's package manager. You can customize the -initial setup by configuring environment variables before installation. +Install GitLab using your system's package manager. -If you don't customize the root credentials during installation: +{{< alert type="note" >}} -- GitLab generates a random password and email address for the root - administrator account. -- The password is stored in `/etc/gitlab/initial_root_password` for 24 hours. -- After 24 hours, this file is automatically removed for security reasons. +Setting the `EXTERNAL_URL` is optional but recommended. +If you don't set it during the installation, you can +[set it afterwards](https://docs.gitlab.com/omnibus/settings/configuration/#configure-the-external-url-for-gitlab). -{{< alert type="note" >}} -While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting -`gitlab_rails['initial_root_password'] = "password"`, it is not recommended. If -you do set the password with this method, be sure to remove the password from -`/etc/gitlab/gitlab.rb` as it only gets read with the first reconfigure after -the package is installed. {{< /alert >}} +{{< tabs >}} + +{{< tab title="Enterprise Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ee +``` + +{{< /tab >}} + +{{< tab title="Community Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" dnf 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. + +## Initial sign-in + +After GitLab is installed, you can navigate to the URL you set up +and use the following credentials to sign in: + +- Username: `root` +- Password: See `/etc/gitlab/initial_root_password` + +After signing in, you should change your [password](../../user/profile/user_passwords.md#change-your-password) +and [email address](../../user/profile/_index.md#add-emails-to-your-user-profile). + +## Advanced configuration + ### Available environment variables You can customize your GitLab installation by setting the following optional -environment variables. **These variables only work during the first +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](../../security/reset_user_password.md). @@ -128,7 +156,14 @@ installations, use the password from `/etc/gitlab/initial_root_password` or 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. {{< /alert >}} -### Installation commands +{{< alert type="warning" >}} + +While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting +`gitlab_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. + +{{< /alert >}} Choose your GitLab edition and customize with the environment variables above: @@ -136,14 +171,6 @@ Choose your GitLab edition and customize with the environment variables above: {{< tab title="Enterprise Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ee -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ee ``` @@ -152,14 +179,6 @@ sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" {{< tab title="Community Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ce -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ce ``` diff --git a/doc/install/package/debian.md b/doc/install/package/debian.md index f88b140f451648..96e9535de33346 100644 --- a/doc/install/package/debian.md +++ b/doc/install/package/debian.md @@ -28,10 +28,9 @@ supported distributions and architectures. - See the [installation requirements](../requirements.md) to learn about the minimum hardware requirements. - Before you begin, make sure you have correctly - [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns), - and change `https://gitlab.example.com` to the URL at which you want to access - your GitLab instance. The installation automatically configures and starts - GitLab at that URL. + [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns). + Replace `https://gitlab.example.com` in the commands below with your + preferred GitLab URL. GitLab is automatically configured and started at that address. - For `https://` URLs, GitLab automatically [requests a certificate with Let's Encrypt](https://docs.gitlab.com/omnibus/settings/ssl/#enable-the-lets-encrypt-integration), which requires inbound HTTP access and a valid hostname. You can also use @@ -93,28 +92,57 @@ To install GitLab, first add the GitLab package repository. ## Install the package -Install GitLab using your system's package manager. You can customize the -initial setup by configuring environment variables before installation. +Install GitLab using your system's package manager. -If you don't customize the root credentials during installation: +{{< alert type="note" >}} -- GitLab generates a random password and email address for the root - administrator account. -- The password is stored in `/etc/gitlab/initial_root_password` for 24 hours. -- After 24 hours, this file is automatically removed for security reasons. +Setting the `EXTERNAL_URL` is optional but recommended. +If you don't set it during the installation, you can +[set it afterwards](https://docs.gitlab.com/omnibus/settings/configuration/#configure-the-external-url-for-gitlab). -{{< alert type="note" >}} -While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting -`gitlab_rails['initial_root_password'] = "password"`, it is not recommended. If -you do set the password with this method, be sure to remove the password from -`/etc/gitlab/gitlab.rb` as it only gets read with the first reconfigure after -the package is installed. {{< /alert >}} +{{< tabs >}} + +{{< tab title="Enterprise Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ee +``` + +{{< /tab >}} + +{{< tab title="Community Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" apt 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. + +## Initial sign-in + +After GitLab is installed, you can navigate to the URL you set up +and use the following credentials to sign in: + +- Username: `root` +- Password: See `/etc/gitlab/initial_root_password` + +After signing in, you should change your [password](../../user/profile/user_passwords.md#change-your-password) +and [email address](../../user/profile/_index.md#add-emails-to-your-user-profile). + +## Advanced configuration + ### Available environment variables You can customize your GitLab installation by setting the following optional -environment variables. **These variables only work during the first +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](../../security/reset_user_password.md). @@ -129,7 +157,14 @@ installations, use the password from `/etc/gitlab/initial_root_password` or 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. {{< /alert >}} -### Installation commands +{{< alert type="warning" >}} + +While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting +`gitlab_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. + +{{< /alert >}} Choose your GitLab edition and customize with the environment variables above: @@ -137,14 +172,6 @@ Choose your GitLab edition and customize with the environment variables above: {{< tab title="Enterprise Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ee -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ee ``` @@ -153,14 +180,6 @@ sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" {{< tab title="Community Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ce -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ce ``` diff --git a/doc/install/package/suse.md b/doc/install/package/suse.md index ee7dbda389c451..12b6d88d167774 100644 --- a/doc/install/package/suse.md +++ b/doc/install/package/suse.md @@ -29,10 +29,9 @@ supported distributions and architectures. - See the [installation requirements](../requirements.md) to learn about the minimum hardware requirements. - Before you begin, make sure you have correctly - [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns), - and change `https://gitlab.example.com` to the URL at which you want to access - your GitLab instance. The installation automatically configures and starts - GitLab at that URL. + [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns). + Replace `https://gitlab.example.com` in the commands below with your + preferred GitLab URL. GitLab is automatically configured and started at that address. - For `https://` URLs, GitLab automatically [requests a certificate with Let's Encrypt](https://docs.gitlab.com/omnibus/settings/ssl/#enable-the-lets-encrypt-integration), which requires inbound HTTP access and a valid hostname. You can also use @@ -94,28 +93,57 @@ To install GitLab, first add the GitLab package repository. ## Install the package -Install GitLab using your system's package manager. You can customize the -initial setup by configuring environment variables before installation. +Install GitLab using your system's package manager. -If you don't customize the root credentials during installation: +{{< alert type="note" >}} -- GitLab generates a random password and email address for the root - administrator account. -- The password is stored in `/etc/gitlab/initial_root_password` for 24 hours. -- After 24 hours, this file is automatically removed for security reasons. +Setting the `EXTERNAL_URL` is optional but recommended. +If you don't set it during the installation, you can +[set it afterwards](https://docs.gitlab.com/omnibus/settings/configuration/#configure-the-external-url-for-gitlab). -{{< alert type="note" >}} -While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting -`gitlab_rails['initial_root_password'] = "password"`, it is not recommended. If -you do set the password with this method, be sure to remove the password from -`/etc/gitlab/gitlab.rb` as it only gets read with the first reconfigure after -the package is installed. {{< /alert >}} +{{< tabs >}} + +{{< tab title="Enterprise Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ee +``` + +{{< /tab >}} + +{{< tab title="Community Edition" >}} + +```shell +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. + +## Initial sign-in + +After GitLab is installed, you can navigate to the URL you set up +and use the following credentials to sign in: + +- Username: `root` +- Password: See `/etc/gitlab/initial_root_password` + +After signing in, you should change your [password](../../user/profile/user_passwords.md#change-your-password) +and [email address](../../user/profile/_index.md#add-emails-to-your-user-profile). + +## Advanced configuration + ### Available environment variables You can customize your GitLab installation by setting the following optional -environment variables. **These variables only work during the first +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](../../security/reset_user_password.md). @@ -130,7 +158,14 @@ installations, use the password from `/etc/gitlab/initial_root_password` or 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. {{< /alert >}} -### Installation commands +{{< alert type="warning" >}} + +While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting +`gitlab_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. + +{{< /alert >}} Choose your GitLab edition and customize with the environment variables above: @@ -138,14 +173,6 @@ Choose your GitLab edition and customize with the environment variables above: {{< tab title="Enterprise Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ee -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ee ``` @@ -154,14 +181,6 @@ sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" {{< tab title="Community Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ce -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" zypper install gitlab-ce ``` diff --git a/doc/install/package/ubuntu.md b/doc/install/package/ubuntu.md index 8d4af7162a06dd..ae26c621272dc6 100644 --- a/doc/install/package/ubuntu.md +++ b/doc/install/package/ubuntu.md @@ -29,10 +29,9 @@ supported distributions and architectures. - See the [installation requirements](../requirements.md) to learn about the minimum hardware requirements. - Before you begin, make sure you have correctly - [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns), - and change `https://gitlab.example.com` to the URL at which you want to access - your GitLab instance. The installation automatically configures and starts - GitLab at that URL. + [set up your DNS](https://docs.gitlab.com/omnibus/settings/dns). + Replace `https://gitlab.example.com` in the commands below with your + preferred GitLab URL. GitLab is automatically configured and started at that address. - For `https://` URLs, GitLab automatically [requests a certificate with Let's Encrypt](https://docs.gitlab.com/omnibus/settings/ssl/#enable-the-lets-encrypt-integration), which requires inbound HTTP access and a valid hostname. You can also use @@ -94,28 +93,57 @@ To install GitLab, first add the GitLab package repository. ## Install the package -Install GitLab using your system's package manager. You can customize the -initial setup by configuring environment variables before installation. +Install GitLab using your system's package manager. -If you don't customize the root credentials during installation: +{{< alert type="note" >}} -- GitLab generates a random password and email address for the root - administrator account. -- The password is stored in `/etc/gitlab/initial_root_password` for 24 hours. -- After 24 hours, this file is automatically removed for security reasons. +Setting the `EXTERNAL_URL` is optional but recommended. +If you don't set it during the installation, you can +[set it afterwards](https://docs.gitlab.com/omnibus/settings/configuration/#configure-the-external-url-for-gitlab). -{{< alert type="note" >}} -While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting -`gitlab_rails['initial_root_password'] = "password"`, it is not recommended. If -you do set the password with this method, be sure to remove the password from -`/etc/gitlab/gitlab.rb` as it only gets read with the first reconfigure after -the package is installed. {{< /alert >}} +{{< tabs >}} + +{{< tab title="Enterprise Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ee +``` + +{{< /tab >}} + +{{< tab title="Community Edition" >}} + +```shell +sudo EXTERNAL_URL="https://gitlab.example.com" apt 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. + +## Initial sign-in + +After GitLab is installed, you can navigate to the URL you set up +and use the following credentials to sign in: + +- Username: `root` +- Password: See `/etc/gitlab/initial_root_password` + +After signing in, you should change your [password](../../user/profile/user_passwords.md#change-your-password) +and [email address](../../user/profile/_index.md#add-emails-to-your-user-profile). + +## Advanced configuration + ### Available environment variables You can customize your GitLab installation by setting the following optional -environment variables. **These variables only work during the first +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](../../security/reset_user_password.md). @@ -130,7 +158,14 @@ installations, use the password from `/etc/gitlab/initial_root_password` or 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. {{< /alert >}} -### Installation commands +{{< alert type="warning" >}} + +While you can also set the initial password in `/etc/gitlab/gitlab.rb` by setting +`gitlab_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. + +{{< /alert >}} Choose your GitLab edition and customize with the environment variables above: @@ -138,14 +173,6 @@ Choose your GitLab edition and customize with the environment variables above: {{< tab title="Enterprise Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ee -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ee ``` @@ -154,14 +181,6 @@ sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" {{< tab title="Community Edition" >}} -**Basic installation:** - -```shell -sudo EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ce -``` - -**With custom root credentials:** - ```shell sudo GITLAB_ROOT_EMAIL="admin@example.com" GITLAB_ROOT_PASSWORD="strongpassword" EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ce ``` -- GitLab