nodejs: Node.js Versions

The nodejs utility is used to manage Node.js versions on the server or on a particular domain through CLI.

Note

This utility is available when the Node.js extension is installed in Plesk and is used with the plesk ext utility.

By using this utility, you can perform the following tasks:

  • view the list of Node.js versions available on the server
  • enable Node.js on the server or on a domain
  • disable Node.js on the server or on a domain
  • set a particulare Node.js version on a domain
  • get Node.js version on a domain

For details about using Node.js, refer to the Administrator’s guide.

Usage

plesk ext nodejs <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

Example

The following command gets Node.js version on the domain example.com:

plesk ext nodejs --get-version -domain example.com

Commands

Command Description Example
--versions Displays the list of Node.js versions available on the server.

To display the list of Node.js versions available on the server:

plesk ext nodejs --versions
--enable

Enables Node.js of a specified version on the server (when used with the -version option).

Enables Node.js support on a domain (when used with the -domain option).

To enable Node.js of the version 6.3.1:

plesk ext nodejs --enable -version 6.3.1

To enable Node.js support on the domain example.com:

plesk ext nodejs --enable -domain example.com
--disable

Disables Node.js of a specified version on the server (when used with the -version option).

Disables Node.js support on a domain (when used with the -domain option).

To disable Node.js of the version 6.3.1:

plesk ext nodejs --disable -version 6.3.1

To disable Node.js support on the domain example.com:

plesk ext nodejs --disable -domain example.com
--set-version Sets Node.js version on a domain.

To set Node.js version 6.3.1 on the domain example.com:

plesk ext nodejs --set-version -domain example.com -version 6.3.1
--get-version Gets Node.js version on a domain.

To get Node.js version on the domain example.com:

plesk ext nodejs --get-version -domain example.com
--help Displays help on the use of the utility.

To view the help information on the use of this utility:

plesk ext nodejs --help

or

plesk ext nodejs -h

Options

Option Parameter Description Example
-domain <domain>

Domain name.

Used with the following commands: --enable, --disable, --get-version, --set-version.

To enable Node.js support on the domain example.com:

plesk ext nodejs --enable -domain example.com
-version <version>

Node.js version.

Used with the following commands: --enable, --disable, --set-version.

To enable Node.js of the version 6.3.1:

plesk ext nodejs --enable -version 6.3.1