How to Install N8N on CloudPanel (Debian 12)

Estimated reading: 2 minutes 13 views

Introduce:

N8N is a self-hosted, open-source workflow automation tool that allows you to connect applications and automate tasks through a visual interface. This guide walks you through installing N8N on a Debian 12 VPS using CloudPanel, a lightweight control panel for node.js hosting.

Prerequisites

  • A VPS or dedicated server running Debian 12
  • Root SSH access
  • A domain name pointing to your server’s IP address (for SSL)

Step 1: Update System Packages

Connect via SSH and run:

bash
apt update && apt -y upgrade && apt -y install curl wget sudo

Step 2: Set the Hostname

Edit your /etc/hosts file:

nano /etc/hosts

Find this line:

127.0.1.1 hostname

Replace cloudpanel.local with your custom hostname. Save and exit.

Step 3: Install CloudPanel

Download and run the installer:

bash
curl -sS https://installer.cloudpanel.io/ce/v2/install.sh -o install.sh
sudo DB_ENGINE=MARIADB_10.11 bash install.sh

Step 4: Configure the Firewall

Allow CloudPanel’s default port:

ufw allow 8443/tcp
sudo ufw status verbose

Step 5: Access CloudPanel

Open your browser and visit:

https://your_server_ip:8443

Ignore the certificate warning if necessary. Set up an admin account and time zone.

Step 6: Create a Site

In CloudPanel:

  • Go to Sites > Add Site > Create a Node.js Site
  • Enter the following details:
Field Value
Domain n8n.yourdomain.com
Version 22 LTS
App Port 5678
Site User n8nuser
Password Your secure password

Click Create and wait for it to complete.

Step 7: Install N8N and PM2

SSH into the site user:

ssh n8nuser@your_server_ip

Install N8N and PM2 globally:

npm install -g n8n
npm install -g pm2

Start N8N with your webhook URL:

WEBHOOK_URL=https://n8n.yourdomain.com pm2 start n8n
pm2 save

 

Allow the port:

ufw allow 5678/tcp

Step 8: Enable Free SSL

In CloudPanel:

  • Go to Sites > Manage for your N8N domain
  • Click the SSL/TLS tab

  • Choose New Let’s Encrypt Certificate

 

  • Click Create and Install

Step 9: Access N8N

Visit:

https://n8n.yourdomain.com

Complete the setup wizard and create your admin account.

Conclusion

You now have:

  • A secure Node.js environment
  • PM2 for process management
  • SSL with Let’s Encrypt
  • N8N running through CloudPanel
Share this Doc

How to Install N8N on CloudPanel (Debian 12)

Or copy link

CONTENTS