How to connect my virtualbox server to n8n callback without using tunnel

Hi did someone tried to connect the virtualbox server to n8n url callback?, I’m trying to connect it but my link from OAuth2 is not working(not accessible), but I created new server and try to start over again and do the tunnel command my OAuth2 is smoothly connected to google using the provided link of the tunnel, but my concern is on the guide the tunnel command is only for test server and soon I will deploy the n8n to the prod server…

tunnel command

n8n start --tunnel

Callback URL from OAuth without tunnel command

Hey @rodskie123,

That error is the browser saying it has taken a look for n8n.automation.link and can’t find it, Doing a quick nslookup here results in the same NXDOMAIN error.

You will need to make sure that you have the correct DNS recrod set so the browser knows what IP to connect to.

may I know if there is a way to use the IPserver:5678 as Authorized redirect URIs in google cloud platform or if we have other workaround to be able to access the OAuth2 URL callback?

I can only access this if I use ServerIP:5678

Hey @rodskie123,

It looks like Google don’t support IP addresses for the redirect URIs so you would need to use something that provides a domain or set up a local DNS entry to handle it. You could also try something like http://nip.io/ which lets you use http://internal_ip.nip.io.

sorry I’m a bit confuse with the video guide I watch Getting Google OAuth Credentials for n8n - YouTube in the guide they use localhost as redirect URI in GCP is it possible for my server to connect like in the video guide? I tried it from the start but I guess I’m missing something in configuration… :frowning:

Hey @rodskie123,

You could use localhost if you were doing the connection from the same machine, localhost will almost always point to 127.0.0.1 which is the local and internal IP address.

What this means is localhost on your virtual machine and localhost on your desktop while having the same name and the same ip they point to different places.

You will find the same thing with docker as well the localhost / 127.0.0.1 address is not available outside of the machine.

There are only a few options for you outside of using the tunnel option.

  1. use a domain you own and set a dns record to point to the ip of your virtual machine if you don’t want to make it public.

  2. Edit the hosts file on your desktop so the domain you use points to the IP of the VM

  3. Use something like ngrok on the server this is like the tunnel option but you have to manually set it up

  4. Use a service like xip which I know a couple of others have used with no issues.