Want to self-host n8n instead of using the cloud version? Good decision! In this guide, we'll show you step by step how to install n8n on an affordable VPS.
Why Self-Host n8n?
- Cost: From €3/month instead of €20+ for the cloud
- Privacy: Your workflows, your data
- No Limits: Unlimited executions and workflows
Hardware Requirements
Before you start, you should know what hardware you need. This depends on your usage:
| Usage | RAM | CPU | Storage |
|---|---|---|---|
| Hobby (< 20 workflows) | 2 GB | 1 vCPU | 20 GB |
| Standard (20-50 workflows) | 4 GB | 2 vCPU | 40 GB |
| Pro (50+ workflows) | 8 GB | 4 vCPU | 80 GB |
Our recommendation for getting started:
Step 1: Set Up VPS
After purchasing your VPS, connect via SSH:
ssh root@your-server-ip
Then update the system:
apt update && apt upgrade -y
Step 2: Install Docker
n8n runs best in Docker. Installation:
curl -fsSL https://get.docker.com | sh
Install Docker Compose:
apt install docker-compose-plugin -y
Step 3: Start n8n with Docker Compose
Create a folder and the docker-compose.yml:
mkdir -p /opt/n8n && cd /opt/n8n
version: "3"
services:
n8n:
image: n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=n8n.your-domain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://n8n.your-domain.com/
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
Start with:
docker compose up -d
Step 4: Reverse Proxy with Caddy
For HTTPS we recommend Caddy - it configures SSL automatically:
apt install -y caddy
/etc/caddy/Caddyfile:
n8n.your-domain.com {
reverse_proxy localhost:5678
}
systemctl reload caddy
Conclusion
With this setup you have a fully-featured n8n installation that:
- Automatically renews SSL certificates
- Starts automatically on reboots
- Stores your data persistently
Total cost: From €3.49/month for the server.
Frequently Asked Questions
More Self-Hosting Guides
Find the Right Server
Use our calculator to find the optimal VPS for your n8n installation
To n8n Calculator




