About changing the Gitlab External URL

Hello, I installed Gitlab 15.8.0 version with the Omnibus gitlab method. It is running smoothly now. I named gitlab.local as the url. But now I need to update this url name to gitlablocal. I know that I can do this from gitlab.rb external url section. But will changing the url cause a problem in gitlab? What should I pay attention to before doing this operation?

Is the following process enough for me to change the gitlab url?

Update the external url in gitlab.rb file from gitlab.local to gitlablocal.

then change the Run gitlab-ctl reconfigure command.

After I do this, will I have any problems with accessing the new url and existing project links?

thankyou for support.

Hi,

Yes you pretty much just change the external url and reconfigure. It should be enough. Relative urls will be OK, if someone embedded an image in an issue or something with the full url rather than keeping it relative, it could be a problem. That means editing the issue or wiki or whatever and fixing the url.

After updating the external url address in gitlab.rb, when I reconfigure gitlab-ctl, the process is interrupted and gives the following error. How can I solve this problem, there must be a way to update the external url properly?

Running handlers:
[2023-12-12T12:56:12+03:00] ERROR: Running exception handlers
There was an error running gitlab-ctl reconfigure:

runit_service[nginx] (nginx::enable line 18) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
STDOUT: timeout: down: /opt/gitlab/service/nginx: 1s, normally up, want up
STDERR:
---- End output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
Ran /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx returned 1

Running handlers complete
[2023-12-12T12:56:12+03:00] ERROR: Exception handlers complete
Infra Phase failed. 9 resources updated in 01 minutes 26 seconds
[2023-12-12T12:56:12+03:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/cinc-stacktrace.out
[2023-12-12T12:56:12+03:00] FATAL: ---------------------------------------------------------------------------------------
[2023-12-12T12:56:12+03:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT
[2023-12-12T12:56:12+03:00] FATAL: ---------------------------------------------------------------------------------------
[2023-12-12T12:56:12+03:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: runit_service[nginx] (nginx::enable line 18) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
STDOUT: timeout: down: /opt/gitlab/service/nginx: 1s, normally up, want up
STDERR:
---- End output of /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx ----
Ran /opt/gitlab/embedded/bin/sv restart /opt/gitlab/service/nginx returned 1

I would say you have incorrectly configured something - that is what the error message above seems to hint at. Incorrect formatting in /etc/gitlab/gitlab.rb will do things like that. Check your config file completely and make sure it is OK.

I’ve edited mine numerous times for loads of config options and never get errors like this. About the only time I did, was a typo by me :slight_smile:

Just a hunch, but this could be caused by the fact that gitlablocal is not a fully qualified domain name (FQDN), whereas gitlab.local is.