Change the GitLab Domain
Prerequisites
- GitLab server
- Desired GitLab domain (e.g., git.company.com)
- DNS A record pointing to the GitLab server’s IPv4 address
- DNS AAAA record pointing to the GitLab server’s IPv6 address
Change the GitLab Domain
To change the GitLab domain, log in to the creoline Customer Center and navigate to the GitLab server for which you want to change the GitLab domain. Select the Configuration Files tab and then click Edit.
To navigate more quickly when editing large configuration files, you can also use Ctrl + F (Windows) or Command + F (macOS) to search for a specific term or similar within the configuration file.
Enter the desired new GitLab URL in the external_url field.
Example:
external_url "http://git.company.com" Make sure the desired URL contains the required A and AAAA records before saving the changes; otherwise, a valid Let’s Encrypt certificate cannot be issued for the new GitLab URL.
Next, enter a brief message in the Change Note section explaining why the GitLab URL was changed, and save the changes by clicking the Save Changes button.
Saving the configuration automatically triggers the deployment of the configuration and the subsequent restart of GitLab. Notify active users in advance about the planned change.
GitLab Runner Configuration
Please note that changing the GitLab URL also requires updating the target URL for GitLab Runners, if you already have registered GitLab Runners.
File path: /etc/gitlab-runner/config.toml:
# [...]
[[runners]]
name = "xxxxx.creolineserver.com"
url = "https://gitlab.custom-domain.com" The url parameter must be updated accordingly for all registered runners.
Related Links
Official GitLab Documentation:
https://docs.gitlab.com/omnibus/settings/configuration.html#configure-the-external-url-for-gitlab