Unable to change OAuth Redirect URL

Hey all,

I’ve got n8n running locally through portainer, but when I follow the documentation to add Google Calendar integration, I am presented with a localhost address for the OAuth Redirect URL.

Unfortunately, this doesn’t work, and the browser isn’t able to establish a connection after completing the enrollment and signing in.

In this thread, and others like it, it was advised to set the environmental variables for WEBHOOK_URL and N8N_EDITOR_BASE_URL. However, changing these variables and restarting the container does not change the Redirect URL as it still refers to localhost.

Any ideas?

Information on your n8n setup

  • n8n version: 1.91.3
  • Database (default: SQLite): SQLite
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker via Portainer

should be

N8N_HOST=xyz.example.com
N8N_EDITOR_BASE_URL=https://xyz.example.com/
WEBHOOK_URL=https://xyz.example.com/

N8N Docs:
N8N_HOST - Host name n8n runs on.
N8N_EDITOR_BASE_URL - Public URL where users can access the editor. Also used for emails sent from n8n and the redirect URL for SAML based authentication.
WEBHOOK_URL - Used to manually provide the Webhook URL when running n8n behind a reverse proxy. See here for more details.

if workers are used you have to set the webhook url there again, but from the selected database I assume that workers are not in use

1 Like

Can you send a screenshot of your env variables in portainer?
Just sensor our any private info

This is what I had:

After adding N8N_HOST and rebooting the container, the proper redirect url populated. Thanks so much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.