# Node.js via SSH

> **TL;DR**
> Required plugins:
>
>
>
> `JavaScript and TypeScript`, `JavaScript Debugger`, `Node.js`, `Node.js Remote Interpreter`, `FTP/SFTP/WebDAV Connectivity` -    the plugins are bundled with CLion and enabled by default.
>
>
>
> See [Before you
> start](#ws_node_ssh_before_you_start) below.

## Before you start

Procedure:

1. Make sure the JavaScript and TypeScript, JavaScript Debugger, Node.js, Node.js Remote Interpreter, and FTP/SFTP/WebDAV Connectivity required plugins are enabled on the Settings | Plugins page, tab Installed. For more information, refer to [Managing plugins](managing-plugins.html).

2. Configure access to an SSH server on the target remote host as described in [Create SSH configurations](create-ssh-configurations.html) and make sure this server is running.

3. Make sure your project sources are on the target remote host. This can be done in the following two ways:

* Upload your project sources to the target remote host as described in [Upload and download files](uploading-and-downloading-files.html).

* Enable a network share on your local machine and mount your project folder in the target directory on the remote host. The way you share files and folders depends on the operating system you are using. For more information, refer to your OS instructions.

## Configure a Node.js runtime on a remote host accessible via SSH

Node.js runtimes via SSH are configured in the Configure Node.js Remote Runtime dialog. You can open this dialog from the [JavaScript Runtime](javascript-runtime.html) page of the Settings dialog or later,  when you [create or edit a Node.js
run/debug configuration](#ws_node_ssh_create_run_debug_configuration) for running or debugging your application.

The recommended way is to configure a remote Node.js runtime in the Settings dialog. In this case you can set the runtime and the associated package manager as default for your project.

A remote Node.js runtime that you configure right in the Node.js run/debug configuration can be used only with this run/debug configuration.

Procedure:

1. Open the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))) and go to `Languages & Frameworks | JavaScript Runtime`.

2. Click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.ellipsis.svg) next to the Node runtime field.

![Add runtime - Browse button](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_interpreter_from_settings_browse_button.png)

3. In the [Node.js Runtimes](node-js-interpreters.html) dialog with a list of all the currently configured runtimes, click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar and select  Add Remote from the context menu .

![Configure Node.js runtime via SSH: Add Remote](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_interpreter_from_settings_docker_add_remote.png)

4. In the [Configure Node.js Remote
Runtime dialog](null) that opens, select SSH.

5. Select an SSH configuration to use.

![Configure remote Node.js runtime via SSH: select SSH configuration](https://resources.jetbrains.com/help/img/idea/2026.2/ws_configure_remote_node_interpreter_ssh_select_ssh_configuration.png)

Alternatively, click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.ellipsis.svg) and create a new SSH configuration as described in [Create SSH
configurations](create-ssh-configurations.html).

6. Click OK to return to the Node.js Runtimes dialog where the new runtime is added to the list.

![Remote runtimes dialog: the new Node.js runtime via SSH added to the list](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_node_configure_interpreter_remote_interpreters_dialog_ssh_node_added.png)

7. To set the newly configured runtime as the project default, select it in the list and click OK to return to the JavaScript Runtime dialog.

CLion automatically uses this interpreter every time you select the `Project` alias from Node runtime lists, for example, when creating run/debug configurations.

To use the package manager associated with the new runtime for managing your project dependencies, set this package manager as default in your project. To do that, specify the location of the package manager in the Package manager field.

The default location for npm executable is `/usr/local/lib/node_modules/npm`.

![Configure Node.js runtime via SSH: set as default project interpreter](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_interpreter_from_settings_ssh_default_project_interpreter_and_package_manager.png)

## Create a Node.js run/debug configuration

Procedure:

1. Go to `Run | Edit Configurations`. In the Edit Configuration dialog that opens, click ![the Add New Configuration button ](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar and select Node.js from the context menu.  The [Run/Debug Configuration](run-debug-configuration-node-js.html) dialog opens.

2. In the File field, specify the path to the main file of the application that starts it (for example, `bin/www` for [Express](http://expressjs.com/) applications).

![Node.js run/debug configuration: JavaScript file specified](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_ssh_configure_interpreter_run_configuration.png)

3. If necessary, specify some optional settings as described in [Running and debugging Node.js applications](running-and-debugging-node-js.html#ws_node_run_config_optionally).

4. From the Node runtime list, select the relevant remote Node.js runtime accessible via SSH.

![Create Node.js run configuration: select remote Node.js via SSH interpreter](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_ssh_run_configuration_select_interpreter.png)

Alternatively,  Click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.ellipsis.svg) next to the Node runtime field  and configure a remote Node.js runtime [as described above](#ws_node_ssh_configure_remote_interpreter_preferences_remote_interpreters_dialog).

5. Map the local folders with the folders on the remote host.

1.

Click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.2/app.actions.menu-open.svg) next to the Path mappings field or press `Shift+Enter` (Windows), `Shift+Enter` (macOS), `Shift+Enter` (IntelliJ IDEA Classic (macOS)), `Shift+Enter` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `Shift+Enter` (Sublime Text (macOS)), `Shift+Enter` (Xcode), `Shift+Enter` (Visual Studio), `Shift+Enter` (Visual Studio (macOS)), `Shift+Enter` (ReSharper), `Shift+Enter` (ReSharper (macOS)), `Shift+Enter` (QtCreator), `Shift+Enter` (QtCreator (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Eclipse), `Shift+Enter` (Eclipse (macOS)).

2.

In the [Edit Project Path Mappings dialog](null) that opens, click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) on the toolbar.

![Create Node.js run configuration: add mapping](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_ssh_run_configuration_add_mapping.png)

3.

Specify the paths to the local folders and the corresponding folders on the remote host. For example, you can map the project folder to `/home/opc`.

![Create Node.js run configuration: mapping added](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_ssh_run_configuration_mapping_added.png)

4.

When you click OK, you return to the Run/Debug Configurations dialog where the new mapping is shown in the Path mappings field.

![Create Node.js run configuration: added mapping shown](https://resources.jetbrains.com/help/img/idea/2026.2/ws_node_ssh_run_configuration_mapping_specified_final.png)

## Run your application

Procedure:

* From the Run/Debug Configurations widget list on the toolbar, select the newly created Node.js configuration and click ![the Run button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.run.svg) next to it.

* Alternatively, create a  Node.js run/debug configuration [as described above](#ws_node_ssh_create_run_debug_configuration) or modify an existing one and click  Run in the dialog.

## Debug your application

Procedure:

1. Set the [breakpoints](using-breakpoints.html) in the Node.js code as necessary.

2. Create a  Node.js configuration [as described
above](#ws_node_ssh_create_run_debug_configuration), select it from the Select run/debug configuration list on the toolbar, and click ![the Debug button](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.debug.svg) next to the list.

3. Proceed as when [starting the debugger together with
a Node.js application locally](running-and-debugging-node-js.html#debugLocal).

