Exclusive Metin2 game shield on FreeBSD: Automatic siege mode, VIP list, and whitelist from your dashboard. See how it works
Create a server

Guide

How to Set Up n8n on a VPS

n8n connects APIs and automates tasks (webhooks, CRMs, alerts). Self-hosting on a VPS avoids cloud-plan limits.

Steps

  1. Create a data folder and start n8n:

    mkdir -p ~/n8n && cd ~/n8n
    docker run -d --name n8n --restart unless-stopped -p 127.0.0.1:5678:5678 -e N8N_HOST=n8n.example.com -e N8N_PORT=5678 -e N8N_PROTOCOL=https -e WEBHOOK_URL=https://n8n.example.com/ -v ~/n8n/.n8n:/home/node/.n8n docker.n8n.io/n8nio/n8n
  2. ginx proxy to port 5678:

    sudo tee /etc/nginx/sites-available/n8n >/dev/null <<'EOF'server {  listen 80;  server_name n8n.example.com;  location / {    proxy_pass http://127.0.0.1:5678;    proxy_http_version 1.1;    proxy_set_header Upgrade $http_upgrade;    proxy_set_header Connection "upgrade";    proxy_set_header Host $host;  }}EOF
    sudo ln -sf /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/n8n
    sudo nginx -t && sudo systemctl reload nginx
  3. SSL with Certbot:

    sudo certbot --nginx -d n8n.example.com
  4. Open the UI and create the owner user:

    # https://n8n.example.com

Tips

  • Do not expose 5678 publicly without a proxy; the owner is created on first visit.
  • Back up ~/n8n/.n8n — workflows and credentials live there.

ext step

Automate on an always-on VPS: Deploy your Cloud VPS.

Related guides