Tunneling in docker-compose.yml file

Hi. I am wondering hot to add tunelling in ocker-compose file.
I installed starter kit but I am on Proxmox (lxc container) and I cannot use localhost as reference.
git clone GitHub - n8n-io/self-hosted-ai-starter-kit: The Self-hosted AI Starter Kit is an open-source template that quickly sets up a local AI environment. Curated by n8n, it provides essential tools for creating secure, self-hosted AI workflows.
cd self-hosted-ai-starter-kit
docker compose --profile gpu-nvidia up

I think I need to add --tunnel somewhere here - but how?

n8n:
<<: *service-n8n
container_name: n8n
restart: unless-stopped
command:
- “n8n start --tunnel”
ports:
- 5678:5678
volumes:
- n8n_storage:/home/node/.n8n
- ./n8n/backup:/backup
- ./shared:/data/shared
depends_on:
postgres:
condition: service_healthy
n8n-import:
condition: service_completed_successfully
environment:
- N8N_SECURE_COOKIE=false

  • n8n version: 1.58.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: main):
  • Running n8n via (Docker, docker-compose):
  • Operating system: Proxmox LXC container (can be operated in VM also)

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Michal_Nowakowski,

You don’t need to add the --tunnel option, Can you explain what the issue is that you are actually seeing?

Yes. In Proxmox when you use Proxmox with predefined IP (e.g 192.168.0.100), the LXC container (or VM) as instance has different IP (like e.g 192.168.0.101). When I put the docker container I cannot communicate with localhost:5678, rather 192.168.0.101:5678. Tunneling should help me to connect to Gmail APIs (they doesn’t allow http://192.168.0,101:5678 as trusted adresses)

--tunnel option is meant to give your instance public ingress, so that services that need a public endpoint to send webhook requests to your instance can do so.

If you don’t need that, you should be able to use any address with google apis via an oAuth client that’s marked as internal.

1 Like

Got it. My mistake, sorry. Now it’s clear thanks :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.