N8n tunel off

Hello everyone, I’m setting up a connection via tunel using docker compose, I’m running it through screen to disconnect from ssh, the tunnel works for 10 minutes and seems to be turning off, I have to restart, what should I do?

Hey @FIRE_TIKTOK,

I am not sure why the tunnel stops but why are you running it through screen?

If you run docker-compose up -d it will run the background and this may solve your problem.

1 Like

thanks, the problem is that I have an external ip on which I want to connect, but I don’t understand what should I change in docker-compose.yml?…

Hey @FIRE_TIKTOK,

That all depends on what you have already set up in the compose file. Assuming you have the port forwarding in place you wouldn’t need the tunnel option and just accessing the IP and port would work.

You can set the n8n host variable to use the IP and the webhook_url as well if needed but the configuration of the network would still come into it.

For now I would start by running the image in the detached mode just to make sure that works then move on from there.

I managed to do it through localhost: 5678 and through vpn everything works for me, but the problem is that the same telegram trigger does not work on http, but you need https. True, I did the installation using npm

Using npm is a bit different for that I would use pm2 to run it as a service and use the ecosystem config file to set your environment variables. Check out this post on how to set up pm2 and n8n: How to set up n8n via PM2

You will struggle to get a valid certificate for an IP so you might be better off getting a domain from somewhere like Namecheap and pointing it to your ip then using let’s encrypt for a free cert (or use our docker example with traefik to make that a bit easier).