The fastest way to run n8n for free is on a $5/month VPS (Hetzner, DigitalOcean, or Vultr) using Docker. Install Ubuntu, install Docker, create a docker-compose.yml, and run docker compose up -d. n8n is live at your server IP on port 5678 in under 20 minutes — with no execution limits, ever.
n8n is one of the most powerful automation tools available — and it's completely free to self-host. Unlike Make.com or Zapier which charge per operation, a self-hosted n8n instance runs unlimited workflows, unlimited executions for the cost of a cheap server.
This guide covers three ways to get n8n running for free or near-free, with the VPS + Docker method explained in full detail. You don't need prior Linux experience — just the ability to follow steps in a terminal.
What are your options for running n8n for free?
| Method | Cost | Always-On? | Webhooks Work? | Best For |
|---|---|---|---|---|
| VPS + Docker (Hetzner/DO) | ~$5/month | Yes | Yes (with HTTPS) | Most small businesses — recommended |
| Railway free tier | Free (500 hrs/month) | Partial | Yes | Light testing / low-volume |
| Render free tier | Free | No (spins down) | Delayed (~30s cold start) | Very occasional workflows only |
| n8n Cloud free tier | Free (2,500 executions) | Yes | Yes | Beginners who don't want server management |
| Local machine | Free | No (offline when shut) | No (no public IP) | Development / testing only |
Recommendation: Use a VPS. At $5/month, it's the most reliable and cost-effective long-term option. Hetzner Cloud is the best value in 2026 (€3.99/month for the CX11). If you're in the US, DigitalOcean ($6/month) or Vultr ($2.50/month Starter) are solid alternatives.
How do you install n8n on a VPS using Docker — step by step?
Create a VPS server
Sign up at Hetzner Cloud (hetzner.com/cloud), DigitalOcean (digitalocean.com), or Vultr (vultr.com).
Create a new server / Droplet / Instance with: Ubuntu 22.04 LTS, the cheapest plan (1 vCPU, 2 GB RAM). Choose a region nearest to you. Set up an SSH key (recommended) or save the root password. Note the public IP address.
Connect to your server via SSH
Open your terminal (Mac/Linux) or Windows Terminal. Connect to your server:
ssh root@YOUR_SERVER_IPIf you set up an SSH key: ssh -i ~/.ssh/your_key root@YOUR_SERVER_IP. Once connected, update the system:
apt update && apt upgrade -yInstall Docker
Run the official Docker install script:
curl -fsSL https://get.docker.com | shThen install Docker Compose:
apt install docker-compose-plugin -yVerify installation: docker --version should return a version number.
Create the n8n docker-compose.yml file
Create a directory and the config file:
mkdir ~/n8n && cd ~/n8n
nano docker-compose.ymlPaste this configuration (replace the values in CAPS with your own):
version: "3"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=YOUR_USERNAME
- N8N_BASIC_AUTH_PASSWORD=YOUR_SECURE_PASSWORD
- N8N_HOST=YOUR_DOMAIN_OR_IP
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://YOUR_DOMAIN/
volumes:
- ~/.n8n:/home/node/.n8nSave and exit: Ctrl+X → Y → Enter.
Start n8n
docker compose up -dDocker downloads the n8n image and starts the container. This takes 1–2 minutes on first run. Check it's running:
docker compose psYou should see n8n with status Up. Open your browser and visit http://YOUR_SERVER_IP:5678 — you'll see the n8n login screen.
Set up HTTPS with Caddy (required for webhooks)
Stripe, Gmail, and most services require HTTPS for webhooks. Point a domain or subdomain (e.g. n8n.yourdomain.com) at your server's IP via your DNS settings. Then install Caddy:
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | \
gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | \
tee /etc/apt/sources.list.d/caddy-stable.list
apt update && apt install caddyEdit the Caddyfile:
nano /etc/caddy/CaddyfileReplace the default content with:
n8n.yourdomain.com {
reverse_proxy localhost:5678
}Restart Caddy: systemctl reload caddy. Caddy auto-issues a free SSL certificate. Your n8n instance is now live at https://n8n.yourdomain.com.
How do you install n8n completely free using Railway?
Railway is a cloud platform with a generous free tier — enough for light n8n usage at no cost:
- Go to railway.app and sign up with GitHub
- Click New Project → Deploy from Template
- Search for "n8n" in the template gallery and click Deploy
- Railway automatically sets up the container, a persistent volume, and a public URL
- Set environment variables:
N8N_BASIC_AUTH_ACTIVE=true,N8N_BASIC_AUTH_USER,N8N_BASIC_AUTH_PASSWORD - Your n8n instance is live within 2–3 minutes
Railway free tier limit: 500 execution hours/month on the Starter plan (free with GitHub login). For most small businesses running a handful of workflows, this is enough. If you exceed it, upgrade to the $5/month Hobby plan for unlimited hours.
How do you import a workflow template into n8n?
Once n8n is running, importing a workflow template takes 30 seconds:
- In n8n, click Workflows in the left sidebar
- Click the ⋮ (three dots) menu → Import from File
- Select the
.jsonfile from your downloaded template ZIP - The workflow opens pre-built — all nodes are connected, configured, and ready to use
- Click each node that requires a credential, authenticate with your Google/Stripe account
- Toggle the workflow to Active
How do you make sure n8n restarts automatically after a server reboot?
Two settings ensure n8n stays running even after a server restart:
- In docker-compose.yml — confirm you have
restart: alwaysunder the n8n service (it's included in the config above) - Enable Docker to start on boot:
systemctl enable dockerWith both settings in place, n8n automatically starts within 30 seconds of any server reboot — no manual intervention needed.
Security reminder: Never use a weak password for your n8n instance. It's exposed to the internet. Use a strong password (12+ characters, mixed) and consider limiting access by IP using your VPS firewall (iptables or ufw) if your IP address is static.
n8n is ready — now what?
Get a pre-built workflow template and have your first automation live in 20 minutes. Works on your self-hosted n8n instance — just import the JSON and connect your credentials.
Start with: automate review requests →