OAuth Redirect URL not updating despite setting environment variables

Describe the problem/error/question

I’m facing an issue with the OAuth Redirect URL in n8n. Even though I have set the environment variables as mentioned in the documentation here, the URL displayed in the interface is incorrect. It still shows:

http://localhost:5678/rest/oauth2-credential/callback

Instead of the correct URL I need:

https://my.personnal.domain/rest/oauth2-credential/callback

There is no specific error message; the issue is with the URL n8n is using for the OAuth redirect, which is not updating according to the environment variables I’ve set.

$ env |grep URL
N8N_EDITOR_BASE_URL=https://my.personnal.domain/
WEBHOOK_URL=https://my.personnal.domain/
VUE_APP_URL_BASE_API=https://my.personnal.domain/

Has anyone experienced this issue or knows how to force the correct URL to be used? I would appreciate any help to resolve this problem.

Thanks in advance!

Best regards,
David

Information on your n8n setup

  • n8n version: 1.60.1
  • Database (default: SQLite): Postgresql
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: Ubuntu 22.04.5 LTS

hello @davidbo

You don’t need ENVs N8N_EDITOR_BASE_URL and VUE_APP_URL_BASE_API.

Only the WEBHOOK_URL should be set. Did you restart n8n after you added the ENV?

Hello @barn4k ,

Thank you for your message. I indeed removed the two other environment variables, and it worked. However, I didn’t quite understand why removing those two allowed the remaining one to be used correctly.

In any case, thank you very much for your help!
David

You can still set N8N_EDITOR_BASE_URL it is used when you want to have one url for the editor and another for webhook URLs.

In this case though I suspect the issue is that the new env options were just not picked up before, maybe the container was stopped and started this time and not just restarted