How to enable Node.js

Your domain must run on a private server (VPS) or Dedicated server running Ubuntu in order to enable Node.js.

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.

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. 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.

For example, if you have the following setup:

app directory:
web directory:

Passenger will automatically load the app.js file in the application directory. So if you visit, it would load the app.js file.

Additionally, when you enable the checkbox, Passenger runs your Node.js files using the system version at:

[server]$ which node

If you installed a custom version, Node.js automatically writes lines to your user's .bashrc file. Those lines change the version to your locally installed version. For example: 

[server]$ which node

Enabling Node.js in the panel

To enable Node.js:

  1. Navigate to the (Panel > 'Domains' > 'Manage Domains') page.
  2. Click the Edit button to the right of your domain under the 'Web Hosting' column.
    The 'Manage Domains' settings page opens:
    01 RVM nodejs.fw.png
  3. Scroll down to the 'Web Options' section and check the 'Passenger (Ruby/NodeJS/Python apps only):' check box.
    The NodeJS check box appears:
    03 RVM nodejs.fw.png
  4. Check the 'NodeJS:' check box to enable Node.js on your domain.

See also

Internal links

External links

Did this article answer your questions?

Article last updated .