[resolved] Repo files under wrong URL

Here is what I did:

  1. Created a group
  2. Created a repo inside that group
  3. Added README.md as suggested by the wizard
  4. Added few more files

For some reason when trying to click on these files to open them, it is pointing to a weird URL instead of the real IP see below:

If I replace that b155e4f44228 with the actual URL which is then everything works fine and I can open the file.

I also spotted this weird string in the admin view when checking this project’s details, see:

Any ideas of what could have gone wrong here?

I didnt change anything special, I just pulled the latest gitlab/gitlab-ce:latest straight from Dockerhub via Portainer


Hi there!

Can you check what the value of external_url val is in your /etc/gitlab/gitlab.rb file? The property is set at the very top of gitlab.rb config file.

Here is the output from the container’s console

PS: I just realized the weird string matches the hostname in the console too (see ss above)

oh yeah, of course! you’re running in docker :man_facepalming: How could I miss the ipv4 and you mentioning dockerhub…


Anyhow - the problem is that Gitlab is using the container’s hostname (the container ID) as the external URL.
You should, if you haven’t yet, read this https://docs.gitlab.com/omnibus/docker/
I suppose you have not set the --hostname parameter when starting up the docker container.
Given your situation, you should start the container up with the --hostname parameter set. And you should publish port 80 and not 81 :wink:

Naw, pffff shame on me.
Just edit the /etc/gitlab/gitlab.rb file on your host and set the external_url parameter to

Sorry for the bad advice in the previous reply.

Thanks for your help, this seems to be the issue - ill try to pass external_url to the container

You should rather edit the gitlab.rb config file

I just did that and a gitlab-ctl reconfigure for it to take effect but now im left with a 404 ill double check wtf I did

That’s working fine now, thanks @aljaxus!

Great !
Please mark the topic as “resolved” or something. I’m like 2 days on this forum, so I don’t really know the flow here.

I guess just add a [resolved] prefix to your post’s title or something.

Have a nice day :smiley:

1 Like

aljaxus I need your help. I changed the external_url to my qnap’s ip, but it didn’t work. How to start a container with --hostname parameter?