Synology Docker instance with reverse proxy troubles

Hello all,

I’ve setup a docker and GitLab instance on my Synology NAS using this tutorial:

I also followed “Further considerations” instructions to setup a reverse proxy to enable SSL and access to my GitLab instance.

So far so good… and everything works as expected.

Next, I followed these instructions posted on the GitLab site to enable OAuth using

The instructions were simple enough, but I’m not able to authenticate from the redirect.

Steps for me to reproduce the problem:
Open web browser and enter address “” -> site login page opens
click “github” button in the “sign in with” dev box. -> opens login page
successfully authenticate with -> redirects the token back to my site

Here where the trouble happens. The redirected session token seems to be valid but GitLab doesn’t seem to know what to do with it. After redirection it looks like GitLab attempts to use the token, but something doesn’t work, then i’m forwarded to the “” page. The App I created on github has the following settings:

Application name: GitLab
Homepage URL:
Authorization callback URL:

in my gitlab.rb I have changed the following settings.

for some reason I’m not able to set the “external_url”, it wont allow the instance to fully boot and the container unexpectedly stops. I think this might be an issue.

gitlab_rails[‘omniauth_providers’] = [
“name” => “github”,
“app_id” => “[REDACTED]”,
“app_secret” => “[REDACTED]”,
“url” => “”,
“args” => { “scope” => “user:email” }

ANY help is appreciated!

I have figured out that the reverse proxy was incorrectly configured to a HTTP redirect and that was the reason that setting the “external url” in gitlab.rb to an HTTPS address was causing the container to fail when building. I have since fixed that.

Currently I’m able to:
GitLab login page -> click sign in with
Authenticate with Github -> redirected token to my site -> ERROR 500

Personal Tokens have the same result

1 Like

If i attempt to sign-in while being signed-out on both GitLab and GitHub:

On the GitLab page, using the sign-in with Github link -> redirected to Github.
Authenticated on Github -> redirected token back to
after a timeout event, I receive the error banner on the GitLab sign-in page-> Could not authenticate you from GitHub because “Failed to open tcp connection to (getaddrinfo: temporary failure in name resolution)”.

I have the feeling that I’m making progress and now I have a DNS error here on my side… fingers crossed.

1 Like

This was solved by adding the internal IP address range for the Docker containers ( to allow all ports in the firewall rules. Would someone please let me know if this is an insecure way to solve this issue, and methods to correctly implement it. Thanks in advance.