Google OAUTH2 on Self-Hosted

Information on your n8n setup

  • 1.77.3
  • PostgreSQL
  • ?!?
  • Docker - Starting with self-hosted-ai-starter-kit…added in OpenWebUI and Flowise
  • Ubuntu - 24.04.01

I’m running n8n in Docker on Ubuntu Desktop. I’m able to get it and the additional components to load and run just fine. However, when I attempt to establish an OAUTH2 connection w/ Google using the guides, I never see a permissions/context approval window. It just goes from this:


to this:

I think I’ve set everything up properly, but clearly haven’t. I have contexts in place, test users in place, an approved domain in place, but this behavior makes me think that something in the OAUTH flow w/ Google is being blocked or misdirected.

I have been able to add credentials for Telegram and OpenAI without issue and have even built tiny flows to test them, but I’m effectively locked out of anything Google-related until I can get this authorization/data flow issue worked out.

I’m running a Firewalla, but don’t see any blocked flows there.

I am 100% okay with the community saying “that ai-toolkit build you’re starting with is not configured properly…start again with n8n docs and use them as a basis for adding in other services via Docker Compose.” This is largely because I started with a downstream repo where the contributer had already added in OpenWebUI and Flowise and his code and tutorial are also non-functional as-is.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • 1.77.3
  • PostgreSQL
  • ?!?
  • Docker - Starting with self-hosted-ai-starter-kit…added in OpenWebUI and Flowise
  • Ubuntu - 24.04.01

I guess where I’m confused is that if I look at the AI-Starter-Kit on Github and compare it to the documentation for self-hosting, it appears that the AI-starter-kit is missing basically all of the traefik container info and the .env doesn’t seem to have anything in there about certs/domains/subdomains.

So, perhaps my question is: Is the self-hosted-starter-kit something that is supposed to have significantly limited functionality as just a teaser to get someone to pivot over to a full self-hosted install via the guide, or a paid cloud install later? Am I expecting too much from that “quick start” path and I should just give up and build my docker containers manually via the guide and forget about the “starter kit”?

Hi, I’m also looking for a solution to this issue. Just had a quick search, have you tried this approach? @chaosrain

Do you have a domain and SSL cert setup? Those are typically required for Oauth2 connections.

1 Like

Yes to both. Using nginx for reverse proxy.

I got it solved after configuring the env, I followed this setup:

I run n8n with similar setup to yours but it runs on another computer in my network.
I had similar issue and it turned out I just had to do the authorization in a browser on the docker host and not on my laptop

I was surprised too but it works without a domain or even ssl:

I have the same window, but I’m running n8n from railway using a template.
It needs to point to my url, not localhost:. How can that be changed ?