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?

MethodCostAlways-On?Webhooks Work?Best For
VPS + Docker (Hetzner/DO)~$5/monthYesYes (with HTTPS)Most small businesses — recommended
Railway free tierFree (500 hrs/month)PartialYesLight testing / low-volume
Render free tierFreeNo (spins down)Delayed (~30s cold start)Very occasional workflows only
n8n Cloud free tierFree (2,500 executions)YesYesBeginners who don't want server management
Local machineFreeNo (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?

1

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.

2

Connect to your server via SSH

Open your terminal (Mac/Linux) or Windows Terminal. Connect to your server:

ssh root@YOUR_SERVER_IP

If you set up an SSH key: ssh -i ~/.ssh/your_key root@YOUR_SERVER_IP. Once connected, update the system:

apt update && apt upgrade -y
3

Install Docker

Run the official Docker install script:

curl -fsSL https://get.docker.com | sh

Then install Docker Compose:

apt install docker-compose-plugin -y

Verify installation: docker --version should return a version number.

4

Create the n8n docker-compose.yml file

Create a directory and the config file:

mkdir ~/n8n && cd ~/n8n nano docker-compose.yml

Paste 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/.n8n

Save and exit: Ctrl+X → Y → Enter.

5

Start n8n

docker compose up -d

Docker downloads the n8n image and starts the container. This takes 1–2 minutes on first run. Check it's running:

docker compose ps

You should see n8n with status Up. Open your browser and visit http://YOUR_SERVER_IP:5678 — you'll see the n8n login screen.

6

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 caddy

Edit the Caddyfile:

nano /etc/caddy/Caddyfile

Replace 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:

  1. Go to railway.app and sign up with GitHub
  2. Click New Project → Deploy from Template
  3. Search for "n8n" in the template gallery and click Deploy
  4. Railway automatically sets up the container, a persistent volume, and a public URL
  5. Set environment variables: N8N_BASIC_AUTH_ACTIVE=true, N8N_BASIC_AUTH_USER, N8N_BASIC_AUTH_PASSWORD
  6. 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:

  1. In n8n, click Workflows in the left sidebar
  2. Click the ⋮ (three dots) menu → Import from File
  3. Select the .json file from your downloaded template ZIP
  4. The workflow opens pre-built — all nodes are connected, configured, and ready to use
  5. Click each node that requires a credential, authenticate with your Google/Stripe account
  6. 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:

  1. In docker-compose.yml — confirm you have restart: always under the n8n service (it's included in the config above)
  2. Enable Docker to start on boot:
systemctl enable docker

With 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.

From $47 — one-time, runs forever on your n8n instance
Browse Templates →
Start with: automate review requests →

Frequently asked questions

n8n runs comfortably on 1 vCPU and 1–2 GB RAM. A Hetzner CX11 (€3.99/month), DigitalOcean Basic Droplet ($4/month), or Vultr Cloud Compute ($2.50/month) are all sufficient for a small business running dozens of workflows. Only upgrade when you're running hundreds of concurrent workflow executions.
Yes — Railway and Render both have free tiers that can host n8n at no cost. Railway's free tier gives 500 hours/month (enough for light use). Render's free tier spins down after inactivity, causing a ~30 second cold start on the first webhook. For always-on workflows, a $5/month VPS is more reliable.
No. Most n8n workflows use pre-built nodes with visual configuration — no code required. n8n does include a Code node for JavaScript if you want it, but the vast majority of workflows (connecting Gmail, Sheets, Stripe, webhooks) are built entirely using the visual interface. The setup above requires only basic command-line confidence.
Self-hosted n8n is free — you manage your own server and backups. n8n Cloud is the managed SaaS version, starting at $20/month — no server management required but you pay per execution. Self-hosted is better value for technical users; n8n Cloud is better for people who want everything managed.
Add restart: always to your Docker Compose service definition and enable Docker to start on boot with systemctl enable docker. With these two settings, n8n survives server reboots automatically — starting within 30 seconds of any reboot without manual intervention.
Your workflows are stored in a SQLite database file inside the Docker volume you configured (the ~/.n8n directory). To back up: copy the ~/.n8n directory to a safe location or your local machine. You can also export individual workflows from the n8n UI as JSON files — useful for sharing or restoring after reinstall.