How to Self-Host n8n on Digital Ocean
By David Mansaray
By the end of this article (or video), you’ll know exactly how to self-host n8n — giving you unlimited workflows, full control over execution and costs far lower than the cloud plan.
Why Self-Host n8n?
Self-hosting n8n unlocks some key capabilities that the cloud version reserves for enterprise customers:
Unlimited Active Workflows
Parallel Execution without Limits
Run as many workflows concurrently as your server can handle.Cost Control
Swap monthly subscription fees for a predictable hosting bill.
Note: You’ll pay for your server, but you avoid tiered execution fees and enterprise customers.
Cloud vs Community Edition
Plan | Price (per month) | Workflow executions | Active workflows | Concurrent executions |
---|---|---|---|---|
Starter (cloud) | £24 (billed monthly) | 2 500 | 5 | 5 |
Pro (cloud) | £60 (billed monthly) | 10 000 | 15 | 20 |
Enterprise (cloud or self-hosted) | Contact us | ∞ | ∞ | 200+ |
Community (self-hosted) | ≈£5–£6 (Droplet only) | ∞ | ∞ | ∞ |
In practice, the community edition provides 95 % of what most users need. Consider cloud if you require advanced features like global variables, multiple environments or dedicated support.
Pros and Cons of Self-Hosting
Advantages
Unlimited use
Lower ongoing fees
Complete control over data and environment
Drawbacks
Server Management
You’re responsible for updates, backups, monitoring and security.Initial Setup
Requires familiarity with servers, SSH and basic Linux commands.
If you’d rather skip server administration, stick with the cloud version—but it really isn’t as daunting as it seems.
Prerequisites
Before you begin, make sure you have:
A registered domain name (e.g. yourdomain.ai)
A DigitalOcean account (or another VPS provider)
Basic knowledge of SSH and the Linux command line
Step-by-Step: Deploying on DigitalOcean
1. Create a Project & Droplet
Log in to DigitalOcean and create a new project
Click Create → Droplets.
Under Marketplace, search for and select the Docker image.
Scroll down, select Basic → Regular CPU and choose the $6 / month plan (1 vCPU, 1 GB RAM, 25 GB SSD).
Choose your SSH key or set a root password, then Create Droplet.
2. Add a Non-Root User
# SSH into the droplet as root ssh root@YOUR_DROPLET_IP # Create a new user adduser n8nuser (replace 'n8nuser' with your preferred username) # Grant sudo privileges usermod -aG sudo n8nuser # Exit root session exit
3. Install n8n as Your New User
ssh n8nuser@YOUR_DROPLET_IP # Install n8n git clone https://github.com/n8n-io/n8n-docker-caddy.git
4. Configure Environment Variables
Open the .env file in the n8n installation directory:
cd ~/.n8n nano .env
Update the following lines:
DATA_FOLDER=/<directory-path>/n&n-docker-caddy
(Replace <directory-path> with the path where you created folders earlier) use command pwn to get the directory.
DOMAIN_NAME=subdomain.yourdomain.ai
Save and exit (Ctrl+X, then Y).
5. Configure Caddy (Reverse Proxy & SSL)
# Edit the Caddyfile nano ~/Caddyfile
Replace the site block with your domain:
<subdomain.yourdomain.ai>
Save and exit.
6. Open Firewall Ports
sudo ufw allow 80,443/tcp sudo ufw enable
7. Point Your Domain
In your DNS provider’s dashboard, create an A record:
Name: subdomain (e.g. n8n)
Value: YOUR_DROPLET_IP
DNS changes may propagate in a few minutes to a couple of hours.
8. Start n8n
# Start n8n with Docker and Caddy docker compose up -d
Visit https://subdomain.yourdomain.ai to confirm your instance is live.
You now have a fully self-hosted n8n instance with:
Unlimited workflows
Full control over environment
Predictable hosting costs (~£5 / month)
Happy automating!