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

2 Likes