Dear n8n team and Google API specialists,
I’m running a self-hosted n8n instance via Docker, but on port 5679 instead of the default 5678. When trying to authenticate using Google OAuth, the connection fails — I either receive no response or just an empty one. [3]
I reported this on GitHub (issue #17084), but the bot redirected me here, stating that it’s not considered a bug. However, I suspect the issue is related to how n8n handles non-standard ports during the OAuth flow.
Steps to Reproduce
- Install n8n via Docker, using port 5679 instead of 5678
→ Official Docker guide - Enable and configure Google API access
→ Google OAuth credential setup - Add the App user to the Google Cloud project
→ Community thread
The Docker container is hosted on a Windows-based notebook, and port 5679 is exposed via TCP through my Fritz!Box router.
Expected Behavior
Google OAuth authentication should work correctly even when n8n is running on a non-default port like 5679.
Actual Behavior
The OAuth flow fails. The browser redirects as expected, but the callback either times out or returns an empty response.
Port 5679 is properly mapped and publicly accessible via instance.myfritz.net:5679.
System Information
- n8n version: 1.76.1
- Node.js version: as provided in Docker
- Operating system: WSL (Ubuntu) + Docker on Windows
- Execution mode:
main(default) - Database: PostgreSQL
- Running n8n via: Docker
Google Cloud Project – Redirect URIs [2]
The following redirect URIs have been configured in the Google Cloud Console:
bash
KopierenBearbeiten
http://myfritz-url.net:5678/rest/oauth2-credential/callback
http://myfritz-url.net:5679/rest/oauth2-credential/callback
Despite this, the OAuth authentication does not succeed.
Questions
- Does n8n internally expect port 5678 even if a different port is configured?
- Are there specific adjustments or environment variables needed to support OAuth on custom ports?
- Is this behavior due to Google OAuth limitations, or is it something n8n-related?
Any suggestions, confirmation, or workarounds would be greatly appreciated — thank you!
References / Screenshots:
[1]
[2]
[3]


