This guide explains how to deploy a Node.js application on Plesk for Windows only.
Before You Start
Make sure you have:
- Access to Plesk.
- A domain or subdomain already created in Plesk.
- Your Node.js project files ready.
- A valid startup file, such as
app.js,server.js, orindex.js. - A
package.jsonfile if your application uses npm packages.
If the Node.js option is not available in Plesk, the server administrator must install the required Windows components: Node.js IIS module (iisnode) and Node.js from Plesk updates/components.
Step 1: Upload Your Node.js Application Files
- Log in to Plesk.
- Go to Websites & Domains.
- Open the domain or subdomain where you want to deploy the application.
- Open File Manager.
- Upload your Node.js application files.
For most simple deployments, upload the application files inside the domain’s main folder, usually:
httpdocs
Your project should include files such as:
package.json
app.js
server.js
index.js
web.config
The exact startup file depends on your application.
Step 2: Open Node.js Settings
- Go to Websites & Domains.
- Select the required domain or subdomain.
- Click Node.js or Node.js Manager.
The Node.js Toolkit must be installed on the server before this option appears. Plesk states that once the extension is installed, the Node.js option becomes available for domains.
Step 3: Configure the Application
In the Node.js settings, configure the following:
Application Root
Set this to the folder containing your Node.js application files.
Example:
/httpdocs
Document Root
For Plesk Windows, the Document Root is usually also set to:
/httpdocs
This is different from many Linux-based Node.js deployments, where the document root may point to a separate public folder.
Application Startup File
Select the main file that starts your application.
Examples:
app.js
server.js
index.js
When you select a startup script in Plesk Windows, Plesk configures IIS/iisnode so that the selected file serves as the Node.js application entry point.
Application Mode
Choose the required mode:
production
or
development
For live websites, use production.
Step 4: Install npm Dependencies
If your project includes a package.json file:
- Open the Node.js settings in Plesk.
- Click NPM install.
This installs the dependencies listed in your package.json.
If the NPM install button is missing, check that package.json exists in the configured Application Root.
Step 5: Enable Node.js
After configuring the application:
- Click Enable Node.js.
- Click Restart App if required.
Plesk allows you to enable, disable, and restart the Node.js application from the domain’s Node.js page. Application logs can also be checked from Plesk’s log tools.
Step 6: Add or Check the web.config File
Because this is Plesk on Windows, the application runs through IIS. Your application may need a web.config file to route requests correctly through iisnode.
A basic example:
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="Node.js" stopProcessing="true">
<match url=".*" />
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Replace app.js with your actual startup file, for example:
server.js
or
index.js
For Express applications, routing issues can occur if IIS forwards only the root URL to the startup file. A common fix is to ensure all requests are rewritten to the startup script, not just the home page.
Example Express App
Example app.js:
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
app.get('/', function (req, res) {
res.send('Node.js app is running on Plesk Windows');
});
app.get('/about', function (req, res) {
res.send('About page');
});
app.listen(port, function () {
console.log('Application started');
});
Example package.json:
{
"name": "plesk-windows-nodejs-app",
"version": "1.0.0",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "^4.18.0"
}
}
Important Notes for Plesk Windows
Plesk Windows Uses IIS and iisnode
Node.js applications on Plesk Windows run through IIS using the iisnode module. This means routing and rewrite rules may be required in web.config.
Only One Node.js Version Is Used Server-Wide
On Plesk Linux, different domains may use different Node.js versions. On Plesk Windows, only one Node.js version can be installed and used at a time for all Node.js applications on the server.
Do Not Use Linux-Only Instructions
Do not use Linux-specific commands or configurations such as:
pm2
Passenger
.htaccess
systemctl
These are not applicable to standard Plesk Windows Node.js hosting.
Troubleshooting
Node.js Option Is Missing
The Node.js Toolkit or Windows Node.js components may not be installed on the server. Contact your hosting provider or server administrator.
NPM Install Button Is Missing
Make sure the package.json file exists in the Application Root directory.
Website Shows an Error or Blank Page
Check the following:
- The correct startup file is selected.
- Node.js is enabled.
- Dependencies were installed using NPM install.
- The
web.configfile points to the correct startup file. - The application works locally before uploading.
Express Routes Do Not Work
If the home page works, but routes such as /about, /login, or /api do not work, check the IIS rewrite rule in web.config.
Make sure requests are rewritten to the startup file:
<match url=".*" />
<action type="Rewrite" url="app.js" />
Replace app.js with your actual startup file.
Application Does Not Start
Review the application logs in Plesk. Common causes include:
- Missing npm packages.
- Wrong startup file.
- Syntax errors in the application.
- Incorrect
web.config. - Application trying to use a fixed port that is not supported.
Use:
process.env.PORT
Instead of hardcoding a port.
Example:
const port = process.env.PORT || 3000;
When to Contact Support
Contact support if:
- The Node.js option is not available in Plesk.
- NPM install fails with server-level errors.
- The application fails even after checking the startup file and
web.config. - You need to confirm the supported Node.js version on the server.
- The issue appears related to IIS, iisnode, or Plesk server configuration.
When contacting support, include:
- Domain name.
- Application Root.
- Startup file name.
- Screenshot of the Node.js settings.
- Error message or log output.
- Your
web.configfile, if available.