Replacing 'localhost:5678' with server address in OAuth Credentials

Hello! I am setting up an OAuth2 connection to Github but the OAuth Redirect URL defaults to

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

There is no way to override it but I need to replace localhost with the server URL, otherwise my connection fails.

How can I change this? I have n8n installed on a Raspberry Pi using npm/pm2

Many thanks!

And, of course, I resolved it by running:

export WEBHOOK_URL=http://192.168.68.194:5678
pm2 restart n8n --update-env

4 Likes

UPDATE:
from this link : Environment variables reference | n8n Docs
I found that the variable is VUE_APP_URL_BASE_API change the oauth callback credential even it looks like localhost when running “npx n8n start”

2 Likes