← Back to Blog

How to Self-Host n8n on a VPS (2026)

Published May 3, 2026 · 6 min read · Galaxy Cloud Solutions

n8n is a workflow automation platform — think Zapier, but you run it yourself with no per-execution fees. The cloud version starts at $20/mo for 2,500 executions. Self-hosted on a $5 VPS, you get unlimited executions and your data never leaves your server.

⚡ Deploy a VPS from $5/mo — Use code LAUNCH2026 for 50% off

What You Need

Step 1: Install Node.js

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt install -y nodejs

Step 2: Install n8n

sudo npm install -g n8n

Step 3: Create a Service User and Systemd Unit

sudo useradd -m -s /bin/bash n8n
sudo mkdir -p /home/n8n/.n8n
sudo chown -R n8n:n8n /home/n8n

N8N_BIN=$(which n8n)
sudo tee /etc/systemd/system/n8n.service << EOF
[Unit]
Description=n8n workflow automation
After=network.target

[Service]
User=n8n
Environment=N8N_PORT=5678
Environment=N8N_HOST=0.0.0.0
ExecStart=$N8N_BIN start
Restart=always

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now n8n

Step 4: Access the UI

n8n runs on port 5678. Open it via SSH tunnel:

ssh -p YOUR_SSH_PORT -L 5678:localhost:5678 [email protected]

Visit http://localhost:5678 and create your owner account.

What You Can Build

One-click n8n installer included

Every Galaxy Cloud Solutions VPS includes a one-click n8n installer. Click the button, wait two minutes, done. Plans start at $5/mo.

Get Started