OAuth redirect URL is always localhost and cannot be modified

I installed it with NPX n8n,run at PM2

I made the following attempts:

  1. Set up the reverse proxy and open it through the domain name.
  2. Set WEBHOOK_URL and N8N_HOST in the .bash_profile file.


20220503190702

Hey @duttchasel, welcome to the community!

I am not entirely sure how PM2 manages environment variables, but based on other conversations around this process manager (like this one), setting up an ecosystem file seems to work reliably.

Could you give that a go?

I solved the problem by running the pm2 start n8n --update-env command and found another problem
When I use the domain name to access, the HTTP request node cannot send any requests (or receive?), It is always in Executing node… status. If I use IP + port, it will work normally.

This sounds like you might be running n8n behind a reverse proxy server such as Caddy or nginx. Could you make sure it’s properly configured (Caddy, Nginx) so information from the server reaches the UI?

I realize that reverse proxy is not the right solution, and I will abandon it.

Thanks for your help!

1 Like

You’re most welcome! Just to add my 2 cents: Despite adding a bit of extra work, a reverse proxy can make sense in many situations - so you might not want to abandon this idea forever :slight_smile: