How to Self-Host n8n on a DigitalOcean Droplet (Step-by-Step Guide)

Looking for a powerful, budget-friendly way to run your automations without limits? Self-hosting n8n on a DigitalOcean droplet gives you full control, unlimited workflows, and major cost savings compared to cloud-based automation tools. This guide walks you through everything you need to know.


Why Host n8n Yourself?

Most automation platforms charge more as you scale. With self-hosted n8n:

  • Unlimited workflows – No monthly execution caps
  • Lower costs – As little as $6/month
  • Full control – Keep your data, add custom integrations, and scale on your terms
  • Persistent storage – Workflows and credentials are saved, unlike free cloud plans

🚀 Ready to Get Started?

Choose a DigitalOcean Droplet

We recommend the Basic Droplet:

  • Ubuntu 22.04 LTS
  • 1 GB RAM / 1 vCPU
  • 25GB SSD
  • Starts at $6/month

Use this link to create your DigitalOcean droplet and get $200 in free credits

Claim Your $200 DigitalOcean Credit Here


Step 1: Create Your Droplet

  1. Go to DigitalOcean
  2. Select Ubuntu 22.04 LTS
  3. Choose the 1GB Basic plan
  4. Add your SSH key or use a password (for testing only)
  5. Launch the droplet

Step 2: SSH Into the Server

ssh root@your_droplet_ip

Step 3: Install Docker & Docker Compose

sudo apt update && sudo apt install docker.io docker-compose -y
sudo systemctl enable docker --now

Step 4: Set Up Your n8n Docker Environment

Create a folder:

mkdir n8n && cd n8n

Create your docker-compose.yml file:

version: "3"
services:
  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=strongpassword123
      - N8N_HOST=yourdomain.com
      - WEBHOOK_TUNNEL_URL=https://yourdomain.com
    volumes:
      - ./n8n-data:/home/node/.n8n

Start the container:

docker-compose up -d

Step 5: Set Up a Reverse Proxy with HTTPS

Use NGINX and Let’s Encrypt to secure your setup.

Or use Caddy (simpler alternative):

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

Then configure your domain in Caddyfile:

yourdomain.com {
  reverse_proxy localhost:5678
}

🚨 Ready to Power Up Your Automation?

🌐 Get $200 in Free DigitalOcean Credits

Launch your n8n server today for free with our referral link:

Click Here to Launch Your Own Droplet →

🚀 No More Execution Limits

Self-hosted n8n gives you total freedom. You decide how many workflows, integrations, and triggers to run.

If you decide to try the n8n paid tier, you can try it free using this link.

✅ Own Your Data, Run It Your Way

No vendor lock-in. No recurring charges per workflow. Just fast, secure, scalable automation under your control.

Download Your FREE

Dev Stack Starter Guide

Build, automate, and launch faster—see the automation stack developers and agencies are switching to.

  • ✅ API Templates & Code Snippets
  • ✅ Done-for-You Automation Workflows
  • ✅ Step-by-Step Funnel & CRM Guide
  • ✅ Free for Developers, Freelancers, & SaaS Builders











We Respect Your Privacy