Installing n8n in Docker Airgap system

Hi All,
i’m trying to install n8n in airgap system
i tried to run this command
docker run -d
–name n8n
-p 5678:5678
-v n8n-data:/home/node/.n8n
-e N8N_BASIC_AUTH_ACTIVE=true
-e N8N_BASIC_AUTH_USER=admin
-e N8N_BASIC_AUTH_PASSWORD=password
-e N8N_DISABLE_TELEMETRY=true
n8nio/n8n:
worked without any erros but still can’t login to the UI

have anyone tried to install in airgap system and succeded ?

thanks,

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:

Docker , db builtin n8n version the latest
os : ubuntu 22

My preferred way to run any docker container air-gapped is to create a new overlay network with

docker network create --internal no-internet

and then run the container air-gapped with

docker run -d \
  --name n8n \
  -p 5678:5678 \
  -v n8n-data:/home/node/.n8n \
  -e N8N_DIAGNOSTICS_ENABLED=false \
  --network no-internet \
  n8nio/n8n:latest

However with a private network, port forwarding will not work, since the host does not have a route to the private network (likely the issue you are facing).

You can however either

  1. use the IP address of the container to access the container directly (you’d need to set -e N8N_SECURE_COOKIE=false), or
  2. setup a reverse proxy container that has access to this private network, as well as a public network, so that you can access n8n via this. I usually use Traefik or Caddy for this.

BTW,

You can delete these.
n8n removed basic auth support over a year ago with the release of 1.0.0

This has never been an env variable in n8n.
Can you please tell us where you found this documented, so that we can get it fixed :pray:

Thanks, it’s resolved the issue
working great now

1 Like

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