How to Install n8n on DigitalOcean
The 1-click Marketplace app, the manual Docker route, which droplet size to actually pick, and the firewall rules you need either way.
Two Ways to Do This
DigitalOcean supports both. Pick based on how much you want to control versus how fast you want something running.
DigitalOcean Marketplace (1-click)
Search "n8n" in the Marketplace tab when creating a droplet. It provisions a droplet with the latest stable n8n pre-installed via Docker. Fastest path to a running instance, but you're on your own for SSL, backups, and update strategy afterward.
Best for: Getting something running to test in the next 5 minutes
Manual Docker + Caddy setup
Spin up a plain Ubuntu droplet, install Docker yourself, and write your own compose file with n8n, Postgres, and Caddy for automatic SSL. More steps, but you control the exact version, the database setup, and the update cadence from day one.
Best for: Anyone who wants Postgres and SSL configured correctly the first time
Going the manual route? Our Docker guide has the full compose file with Postgres and Caddy.
The Manual Setup, Step by Step
- 1
Create the droplet
New Droplet → Ubuntu 22.04 or newer, any size (upgrade later — see sizing below). In a hurry? Search "n8n" under the Marketplace tab instead and skip to step 6, since that image ships with Docker and n8n already installed.
- 2
Point a DNS A record at the droplet's IP
Add the record either in DigitalOcean's own DNS panel (if the domain's nameservers point there) or at your registrar. Propagation is usually fast, but can take a few hours.
- 3
SSH in and install Docker
curl -fsSL https://get.docker.com | sh installs Docker and the Compose plugin in one line on a fresh Ubuntu droplet. Confirm with docker compose version.
- 4
Write the compose file and a Caddyfile
n8n + Postgres in docker-compose.yml (our Docker guide has the full file), plus a two-line Caddyfile so Caddy handles SSL automatically — no separate Certbot step:
n8n.yourdomain.com { reverse_proxy n8n:5678 } - 5
Bring it up and verify
docker compose up -d, then docker compose logs -f n8n until it reports it's listening. Visiting your domain should show a valid certificate within seconds.
- 6
Lock down the firewall
Create a Cloud Firewall in the DigitalOcean control panel (it's a separate resource you attach to the droplet, not an inline setting) — see the exact rules below.
Which Droplet Size
These are DigitalOcean's actual droplet prices for each size — the same tiers we provision behind the scenes for every managed instance.
Basic
1 vCPU · 1 GB · 25 GB NVMe SSD
Standard
1 vCPU · 2 GB · 50 GB NVMe SSD
Enhanced
2 vCPU · 2 GB · 60 GB NVMe SSD
Power
2 vCPU · 4 GB · 80 GB NVMe SSD
Firewall Rules
Create a Cloud Firewall in the DigitalOcean control panel and attach it to the droplet:
- Inbound TCP 22 (SSH) — restrict to your IP if possible
- Inbound TCP 80 (HTTP) — needed for Caddy's certificate challenge
- Inbound TCP 443 (HTTPS) — the actual n8n traffic
- Outbound: allow all (n8n needs to reach external APIs)
DigitalOcean has datacenters across North America, Europe, and Asia — pick whichever region is closest to your team or the services your workflows call most.
Or Get It Already Configured
Same DigitalOcean droplets, with Postgres, Caddy, backups, and updates already set up. From $7/mo.
Frequently Asked Questions
Should I use the DigitalOcean Marketplace 1-click app or install manually?
The Marketplace app is faster if you just want to try n8n. But it makes decisions for you — database choice, container structure, update behavior — that you might want control over later. If you're planning to run this in production, the manual Docker + Caddy route takes maybe 20 extra minutes and you'll understand exactly what's running.
What droplet size should I pick for n8n on DigitalOcean?
1 GB RAM works for light testing. For anything with regular webhook traffic or more than a couple of active workflows, 2 GB RAM is a safer floor — RAM is what n8n actually runs out of first, not CPU. Go to 4 GB or more once you want queue mode for scaling.
Does the DigitalOcean Marketplace n8n app include SSL?
Not automatically — you still need to point a domain at the droplet and configure a reverse proxy (or run n8n's own SSL options) yourself. The Marketplace app installs n8n; it doesn't set up a domain or certificate for you.
How much does self-hosted n8n on DigitalOcean actually cost end to end?
The droplet itself starts around $6/mo for the smallest size. Add a domain (a few dollars a year), and budget your own time for updates, backups, and the occasional 2am incident — that's the part a raw droplet price doesn't show you.
Can I use DigitalOcean's managed Postgres database instead of running it in a container?
Yes, and it's a reasonable upgrade once you're past the testing phase — a managed database handles backups and failover for you. Point n8n's DB_POSTGRESDB_HOST at the managed database's connection string instead of a local container.
What's actually different between this and n8nautomation.cloud?
We provision the same DigitalOcean droplet sizes shown below, running the same n8n Community Edition — but pre-configured with Postgres, Caddy, automatic updates, daily backups, and monitoring already wired up. Same infrastructure, the setup work already done.
Skip the Firewall Rules Entirely
Get the same DigitalOcean droplet, pre-configured and managed. Free for 10 days, no charge until day 11.
Weighing self-hosted against managed generally? See all n8n hosting options →