Cito has support for LTS node versions, enabling you to run node applications via Nginx + Passenger. NPM and Yarn are installed by default, too. By default we run NodeJS 24. Please contact support for additional versions. Only one version of Node can run at any time.
If your server is running an older version of Node and you would like to upgrade to the current default, please contact support.
This method allows you to run a NodeJS application without requiring an application server or process manager like PM2. Passenger handles proxying, process management, and other components that would otherwise require complex configuration. For more information you can review the Passenger documentation here. Note that you can also run Node applications from a Docker image using a container site.

Adding a NodeJS application

To add a nodejs site in Cito, click the ‘Create Site’ button in the top right corner, and select the ‘NodeJS’ site type. Create Site Fill in the domain name you wish to use, followed by an SSH user. Once the site has been created you’ll be presented with its details, including a preview URL.

Setting up your application

Once you have created the site in Cito, you’ll need to:
  • Deploy your site’s files. This can be done using SSH, for example by cloning a Git repository or using SFTP to upload your content.
  • Run NPM install to install the application, including any dependencies.
  • Ensure your application has an app.js file as its entrypoint.
You should then be able to browse to the site at it’s URL (or Preview URL).

Restarting a NodeJS application

Deploying your code doesn’t restart your application, whether you use ‘Deploy latest’ in the dashboard, SSH or SFTP. Restart it after each deploy so Passenger loads the new version. See Working with Git.
Passenger has a couple of methods to do this:

restart.txt

One method to restart an application is by touching the file restart.txt in the application directory’s tmp subdirectory. Once Passenger has noticed that the file’s timestamp has changed, it will restart the application.

passenger-config restart-app

The preferred method for restarting an application, is through the passenger-config restart-app tool. This tool can run interactively or non-interactively. If you invoke passenger-config restart-app without arguments, it will ask you which application you want to restart.
For more information see the Passenger docs.

Custom Entrypoints

If your Node application does not use app.js as it’s entrypoint, you can change this by editing the passenger_startup_file directive in your site’s Nginx configuration. This is found at /etc/nginx/conf.d/<username>.conf. Note you will need to be logged in as admin and use the sudo command to edit this file.

Advanced use

Passenger has a number of customisable runtime options. For more information about deploying NodeJS applications using Passenger, see the official documentation here: https://www.phusionpassenger.com/library/deploy/nginx/deploy/nodejs/