GitLab on Synology: set ‘external_url’

By

in

There are two (or even more) solutions to install GitLab on a Synology:

  • Using Docker and the container gitlab/gitlab-ce
  • Using the DSM package manager

Depending on the type of installation, different settings are required to update the external url.

Using Docker container

The external url of GitLab can e defined in /etc/gitlab/gitlab.rb. The parameter takes an url and can also handle a port:

external_url 'http://example.synology.me:30000/'

Important: when a port is specified in external_url, this will override the https/https port where nginx is listening. To use a different port for nginx, this requires an additional setting:

nginx['listen_port'] = 80

After changing this setting, it’s necessary to run:

gitlab-ctl reconfigure

The settings above are necessary, if port routing is set like the following:

screenshot of Synology Docker port settings

Using DSM package manager installation

This installation of GitLab on Synology uses localhost as a default value for external url. This may lead to some problems when accessing GitLab over another IP or host name. In my case, this lead to missing icons and a non functional WebIDE. An inspection of the html page shows, that some resources are requested over http://localhost/... which leads to 404 errors for those resources.

Since the GitLab container on Synology is not based on the omnibus package, you can not use directly external_url in /etc/gitlab/gitlab.rb. If you want to change the url you can do it by changing the docker environment parameter GITLAB_HOST.

screenshot of Synology Docker environment settings
GitLab on Synology: Environment settings


Comments

One response to “GitLab on Synology: set ‘external_url’”

  1. […] external_url ‘https://gitlab.example.com:9443’nginx%5B‘listen_port’%5D = 80   #?????????external_url?????nginx[‘listen_https’] = false???GitLab on Synology: set ‘external_url’ – mixable Blog […]

Leave a Reply

Your email address will not be published. Required fields are marked *