How to Use Node.js on Plesk
Plesk provides native support for Node.js applications via the Node.js extension, making it easy to run and manage JavaScript server-side apps.
✅ Prerequisites
Before you begin:
-
Ensure the Node.js extension is installed (Plesk admin can install it)
-
You have a domain or subdomain ready
-
Your Node.js app files are uploaded (or you're starting from scratch)
Step 1: Install the Node.js Extension (Admin Only)
-
Go to Extensions > Extension Catalog
-
Search for Node.js
-
Click Install
Once installed, the Node.js tab will appear in domain settings.
Step 2: Create or Upload Your Node.js App
Option A: Create from Scratch
-
Go to Websites & Domains
-
Click File Manager and navigate to
/httpdocs
-
Create a new file called
app.js
with example content:
const http = require('http');
const port = process.env.PORT || 3000;
http.createServer((req, res) => {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello from Node.js on Plesk!\n');
}).listen(port);
Option B: Upload an Existing App
-
Zip and upload your Node.js app via File Manager or FTP
-
Unzip into the
httpdocs
directory or a subfolder
Step 3: Enable Node.js for Your Domain
-
Go to Websites & Domains
-
Click Node.js
-
Set the application root (e.g.,
/httpdocs
or/httpdocs/myapp
) -
Set the startup file (
app.js
,server.js
, etc.) -
Choose the Node.js version
-
Click Enable Node.js
Step 4: Install Dependencies
-
In the Node.js tab, click Run NPM install
-
This will read your
package.json
and install required modules
-
-
You can also run custom npm scripts if needed (e.g.,
npm run build
)
Step 5: Start the App
Plesk uses Phusion Passenger to run Node.js apps. Once configured, your app will automatically run on the specified port.
Your app will now be accessible via:
https://yourdomain.com
No need to run node app.js
manually — Plesk manages the process.
Optional: Advanced Configuration
-
Set environment variables via the Node.js > Environment Variables tab
-
Add build tools (like Webpack or TypeScript) to
devDependencies
-
Use Git deployment + Node.js for a CI/CD workflow
Summary
Task | Where |
---|---|
Install Node.js support | Extensions > Node.js |
Enable Node.js | Websites & Domains > Node.js |
Upload files | File Manager or FTP |
Install packages | Node.js tab > NPM Install |
Start app | Node.js tab > Enable Node.js |