Back to Learn
Start here

Set up your own n8n instance

Every playbook on this site assumes you have a working n8n. Get it running in about 20 minutes on a cheap VPS and stop worrying about per-task pricing forever.

Why self-hosted

  • $5–$10/month for unlimited workflow executions.
  • Your client data never leaves a server you control.
  • Full access to community nodes (1,000+ integrations).
  • You can resell client deployments at a margin instead of reselling someone else's SaaS.

1. Pick a VPS

Hetzner CX22, DigitalOcean $6 droplet, or any Ubuntu 22.04+ box with 2GB RAM. Point a subdomain (e.g. n8n.yourdomain.com) at its IP via an A record.

2. Install with Docker Compose

Install Docker, then create ~/n8n/docker-compose.yml:

services:
  n8n:
    image: n8nio/n8n:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:5678:5678"
    environment:
      - N8N_HOST=n8n.yourdomain.com
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://n8n.yourdomain.com/
      - GENERIC_TIMEZONE=America/New_York
      - N8N_ENCRYPTION_KEY=change-me-to-a-long-random-string
    volumes:
      - ./data:/home/node/.n8n

Then run:

cd ~/n8n && docker compose up -d

3. HTTPS in front

Easiest path: Caddy. Install Caddy on the host, then drop this into /etc/caddy/Caddyfile:

n8n.yourdomain.com {
    reverse_proxy 127.0.0.1:5678
}

systemctl reload caddy and Caddy handles Let's Encrypt automatically. Alternative: Cloudflare Tunnel — no open ports, no certs to manage.

4. Credentials & env vars

  • Visit https://n8n.yourdomain.com and create the owner account on first load.
  • Add credentials per service under Settings → Credentials (OpenAI, Gmail OAuth, Slack, HubSpot, etc.). Never paste keys into nodes directly.
  • Back up the ./data volume — it holds your workflows AND encrypted credentials. Lose the N8N_ENCRYPTION_KEY and credentials are unrecoverable.

5. Importing a workflow

Most playbooks ship as a JSON file. In n8n: top-right menu → Import from File (or paste JSON). Re-wire the credentials on each node (they don't transfer between instances) and you're live.

n8n is running. Now build something.

Pick a playbook and ship your first workflow this weekend.

Browse the Top 10