This guide will walk you step-by-step through setting up n8n, a powerful workflow automation tool, on a budget-friendly DownDoggy.com VPS. You’ll secure it with your own domain and SSL, and be up and running in under 30 minutes!

✨ Who this is for: Anyone comfortable copying commands into a terminal, and who trusts their favorite LLM (like ChatGPT) when things get tricky.


What You’ll Need


πŸ› οΈ Step 1: SSH into Your Server

Once you have your VPS Account setup, you’ll need to SSH into your VPS server.

ssh root@your-server-ip
Tip: You can find your IP from your DownDoggy Control Panel when you activated your VPS.

πŸ”„ Step 2: Update Your Server

Keep things fresh and secure:

sudo apt update && sudo apt upgrade -y





πŸ‘€ Step 3: (Optional but Recommended) Create a Non-Root User

adduser n8nuser
usermod -aG sudo n8nuser
su - n8nuser

🐳 Step 4: Install Docker and Docker Compose

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo apt install docker-compose-plugin -y
sudo usermod -aG docker $USER
newgrp docker  # Apply group change immediately

πŸ“ Step 5: Set Up Your n8n Folder

mkdir ~/n8n && cd ~/n8n
mkdir n8n_data

πŸ“ Step 6: Create Your docker-compose.yml

nano docker-compose.yml
services:
  n8n:
    image: n8nio/n8n
    ports:
      - "5678:5678"
    volumes:
      - ./n8n_data:/home/node/.n8n
    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=admin
      - N8N_BASIC_AUTH_PASSWORD=(YOUR STRONG PASSWORD)
      - N8N_PAYLOAD_SIZE_MAX="64mb"
      - TZ=America/Los_Angeles
      - N8N_HOST=automation.your-domain.com
      - N8N_PROTOCOL=https
      - N8N_PORT=5678
      - WEBHOOK_URL=https://automation.your-domain.com
      - N8N_SECURE_COOKIE=false
      - N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=true
    restart: always
Save and exit (Ctrl+O, Enter, Ctrl+X).

▢️ Step 7: Launch n8n

docker compose up -d

Check it’s running:

docker ps
You should see n8n running with port 5678 exposed.

🌐 Step 8: Point Your Domain to Your Server

Login to your domain registrar and create an A record:

Wait ~5 minutes for DNS to propagate.


🌐 Step 9: Install NGINX to Reverse Proxy

sudo apt install nginx -y

Create the config:
sudo nano /etc/nginx/sites-available/n8n

Paste this (use your real domain!):
nginxCopyEditserver {
    listen 80;
    server_name automation.your-domain.com;

    location / {
        proxy_pass http://localhost:5678;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable and reload:

sudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
sudo rm /etc/nginx/sites-enabled/default
sudo nginx -t
sudo systemctl reload nginx

Check:

curl -I http://localhost

Should return 200 OK.


πŸ”’ Step 10: Secure with SSL via Let’s Encrypt

Install Certbot:

sudo apt install certbot python3-certbot-nginx -y
Run:
sudo certbot --nginx -d automation.your-domain.com

Choose Option 1: Reinstall if it finds an existing cert.

This will:
βœ… Secure your site with HTTPS
βœ… Automatically update your NGINX config
βœ… Enable auto-renewals

Test it:

https://automation.your-domain.com

You should see the n8n login screen with a secure lock!


🧠 Troubleshooting Tips

ErrorFix
413 Payload Too LargeMake sure N8N_PAYLOAD_SIZE_MAX="64mb" in Docker and client_max_body_size 64M; in NGINX
Lost connection to serverConfirm WebSocket headers are set in NGINX config
AI Agent fails to call toolCheck your MCP tool exposes a valid JSON schema
n8n container restartsUse docker logs n8n-n8n-1 to debug and watch memory via docker stats


βœ… Final Checks & Tips


πŸŽ‰ You’re Done!

You’ve now got:

If you have any issues with this setup feel free to reach out to the community for help!

Leave a Reply

Your email address will not be published. Required fields are marked *