Using Node.js¶
Enabling Node.js support¶
To enable Node.js support on the server, follow these steps:
Plesk for Linux
- Go to Tools & Settings and click Updates.
- Go to Add/Remove Components, expand Web hosting, and mark the “NodeJS support” component for installation.
- Click Continue to begin the installation.
Plesk for Windows
- Go to Tools & Settings and click Updates.
- Go to Add/Remove Components, expand Web hosting, and mark the “Node.js IIS module (iisnode)” and “Node.js” components for installation.
- Select the desired Node.js version under the “Node.js” component
- Click Continue to begin the installation.
Note
To use Node.js applications inside CageFS, install the passenger-cagefs package and follow the instructions in its README file.
Managing Node.js versions¶
Plesk supports the latest stable and LTS releases of Node.js, with the following limitations:
- (Plesk for Linux) Both releases can be installed simultaneously, and Node.js applications on different domains can use any available Node.js version.
- (Plesk for Windows) Only one Node.js version can be installed at any time, and is used to power all Node.js applications on the server.
To manage the Node.js version(s) available on the server, follow these steps:
Plesk for Linux
- Go to Extensions and click Node.js Manager. Here, you can see the Node.js versions installed on the server as well as the paths to their corresponding binaries.
- Click the icon next to a Node.js version to disable
it. Disabling a Node.js version has the following effects:
- The disabled Node.js version can no longer be selected when managing Node.js applications for domains.
- Existing Node.js applications are switched to a different, enabled Node.js version (if possible).
- If all Node.js versions on the server are disabled, all existing Node.js applications stop working, and the ability to manage Node.js applications for domains is removed until at least one Node.js version is enabled again.
- Click the icon next to a disabled Node.js version to enable it.
Plesk for Windows
- Go to Extensions and click Node.js Manager. Here, you can see the Node.js version installed on the server as well as the path to its binary.
- Click the icon next to the installed Node.js version to disable it. This will make all existing Node.js applications stop working, and the ability to manage Node.js applications for domains will be removed until Node.js is enabled again.
- Click the icon next to the installed Node.js version to enable it.
- To change the installed Node.js version, go to Tools & Settings, click Updates, go to Add/Remove Components, expand Web hosting, select the desired Node.js version under the “Node.js” component, and then click Continue.
Controlling Node.js availability to customers¶
Enabling Node.js support adds the following permissions to service plans and subscriptions, which you can use to regulate customers’ access to the Node.js functionality:
- “Node.js support management” allows customers to enable Node.js support for their domains.
- “Node.js state management” allows customers to change the application mode for their applications.
- “Node.js version management” allows customers to change the Node.js version for their applications.
Managing Node.js applications for websites¶
To learn about managing Node.js applications for websites, read the Node.js Support topic.