In this guide, you’ll learn how to install n8n on a Hostinger VPS using aaPanel, configure a reverse proxy with SSL, and make it production-ready with PM2 so it auto-starts on reboot.
👉 Perfect for developers and businesses who want to run n8n with a custom domain likehttps://n8n.yourdomain.com
🖥️ Step 1: Get a Hostinger VPS
If you don’t already have one, get a Hostinger VPS plan here:
👉 Buy VPS Hosting from Hostinger
We recommend:
-
Ubuntu 22.04 (64-bit)
-
Minimum 2 GB RAM / 1 vCPU
Once the VPS is ready, connect via SSH (you’ll get credentials from Hostinger).
🧰 Step 2: Install aaPanel
aaPanel is a clean, powerful Linux hosting control panel that simplifies server management.
Run this command to install aaPanel:
After installation, aaPanel will show you a login link and credentials.
Example:
⚙️ Step 3: Log in to aaPanel
Open the link in your browser, e.g.:
You’ll see the aaPanel dashboard.
👉 Choose LNMP (Nginx) stack during the first setup.
🌐 Step 4: Add Your Domain
-
Go to Website > Add Site
-
Domain:
n8n.yourdomain.com
-
Root Directory: auto-filled (keep default)
-
PHP: Pure static
-
Click Submit
Then, point your DNS (from your registrar) to your VPS IP.
🔄 Step 5: Install Node.js and PM2
Install Node.js v22 (required by n8n ≥ v1.73) and PM2:
Verify:
🤖 Step 6: Install n8n Globally
Check version:
🧱 Step 7: Set Up Reverse Proxy in aaPanel
Go to:
-
Website → n8n.yourdomain.com → Reverse Proxy → Add reverse proxy
Set:
-
Proxy Name: n8n
-
Proxy Directory:
/
-
Target URL:
http://127.0.0.1:5678
✅ Keep “Cache” disabled
✅ Click Save
🔐 Step 8: Enable Free SSL (Let’s Encrypt)
Go to:
-
Website → SSL → Let’s Encrypt
-
Add your domain:
n8n.yourdomain.com
-
Click Apply
⚡ Step 9: Start n8n with PM2 (Recommended Method)
Now we’ll make n8n run permanently in the background with proper environment variables.
Then save and enable auto-start:
Check:
You should see:
🧩 Step 10: Verify n8n Is Running
Visit:
If all went well, you’ll see the n8n setup page 🎉
Create your owner account.
🧠 Step 11: Check Webhook URLs
Inside n8n, when you create a Webhook node, you’ll now see:
✅ Clean URL (no port number):
If you see :5678
, it means environment variables weren’t applied — restart PM2 using:
🔧 Step 12: Auto Restart & Logs
To restart or debug:
🧾 Optional: Firewall Settings
Allow n8n’s internal port (just for internal proxy use):
🧱 Ready-to-Import Script
Here’s the ready script you can copy-paste into your VPS:
✅ Replace n8n.yourdomain.com
with your actual domain before running.
🌟 Done! You Now Have a Full n8n Server
You now have:
-
✅ n8n installed and secured with SSL
-
✅ aaPanel managing your server
-
✅ Nginx reverse proxy handling HTTPS
-
✅ PM2 keeping n8n always online
-
✅ Auto-start on reboot
You can now connect n8n to your apps, build workflows, and automate your business 🚀