Plesk Node.Js Setup

Node.js on Plesk Onyx

If you’re interested in hosting Node.js apps, we’ve got good news for you. Plesk Onyx comes with a new Node.js extension that allows you to manage apps easily. In this article, we’ll describe in detail how to work with Node.js apps in the context of Plesk Onyx. 

Get Node.js Extension



The first thing you need to do is install Plesk Onyx, the latest version of Plesk. I chose Debian 8 as the server OS for this article. You can use either a Linux distro or Windows – just note that there could be some minor differences if you go with a different OS. Assuming Plesk Onyx is already installed, let’s install the Node.js extension. Log in to Plesk, go to Tools & Settings, and click “Updates and Upgrades”. Next, go to “Add/Remove Components”. Find the “NodeJS support” component, select it, and continue with the installation. In a few minutes, all the necessary components will be installed and you’ll be ready to go!

Plesk Node Js component installation

Hello World App

To make sure everything works, let’s try to host a sample Node.js app, such as a “Hello, World” app. You can download one here: While copy/pasting the contents of the app.js file manually is an option, I suggest trying out another Plesk Onyx extension instead – namely, the Git extension. You need to create a subscription (a domain with hosting). Then, you need to create a target directory where the app will be stored. Select your subscription, go to the “Files” tab, and create a directory named “hello-world”. Next, go to the “Websites & Domains” tab and click the “Git” button. I will now teach you how to set up a local repo as a mirror of a remote one and deploy the code to the previously created directory. Set as the remote Git repo URL and change the target to the “hello-world” directory. The settings should look like this: Node JS git repo setup The next step is to change the “Document root” for the domain. Notice that I’ll be talking about  “Document root” and “Application root”: they are not one and the same. When we’re talking about web apps (e.g. Node.js based apps or similar), the “Document root” is the location where the static assets can be found. Meanwhile, the “Application root” is the root directory where the app itself is located. In most cases, the “Document root” is a directory inside the “Application root” directory (e.g. “public”). You need to change the “Document root” now. To do so, go to “Websites & Domains”, click “Hosting Settings”, change “Document root” to “hello-world/public” (without quotes), and click the “Ok” button to save the changes. The last thing before you run the app is to enable Node.js support on the domain. Go to “Websites & Domains” and click “Node.js”. Here you will see some information about your app and a row of buttons on top. Click “Enable Node.js”, and in a few seconds your screen will look like this: Plesk Onyx - Node.js app settings First, let’s click on “Application URL” link to make sure that the app is running. If you see a “Hello, World!” message, congratulations! Your Node.js app is up and running.

App with Dependencies

Real-world Node.js apps always have external dependencies defined in the package.json file and installed in the node_modules directory. Let’s take a look at an Express-based app (you can download it from the repository here: Either repeat the steps above to set up a repository in Plesk, or download/upload the source code manually. Once you’re done, the Node.js settings screen should look like this (assuming you uploaded the code to the “express-demo” directory): Plesk Node js settings Before you try accessing the app, you need to initialize it first. Let’s begin by installing dependencies – luckily, in Plesk it is as easy as clicking the “NPM install” button. This will install all app dependencies according to the package.json file. Then, you need to tune the app startup file. Plesk uses the Phusion Passenger application server to serve Node.js apps. Our demo app repository contains a file named “server.js”. This file is not a part of a typical Express-based app, and contains just a few lines of code, but is nonetheless necessary for the app to run:
const app = require('./app');
const http = require('http');

You can use the idea behind this file when hosting other Node.js apps (e.g. based on a different framework). The last thing you need to do is to change the Application Startup File setting to “server.js”. Node js entry point file change Now, try browsing the domain on which you installed the app – you should see the Express welcome message: Express-based demo app By default, the app is running in the “production” mode. If you modify the app, don’t forget to restart it by clicking the “Restart” button.


Knowing how to debug Node.js apps in case any issues appear is essential for a Node.js developer. Here are a few tips that can save you a lot of grief. The first thing to do when troubleshooting a Node.js app is to check the log files. For example, if you forget to install the dependencies for the demo Express app (you do it via the “NPM install” button, remember?), the Apache error log will contain the “Cannot find module ‘express'” error (unfortunately due to Phusion Passenger nature the server-wide error log is used instead of per-domain error logs). In this case, the app end-users will see the following message: Node.js app troubleshooting When developing an app, it is very handy to see the error messages directly on the site (they are still getting logged). Go to the Node.js app settings screen and change the Application Mode to “development”. Next time an issue pops up, the error will be shown in the browser window, like this: Node.js App error in development mode Moreover, if your app is running in the “development” mode, you don’t need to restart the app every time you modify the contents of a file.

Node.js and Windows

Node.js support is available in Plesk for Linux and Plesk for Windows both, but hosting Node.js apps on Windows has a few caveats you need to take into account. First, Node.js support in Plesk Onyx is implemented with the help of the iisnode module (if you would like to learn more about the iisnode project, you can find the documentation here). Second, while in Plesk for Linux you can select a different Node.js version for every domain. In Plesk for Windows a single Node.js version is used server-wide (you can select the Node.js version during the installation): Select Node js Plesk component Another difference is the location of the main entry point. In Plesk for Linux it must be located in the parent directory of the domain’s “Document root”. In Plesk for Windows it must be placed directly in the “Document root” directory. To test Node.js support, let’s use the Express-based demo app from Create a directory called “node-express” on your domain using FTP or the built-in File Manager, then deploy the contents of the “node-express” GitHub repository. After that, click the “Hosting Settings” button on the “Websites & Domains” tab and set the domain’s “Document root” directory to “node-express”. Then, go to Node.js app settings and change the “Application Startup File” to “server.js”. Finally, install the dependencies using the “NPM install” button. Once the dependencies are installed, you can browse your site to make sure that the app is running. Some additional tuning of rewrite rules may be required, but as you can see, it is possible to launch Node.js app even on Windows hosting.

Get Node.js Extension

So that’s it folks. Plesk Onyx and the Node.js support extension make hosting Node.js apps as simple as one, two, three. Give it a try and let us know how you did in the comments! Also we suggest you to read Php vs Node.js & Node.js vs Ruby on Rails comparison article.


Alexei has been part of the Plesk team since 2005 and is the Plesk Core team's Unit Manager. He's passionate about programming, product development and driving tech teams.
Showing 28 comments
  • Kuno

    Where is the log file?

    • Alexei Yuzhakov

      In case of Debian/Ubuntu you can find Phusion Passenger output inside /var/log/apache2/error.log

      • Diederik

        And in other cases ?

  • Constantinos Sergiou

    hello i have added the hello word example and i follow the steps you say but i still not see the example

  • Antonio Sánchez

    That is so awesome! Setting up a Node app was really easy. Plesk is helping us spare so much time managing our servers.

  • Gopakumar

    I upgraded Plesk from Odin to Onyx.

    Added Phusion Passenger server and NodeJS Support.

    Did a helloworld scrpit in app.js but all I can see is Apache default page.

    `ps x` shows two instances of Passenger Core and Passenger Watchdog but no sign on Node

    What could be wrong?
    Any help appreciated…

    • Plesk

      Hello Gopakumar, are you still having this problem? Please get in touch with us, so we can find a solution:

    • Plesk

      Hello Gopakumar, are you still having this problem? Please get in touch with us, so we can find a solution:

      • Gopakumar

        Thank You, I got support from Plesk. The issue got resolved. They figured out that the hello world app will work only if the Document Root and the App Root need to be same, But another example worked just fine.

        • Plesk

          Great to hear, Gopakumar!

  • Dietmar Leher

    It would be nice to update the versions in the extensions to the latest ones, especially v7 is outdated.

  • Saleem Ansari

    hey guys i have installed node js on plesk onyx server… and laso created subdomain bt still not able to run node app please help me…

  • Diederik

    Hi there,

    I successfully installed the nodejs extension and I’m currently using it to run a websocket (using
    The problem is I get 400 errors on the ws handshake and the server always falls back to polling.

    The reason for this appears to be that nginx is unable to forward the http upgrade request to the node server.

    Similar discussions:

    Question is: how can find the address/port the node process is running on ?
    I tried using top, node, … but I’m unable to find the actual process.
    Can anyone point me in the right direction ?
    Thanks !

    • Diederik van Remoortere

      SOLVED: I had to disable nginx + php

  • Diederik van Remoortere


    I’m experiencing weird behaviour using nodejs on my plesk server.
    It appears something is blocking the nodejs execution. I’m not sure what…
    When I set up a basic server and run a setInterval function to log date time every second, the code gets executed but every few seconds the output to the console lags for a couple of seconds and then outputs the (buffered ) console messages …

    I’m just tailing the log file with tail -f
    when I do a top I see passenger is only taking max 1% of my CPU…

    console.log(‘1sec’, new Date().getTime());
    }, 1000);

    any ideas what could be the cause of this ?

  • طراحی سایت

    hey guys i have installed node js on plesk onyx server… and laso created subdomain bt still not able to run node app please help me…

  • Roberto

    how to remove application from single domain ? After create it is not possible remove or reinstall .

  • david chemla

    Is it possible to keep apache / ngix & PHP server and to have nodejs running separately in another folder ?

  • Manoochehr

    Important :
    I have several days of disappointment … AND …

    maybe this helps you :
    You should disable proxy mode. (drop off the apache from request pipeline)

    When proxy mode is on this is the thing happening :
    nginx —> apache —> node (express server for example)

    with above config (default) the phusion passenger (process manager) fails to reset your app.

    you should uncheck the proxy mode inside your domain / apache and nginx settings

    and everything will go well after that.

    I wonder why it’s not mentioned in the guide

  • Kris

    Installing and running Node.js on Plesk was simple thanks to this tutorial.

  • Angelo

    For some reason the app.js isnt started at all – also when clicking on restart application.
    I now added a startup script into init.d to do that… However it would be nice to figure out why it will not get called…

  • Werner

    How i can call Commands like „Run Script“ or „Restart App“ via XML-API ?
    i‘m not able to find documentation about that…. any help is welcome!

  • John

    For some reason my app occasionally is getting killed when I start it from plesk panel. How is plesk running the commands from the ui?

    • ayuzhakov

      It’s more about Phusion Passenger application server rather than about Plesk. Technically speaking Plesk creates (or touches) a special file (tmp/restart.txt), Phusion Passenger starts or restarts the app on the HTTP next request.
      Try to start with an example app and try to find the difference between your app and the example app.

  • piccosoft

    Your blog is very nice… Thanks for sharing your information…

  • Thomas W Tupper

    I’m struggling to deploy a react app built using create-react-app, and I’m wondering if there is a tutorial out there anywhere. The structure of a react app created using create-react-app seems diametrically opposed to that which is expected by Plesk, and frankly I’m not sure how to adapt it or if it is even possible. However, given that this is the most popular method for bootstrapping a react app at present, it would be nice if Plesk could address this. So far as I can tell, there aren’t even any react tutorials, period.

  • Liam

    Hi when i try this I get the following error
    Cloning Git repository node-hello-world.git…
    fatal: unable to access ‘’: Peer reports incompatible or unsupported protocol version.

    Ive also tried it from different repos and get the smae error. Any solution to this is most welcome!

  • daniel


    1. Does NodeJs work on multiple cores like when using pm2?
    2. How can we add a Additional deployment actions: that restart the app and also npm install. currenty I add to Additional deployment actions: touch tmp/restart.txt but it does not restart the app and will not do npm install.
    3. When do you plan to release compability with nodejs 10.15.0 LTS?

    Thanks for your great job

Leave a Comment

Start typing and press Enter to search