To Reproduce
-
Deploy self-hosted GitLab using Docker.
- GitLab listens internally on port 80 only.
- HTTPS is terminated externally via Traefik.
- external_url is set to https://gitlab.sentenceend.com
- nginx['listen_https'] = false
- nginx['listen_port'] = 80
-
Ensure GitLab and Dokploy are on the same Docker network.
-
In Dokploy Git Provider settings:
-
Authorize GitLab OAuth successfully.
-
During OAuth callback, Dokploy fails with ECONNREFUSED on port 443.
Current vs. Expected behavior
Current Behavior
During OAuth callback (code → token exchange), Dokploy attempts to connect to:
10.0.1.101:443
Resulting in:
TypeError: fetch failed
[cause]: Error: connect ECONNREFUSED 10.0.1.101:443
Internal connectivity verification shows:
curl http://gitlab/api/v4/version
works (returns 401 as expected).
However:
curl http://gitlab/oauth/token
returns:
HTTP/1.1 302 Found
Location: https://gitlab/users/sign_in
GitLab redirects GET /oauth/token to HTTPS login page.
But:
curl -X POST http://localhost/oauth/token
returns:
HTTP/1.1 400 Bad Request
Missing required parameter: grant_type
This confirms that POST /oauth/token works correctly over HTTP and does NOT require HTTPS.
Despite this, Dokploy callback still attempts to connect via HTTPS (443).
Expected Behavior
When Internal URL is set to:
Dokploy should:
Use the internal HTTP endpoint for OAuth token exchange
Send POST /oauth/token to port 80
Not attempt to connect to port 443
Not follow redirect to HTTPS
Provide environment information
Operating System:
OS: Ubuntu 22.04
Arch: amd64
Dokploy version: v0.28.2
GitLab version: 18.7.3-ce.0
VPS Provider: Racknerd
Docker Network Driver:
(Insert result of: docker network inspect dokploy-network --format '{{.Driver}}')
Deployment type:
Single server, Docker-based, same server where Dokploy is installed.
GitLab configuration:
- external_url 'https://gitlab.sentenceend.com'
- nginx['listen_port'] = 80
- nginx['listen_https'] = false
- nginx['redirect_http_to_https'] = false
Which area(s) are affected? (Select all that apply)
Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
Dokploy container can successfully access:
http://gitlab/api/v4/version
But cannot access:
https://gitlab.sentenceend.com (internal overlay network 443 blocked)
The failure only occurs during OAuth callback token exchange.
It appears that Internal URL is not respected during callback, and Dokploy attempts to use HTTPS instead.
Will you send a PR to fix it?
No
To Reproduce
Deploy self-hosted GitLab using Docker.
Ensure GitLab and Dokploy are on the same Docker network.
In Dokploy Git Provider settings:
Authorize GitLab OAuth successfully.
During OAuth callback, Dokploy fails with ECONNREFUSED on port 443.
Current vs. Expected behavior
Current Behavior
During OAuth callback (code → token exchange), Dokploy attempts to connect to:
10.0.1.101:443Resulting in:
Internal connectivity verification shows:
works (returns 401 as expected).
However:
returns:
GitLab redirects GET /oauth/token to HTTPS login page.
But:
returns:
This confirms that POST /oauth/token works correctly over HTTP and does NOT require HTTPS.
Despite this, Dokploy callback still attempts to connect via HTTPS (443).
Expected Behavior
When Internal URL is set to:
Dokploy should:
Use the internal HTTP endpoint for OAuth token exchange
Send POST /oauth/token to port 80
Not attempt to connect to port 443
Not follow redirect to HTTPS
Provide environment information
Which area(s) are affected? (Select all that apply)
Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
Dokploy container can successfully access:
http://gitlab/api/v4/version
But cannot access:
https://gitlab.sentenceend.com (internal overlay network 443 blocked)
The failure only occurs during OAuth callback token exchange.
It appears that Internal URL is not respected during callback, and Dokploy attempts to use HTTPS instead.
Will you send a PR to fix it?
No