Host n8n for Free – 2025 Guide
1) Google Cloud (Free forever)
e2-micro instance: 1 vCPU, 1 GB RAM, 30 GB storage
Install script:
sudo apt update && sudo apt upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
mkdir ~/n8n && cd ~/n8n
cat > docker-compose.yml << 'EOF'
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=MyStrongPassword
# Recommended extras:
- N8N_HOST=your.domain.com
- N8N_PROTOCOL=https
- GENERIC_TIMEZONE=Asia/Kolkata
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
EOF
# If your system uses Docker Compose v2, use `docker compose` (space), not `docker-compose`
docker compose up -d || docker-compose up -d
echo "n8n is available at http://YOUR-IP:5678"
Open firewall (GCP):
- VPC Network → Firewall → Create firewall rule → allow TCP 5678 (or terminate TLS via a reverse proxy on 80/443 instead).
2) Oracle Cloud (Most powerful free tier)
- Free: up to 4 OCPUs + 24 GB RAM
- Create account (card verification) → choose “Always Free resources”
Open port:
sudo iptables -I INPUT -p tcp --dport 5678 -j ACCEPT
(Also add a Security List / Network Security Group ingress rule for TCP 5678 in the OCI console. Persist iptables rules or use ufw allow 5678
.)
3) Render (Easiest)
- 750 free hours/month
- Create New Web Service → use image
n8nio/n8n:latest
- Port: 5678
Environment variables:
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=MyStrongPassword
N8N_HOST=<your-render-url or custom domain>
N8N_PROTOCOL=https
GENERIC_TIMEZONE=Asia/Kolkata
4) Local Hosting
On your own machine:
docker run -d --name n8n \
-p 5678:5678 \
-e N8N_BASIC_AUTH_ACTIVE=true \
-e N8N_BASIC_AUTH_USER=admin \
-e N8N_BASIC_AUTH_PASSWORD=MyStrongPassword \
-e GENERIC_TIMEZONE=Asia/Kolkata \
-v n8n_data:/home/node/.n8n \
n8nio/n8n:latest
Then visit: http://localhost:5678
Important Points
-
Always change default passwords.
-
Back up your workflows regularly.
-
Official links:
- n8n docs: https://docs.n8n.io
- Docker (install): https://docs.docker.com/engine/install/
- Docker Compose v2: https://docs.docker.com/compose/install/
- Google Cloud Free Tier: https://cloud.google.com/free
- Oracle Always Free: https://www.oracle.com/cloud/free/
- Render: https://render.com
“Loopholes & Gotchas” (don’t get tripped)
-
Public port 5678 = risky. Put n8n behind a reverse proxy with HTTPS + auth (Caddy, Traefik, or Nginx). Let’s Encrypt is free.
-
Set your public URL or webhooks won’t trigger correctly:
N8N_HOST
= your domain,N8N_PROTOCOL
=https
- If behind a tunnel, set
WEBHOOK_TUNNEL_URL=https://your-public-url
-
Timezone & cron accuracy: set
GENERIC_TIMEZONE
(e.g.,Asia/Kolkata
) or schedules fire at UTC by default. -
Persist data: always mount
/home/node/.n8n
. Without the volume, you’ll lose credentials/workflows on container rebuilds. -
External DB for scale: for reliability and team use, consider Postgres (
DB_TYPE=postgresdb
,DB_POSTGRESDB_*
vars). SQLite is fine for small solo use but brittle at scale. -
Email nodes need SMTP: configure your SMTP credentials in n8n credentials; many providers block port 25—use 587/465 with TLS.
-
GCP quirks: e2-micro availability varies by region; outbound bandwidth is limited; set a static external IP; configure VPC firewall rules.
-
Oracle quirks: Always-Free can be revoked if idle or if you breach policies; ensure ingress rules in both OS firewall and OCI Security Lists.
-
Render free plan sleeps: expect cold starts and potential timeouts; background triggers that need constant uptime may fail—use cron/heartbeat or a ping service.
-
Compose v1 vs v2: many distros ship Compose v2 (
docker compose
). Ifdocker-compose
isn’t found, install v2 or use the space version. -
SSL termination: easiest path is a proxy container (e.g., Caddy) that auto-issues certs and forwards to n8n:5678.
-
Webhooks from third parties: some providers require a public HTTPS URL (no IP:port). Use a domain + valid cert or an HTTPS tunnel.
-
Backups: periodically export workflows/credentials; also snapshot the server disk (GCP/OCI) or back up the volume folder.
-
Security hygiene: rotate credentials, disable default admin, restrict IPs at the firewall, and keep Docker & n8n images updated.