Enabling Passenger for Node.js

Overview

Node.js is a JavaScript runtime environment used to develop server tools and applications. It uses JavaScript, traditionally a front end programming language on the server side.

This article describes how to enable Node.js to work with Passenger using the DreamHost panel.

What servers can Node.js be installed onto?

Node.js can be installed onto Shared, VPS, and Dedicated servers.

The version of Passenger running on Shared servers does not function with Node.js versions 14+. If you wish to use a more recent version, you would need to upgrade to a VPS.

Can Node.js be used without enabling in the panel?

Yes. You can create a Node.js app and deploy it manually. However, this can be a lot of work depending on the complexity of your application. Deploying your Node.js app with Passenger is much easier and recommended.

If you chose to not use Passenger, you would need to find a way to manually deploy your application.

What does the panel checkbox do?

When you enable the checkbox feature in the panel, Passenger knows your website is set up to run a Node.js app and automatically deploys it using Passenger on ports 80 and 443. However, this will only function under these two circumstances:

Passenger then loads the app.js file automatically when visiting your URL. You do not have to bind a port # to the URL or manually start the server in this case. Your configuration would look like this:

app directory: example.com/app.js
web directory: example.com/public

Enabling Passenger for Node.js in the panel

To enable Passenger for Node.js:

  1. Navigate to the Manage Domains page.
  2. Click the 'Edit' link to the right of your domain under the Web Hosting column.
    The 'Manage Domains' settings page opens:
  3. Scroll down to the Web Options section and check the Passenger (Ruby/NodeJS/Python apps only): check box.
  4. Checking this displays a pop-up warning.

    If you already have a /public directory in the current 'Web directory, clicking OK will only switch the 'Web directory' to this new /public folder. Nothing in it is removed.

    If you do not already have a /public directory, the panel creates it for you with a coming soon page. The files in your current 'Web directory' remain untouched.

  5. Click OK.
  6. Your 'Web directory' field automatically adds a /public folder to the end. The NodeJS check box also appears:
  7. Check the 'NodeJS:' check box to allow Node.js to use Passenger on your domain.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?