Node.js on aaPanel: setup and configuration
Deploy Node.js applications on aaPanel. Learn installation, reverse proxy configuration, PM2 process management, and troubleshooting.
On this page
aaPanel makes Node.js deployment straightforward. It handles process management (PM2), reverse proxy setup (Nginx), and SSL certificates automatically. You focus on your code; aaPanel handles the infrastructure.
Requirements
- Cloud VPS with aaPanel installed (or Dedicated Server)
- Sufficient resources: At least 1GB RAM (2GB+ recommended)
- Node.js app ready to deploy: Git repository or uploaded code
- Domain name pointing to VPS (optional, can use IP initially)
Install Node.js in aaPanel
- Log in to aaPanel
- Go to App Store → Node.js
- Click the desired Node.js version (14.x, 16.x, 18.x recommended)
- Click Install
- Wait for installation (takes 2-5 minutes)
Create Node.js app
- In aaPanel, go to Websites → Node.js
- Click Add Node.js App
- Enter app name (e.g., "myapp")
- Select Node.js version
- Enter app port (e.g., 3000—keep above 1024)
- Choose deployment method:
- Git: Clone from GitHub/GitLab (recommended)
- Upload: Upload ZIP file directly
- If Git: Enter repository URL and branch
- Click Add
aaPanel automatically:
- Creates project directory
- Clones code (if Git)
- Installs dependencies (
npm install) - Starts app with PM2
- Creates Nginx reverse proxy
PM2 process management
PM2 keeps your Node.js app running. aaPanel manages PM2 automatically:
- Start app: Use aaPanel restart button
- View logs: Websites → Node.js → [App] → Logs
- Environment variables: Create .env file in project root
- Auto-restart on failure: PM2 restarts automatically
Access PM2 via SSH (advanced):
pm2 list # Show all apps
pm2 logs appname # View real-time logs
pm2 restart appname # Restart app
pm2 stop appname # Stop app
Nginx reverse proxy
aaPanel automatically creates Nginx reverse proxy pointing traffic to your Node.js app. For a domain:
- User requests: yourdomain.com
- Nginx receives on port 80/443
- Proxies to Node.js app on port 3000 (or your configured port)
- Response sent back to user
Bind domain to app
- In aaPanel, click Websites → Node.js → [App]
- Click Add Domain
- Enter your domain name (e.g., example.com)
- SSL certificate auto-issued (Let's Encrypt)
- Click Add
App now accessible at yourdomain.com (HTTPS automatically configured).
Troubleshooting
App won't start:
- Check app logs: Websites → Node.js → [App] → Logs
- Verify package.json exists in project root
- Check Node.js version compatibility
- Try manual restart via SSH:
pm2 restart appname
High CPU/Memory usage:
- Check logs for errors or infinite loops
- Monitor with:
pm2 monit - Increase VPS RAM if needed
Can't connect to domain:
- Verify domain DNS points to VPS IP
- Check firewall isn't blocking ports 80/443
- Verify app is running:
pm2 list
Node.js apps on aaPanel are managed like web applications—no SSH command-line required. aaPanel handles PM2, Nginx configuration, SSL, and monitoring automatically.
Related: aaPanel overview | CloudPanel Node.js | VPS management
Need aaPanel hosting?
Install aaPanel on an UnderHost VPS or dedicated server when you want a simple web interface for sites, databases, SSL, and apps.





















