Change GitLab domain

Prerequisites

  • GitLab server
  • Desired GitLab domain (e.g. git.company.com)
  • DNS A record with the IPv4 address of the GitLab server as the destination
  • DNS AAAA record with the IPv6 address of the GitLab server as the destination



Change GitLab domain

To customize the GitLab domain, log in to the creoline Customer Center and navigate to the GitLab server for which you want to customize 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 area.


Example:

external_url "http://git.company.com"


Make sure that the desired URL contains the required A and AAAA entries before saving the changes, otherwise a valid Let's Encrypt certificate cannot be issued for the new GitLab URL.


Then enter a short message in the Change message area explaining why the GitLab URL was changed and save the changes using the Save changes button.


Saving the configuration automatically triggers the deployment of the configuration and the subsequent restart of GitLab. Inform active users about the planned action in advance.



GitLab-Runner customization

Please note that by changing the GitLab URL, the target URL of the GitLab runner must also be adjusted 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 adjusted accordingly for all registered runners.




Official GitLab documentation:

https://docs.gitlab.com/omnibus/settings/configuration.html#configure-the-external-url-for-gitlab