Workflow automation is a big deal these days and n8n has quickly become a favorite among DevOps engineers and developers for building powerful automations with a visual interface. But what happens when your environment is air-gapped (no internet access)?
In this guide, I’ll walk you through the step by step process of installing and configuring n8n on an air-gapped RHEL server.
Why Air-Gapped?
Air-gapped systems are isolated from external networks for security reasons. This is common in finance, defense, healthcare, and enterprise environments. While it provides strong security, it also makes setting up applications like n8n tricky since you can’t just docker pull or npm install.
Prerequisites
- RHEL 8.x or 9.x installed
- Root (sudo) access to the server
- A workstation with internet access to prepare packages and images
- Podman or Docker installed on the RHEL server (choose one depending on your org’s policy)
- scp or sneakernet to transfer files into the air-gapped environment
1. Download n8n Docker Image (On Internet Connected Machine)
Since your RHEL server can’t pull directly from Docker Hub, you’ll need to pre-download the image:
docker pull n8nio/n8n:latest
docker save n8nio/n8n:latest -o n8n.tar
This creates a n8n.tar image file.
Transfer n8n.tar to your RHEL server using winscp or your preferred method.
2. Load Image in Air-Gapped RHEL Server
Once the tarball is inside your environment:
docker load -i n8n.tar
Verify:
docker images | grep n8n
You should see n8nio/n8n:latest.
3. Setup Persistent Volumes
n8n needs persistent storage for workflows, credentials, and executions. Create directories:
mkdir -p /opt/n8n/.n8n
chown -R 1000:1000 /opt/n8n/.n8n
4. Run n8n with Environment Variables
docker run -d \
--name n8n \
-p 5678:5678 \
-v /opt/n8n/.n8n:/home/node/.n8n \
-e N8N_HOST=yourserver.domain.com \
-e N8N_PORT=5678 \
-e N8N_PROTOCOL=http \
-e GENERIC_TIMEZONE=Asia/Kolkata \
n8nio/n8n:latest
5. Configure Reverse Proxy (Optional but Recommended)
For production setups, you’ll likely run n8n behind Nginx or Apache for SSL and domain-based access.
Example Nginx config:
server {
listen 80;
server_name n8n.example.com;
location / {
proxy_pass http://localhost:5678;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_http_version 1.1;
}
}
Reload Nginx:
systemctl reload nginx
6. Setting Up Authentication
By default, n8n doesn’t enforce login unless configured. Secure it:
docker run -d \
--name n8n \
-p 5678:5678 \
-v /opt/n8n/.n8n:/home/node/.n8n \
-e N8N_BASIC_AUTH_ACTIVE=true \
-e N8N_BASIC_AUTH_USER=admin \
-e N8N_BASIC_AUTH_PASSWORD=StrongPassword123 \
n8nio/n8n:latest
7. Systemd Service (Optional)
If you don’t want to run n8n manually every time, create a systemd unit:
# /etc/systemd/system/n8n.service
[Unit]
Description=n8n Automation
After=docker.service
Requires=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker start -a n8n
ExecStop=/usr/bin/docker stop -t 2 n8n
[Install]
WantedBy=multi-user.target
Enable and start:
systemctl enable n8n
systemctl start n8n
8. Final Check
Now visit:
http://
You should see the n8n workflow editor running securely in your air-gapped RHEL environment.
Future Enhancements
- Configure external PostgreSQL for production instead of SQLite
- Enable TLS/SSL with Certbot or custom certs
- Setup HA (High Availability) with multiple n8n instances
- Add monitoring with Prometheus + Grafana
Installing n8n in an air-gapped RHEL environment takes some prep work, but once you’ve handled the image transfer and config, it runs smoothly. With this setup, you can build powerful workflows securely, even in the most restricted networks.
LLM + n8n means combining the power of large language models (like GPT, Claude, or Gemini) with n8n’s automation engine to create AI-driven workflows. With n8n’s built-in LLM nodes, you can fetch data from any source (emails, APIs, databases), send it to an AI for tasks like summarization, translation, sentiment analysis, or content generation, and then pass the AI’s output into other apps such as Slack, Jira, or Google Sheets. This makes it easy to build smart automations like AI chatbots, auto-generated reports, or intelligent data pipelines, all without writing custom code.