• Latest
  • Trending
  • All
Installing & Configuring n8n on VPS (pm2 + LiteSpeed)

Installing & Configuring n8n on VPS (pm2 + LiteSpeed)

September 27, 2025
🚀 How to Install n8n on aaPanel (Hostinger VPS) — With Ready-to-Import Script

🚀 How to Install n8n on aaPanel (Hostinger VPS) — With Ready-to-Import Script

October 20, 2025
Automate Doctor Appointments with WhatsApp: Complete n8n Workflow Guide

Automate Doctor Appointments with WhatsApp: Complete n8n Workflow Guide

October 17, 2025
Build a Complete WhatsApp Commerce Bot for WooCommerce with Automated Order Management, Razorpay Payment Integration, and AI-Powered Customer Support Using n8n — No Coding Required

Build a Complete WhatsApp Commerce Bot for WooCommerce with Automated Order Management, Razorpay Payment Integration, and AI-Powered Customer Support Using n8n — No Coding Required

October 9, 2025
How to Build an AI WhatsApp Chatbot with n8n and OpenAI (Step-by-Step Guide)

How to Build an AI WhatsApp Chatbot with n8n and OpenAI (Step-by-Step Guide)

October 2, 2025
🚀 How to Send WooCommerce Order Notifications on WhatsApp Without Using Cloud API

🚀 How to Send WooCommerce Order Notifications on WhatsApp Without Using Cloud API

May 8, 2025
How to Create a Flight and Tour Booking Website & App Using WordPress (With Skyscanner Integration)

How to Create a Flight and Tour Booking Website & App Using WordPress (With Skyscanner Integration)

April 6, 2025
Introducing CargoHub: The Ultimate WooCommerce Courier and Logistics Plugin

Introducing CargoHub: The Ultimate WooCommerce Courier and Logistics Plugin

February 28, 2025
How to Connect WooSMS API with OTP Login Woocommerce Plugin

How to Connect WooSMS API with OTP Login Woocommerce Plugin

February 1, 2025
How to Launch Your Own Flight and Hotel Booking Website with a Ready-Made Script

How to Launch Your Own Flight and Hotel Booking Website with a Ready-Made Script

January 27, 2025
How to Add WhatsApp as a Payment Gateway in WooCommerce | Order on WhatsApp for WooCommerce

How to Add WhatsApp as a Payment Gateway in WooCommerce | Order on WhatsApp for WooCommerce

December 21, 2024
Shipment Tracker for WooCommerce: Simplify Your Shipping Process

Shipment Tracker for WooCommerce: Simplify Your Shipping Process

December 16, 2024
How to Get Your WhatsApp Business Display Name Approved: WhatsApp branding guidelines

How to Get Your WhatsApp Business Display Name Approved: WhatsApp branding guidelines

November 14, 2024
  • Home
  • Contact us
  • Domain Checker
  • Portfolio
  • Privacy Policy
Monday, October 20, 2025
  • Login
Wp Hacks4u
  • Home
  • Domain Checker
  • wordpress
    • woocommerce
    • SSL
    • Google Map
  • Tech
  • Portfolio
  • CargoHub
No Result
View All Result
Wp Hacks4u
No Result
View All Result
Home N8N

Installing & Configuring n8n on VPS (pm2 + LiteSpeed)

by RAHUL
September 27, 2025
in N8N
0
Installing & Configuring n8n on VPS (pm2 + LiteSpeed)
499
SHARES
1.4k
VIEWS
Share on FacebookShare on Twitter

1. Install n8n

npm install -g n8n

Run once to check:

n8n start

2. Set Up pm2 Process Manager

Install pm2 if not already installed:

npm install -g pm2

3. Create n8n Config Directory

mkdir -p /root/.n8n
cd /root/.n8n

4. Create Ecosystem Config for pm2

Create the file:

nano /root/.n8n/ecosystem.config.js

Paste this:

module.exports = {
apps: [
{
name: "n8n",
script: "n8n",
env: {
WEBHOOK_URL: "https://n8n.yourdomain.com/",
N8N_HOST: "0.0.0.0",
N8N_PORT: 5678,
N8N_PROTOCOL: "https",
N8N_EDITOR_BASE_URL: "https://n8n.yourdomain.com/"
}
}
]
};

5. Start n8n with pm2

cd /root/.n8n
pm2 start ecosystem.config.js
pm2 save

Check running processes:

pm2 ls

Check environment variables:

pm2 env <ID>

👉 You should see WEBHOOK_URL and N8N_EDITOR_BASE_URL.


6. Configure LiteSpeed for WebSockets

Since n8n relies on WebSockets, configure LiteSpeed:

  • Virtual Host → Web Socket Proxy → Add

    • URI: /

    • Address: 127.0.0.1:5678

  • Proxy Context → Header Operations (add):

    Host $host
    X-Real-IP $remote_addr
    X-Forwarded-For $proxy_add_x_forwarded_for
    X-Forwarded-Proto $scheme
    Upgrade $http_upgrade
    Connection "upgrade"
  • Disable response buffering.

  • Restart LiteSpeed.


7. Webhook URLs

  • n8n generates two webhook URLs:

    • Test URL → works only when editor is open.

    • Production URL → works when workflow is activated.

Example:

https://n8n.yourdomain.com/webhook/<workflow-id>/<path>

👉 Always activate workflows (toggle ON) to use production webhooks.


8. Branding (Optional)

Add to .env or ecosystem env block:

N8N_BRANDING_TITLE="Your Company Automations"
N8N_BRANDING_LOGO=https://yourdomain.com/logo.png
N8N_BRANDING_FAVICON=https://yourdomain.com/favicon.ico

Restart pm2 after changes:

pm2 restart n8n

9. Useful Commands

  • Restart n8n:

    pm2 restart n8n
  • Stop n8n:

    pm2 stop n8n
  • View logs:

    pm2 logs n8n

✅ Summary

  • Installed n8n with npm.

  • Used pm2 + ecosystem.config.js to manage and persist environment variables.

  • Configured LiteSpeed WebSocket proxy for stable workflow execution.

  • Set WEBHOOK_URL and N8N_EDITOR_BASE_URL so webhooks show the correct public domain.

  • Optional branding applied with env variables

Tags: hostingN8NVPS
Share200Tweet125
RAHUL

RAHUL

  • Trending
  • Comments
  • Latest
How to make fake WooCommerce reviews? | Automatically generate reviews for your WooCommerce product

How to make fake WooCommerce reviews? | Automatically generate reviews for your WooCommerce product

June 18, 2022
How to Create a Hotel or Tour Booking Website with HotelEase – Ultimate Hotel Booking Website Software for WordPress

How to Create a Hotel or Tour Booking Website with HotelEase – Ultimate Hotel Booking Website Software for WordPress

November 14, 2024
How to convert a WordPress or Woocommerce website into an App for Free

How to convert a WordPress or Woocommerce website into an App for Free

June 30, 2023
How to Buy a Domain & Hosting in Hostinger And install WordPress in 5 Minute

How to Buy a Domain & Hosting in Hostinger And install WordPress in 5 Minute

4
HOW TO CREATE A CAKE ORDERING WEBSITE | ONLINE CAKE SHOP | TUTORIAL

HOW TO CREATE A CAKE ORDERING WEBSITE | ONLINE CAKE SHOP | TUTORIAL

1
HOW TO MAKE WOOCOMMERCE FOOD ORDERING WEBSITE LIKE ZOMATO&SWIGGY

HOW TO MAKE WOOCOMMERCE FOOD ORDERING WEBSITE LIKE ZOMATO&SWIGGY

1
🚀 How to Install n8n on aaPanel (Hostinger VPS) — With Ready-to-Import Script

🚀 How to Install n8n on aaPanel (Hostinger VPS) — With Ready-to-Import Script

October 20, 2025
Automate Doctor Appointments with WhatsApp: Complete n8n Workflow Guide

Automate Doctor Appointments with WhatsApp: Complete n8n Workflow Guide

October 17, 2025
Build a Complete WhatsApp Commerce Bot for WooCommerce with Automated Order Management, Razorpay Payment Integration, and AI-Powered Customer Support Using n8n — No Coding Required

Build a Complete WhatsApp Commerce Bot for WooCommerce with Automated Order Management, Razorpay Payment Integration, and AI-Powered Customer Support Using n8n — No Coding Required

October 9, 2025
Wp Hacks4u

Copyright © 2025 Wphacks4u.com

Navigate Site

  • Home
  • Contact us
  • Domain Checker
  • Portfolio
  • Privacy Policy

Follow Us

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now
This is a test site
Build with Digits
Protected by   
No Result
View All Result
  • Home
  • Domain Checker
  • wordpress
    • woocommerce
    • SSL
    • Google Map
  • Tech
  • Portfolio
  • CargoHub

Copyright © 2025 Wphacks4u.com

Enable Notifications OK No thanks