# Node.js

WARNING

We recommend that only experienced system administrators install and manage Node applications. Enhance can not offer app related support.

Node.js is a JavaScript runtime that allows you to build scalable web applications. Please familiarise yourself with the Node.js documentation. (opens new window)

On Enhance, multiple Node.js installations can be deployed and managed on a per-website basis. Node.js is installed on a site's home directory allowing configuration changes to be applied without affecting other sites.

Node.js cannot be installed on the same path as an existing application.

Set up routes / listeners for domains to route traffic to the Node.js is automatic.

Node.js comes with the following management tools:

  • Update path
  • Update startup command
  • Choose version
  • Change mode
  • Delete application

WARNING

Node.js applications are restored but are not automatically deployed after a website backup restore.

Node.js applications run within the website container and are subject to the same isolation and resource limits as PHP applications. If you are using hard resource limits on a package basis or per-website, make sure they are sufficient for your application.

# About

# Pre-requisites for running Node

  • Node.js can be a resource intensive application. We recommend configuring CPU and other resource limits on a user’s package to mitigate high resource consumption.
  • Node.js must be enabled on the user’s hosting package. This deafults to ON.

    WARNING

    If a hosting packages was created prior to the release of this feature (22nd September, 2025) Node.js will be defaulted OFF.

  • This feature is reliant on your servers being able to reach github.com. If this domain is blocked in your country, the feature will not work.

# Deploying a Node.js app

To deploy a Node.js app:

  1. Open Websites in the left side bar
  2. Select the website you would like to delpoy Node to
  3. When the website dashboard loads select the Advanced drop down in the top navigation, then click Node.js
  4. Click Deploy app
  5. Once the form loads, complete the fields:

# Mode

You can choose whether to run the application in Automatic or Manual mode.

# Automatic mode

  • Automatic mode is designed for production use.
  • Your application will be started automatically, using your selected Node version.
  • If your application exits (regardless of the error code) it will be restarted automatically. Stdout and Stderr will be logged to a file called in the home directory. The file name will look like: persistent_app_ID.log where $ID is the internal ID of the node application. The log file is cycled every time the application starts.
  • To trigger a restart of your application, change the startup mode from Automatic to Manual and back again.

# Manual mode

  • In manual mode, your application will not be started by Enhance. It will not be restarted if exits or the website container is restarted.
  • You can start your application manually. You may need to run nvm use to select the correct node version before starting the application.
  • Enhance will continue to proxy requests to your application if enabled.
  • No log output will be generated.
  • You will need to install_nvm_and_node.sh. To initialise the node environment for manual start, run install_nvm_and_node.sh via ssh (as the website user, not root) then log out and back in again

# Proxy settings

  • For your application to be accessible from the internet, you need to enable the proxy
  • Enhance will proxy requests for a specific path (or the entire website) to your Node.js application running inside your website container.
  • You should enter the port on which you intend to start your application. Since each website container has an isolated network stack, the port needs only to be unique within a website. You cannot use port numbers <1024 or >65535.
  • The path must be unique within a website.
  • Only the primary domain will be proxied, any domain aliases should be redirected to the primary domain.

# Startup command

  • This is the command Enhance will use to start your application. It will normally look something like “npm start –production”. Enhance will enter the Working Directory (if specified) before running this command, otherwise it will be run from the context of the home directory.

# Working directory

  • You should set the directory in which the application expects to run. This should be relative to your home directory, not an absolute path.

# Node version

  • You can select from any of the available major versions of Node.js.
  • When an application is started automatically, Enhance will run the correct “nvm use” command before running the Startup Command.
  1. Click Deploy to finish