Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Set Up and Manage Node.js in DirectAdmin

You can run a Node.js app from DirectAdmin using the Node.js Selector tool. This guide shows the main steps.

DirectAdmin2 min read15 steps6 screenshots

What is Node.js?

Node.js lets you run JavaScript on a server, not only inside a browser. It is used to build web apps, chat tools and APIs. An API is a way for programs to talk to each other.

npm is the tool that installs add-on code packages for Node.js. A package is a ready-made piece of code you can reuse.

The Node.js Selector is a third-party feature. It may not be on every plan. Ask Hostvento support if it is on yours. If you cannot find it in your panel, it is probably not turned on.

Before you start

  • Upload your app files with the File Manager or FTP. Put them in a folder outside public_html, for example nodeapp.
  • Know the name of your startup file. It is often app.js or server.js.

Steps to create the app

  1. Log in to DirectAdmin.
  2. Find Setup Node.js App in the menu. Use the search box if needed.
    Screenshot: Find Setup Node.js App in the menu. Use the search box if needed.
  3. Click Create Application.
    Screenshot: Click Create Application .
  4. Choose the Node.js version. Pick one your app supports.
  5. Choose the Application mode. Use Production for a live site and Development for testing.
  6. Set the Application root. This is the folder with your app files, such as nodeapp.
  7. Set the Application URL. It is the web address where the app will show.
  8. Type the Application startup file, for example app.js.
    Screenshot: Type the Application startup file , for example app.js .
  9. Click Create.

Install packages

  1. Make sure your app folder has a package.json file. It lists the packages your app needs.
  2. Open the app in the Node.js tool.
    Screenshot: Open the app in the Node.js tool.
    Screenshot: Open the app in the Node.js tool.
  3. Click Run NPM Install.
  4. Wait until it finishes.

Manage the app

  • Restart after you change code or install packages.
  • Stop to turn the app off.
  • Edit to change the version, mode or URL.
    Screenshot: Edit to change the version, mode or URL.
  • Destroy to delete the app setup. Back up your files first.

You can add environment variables in the same screen. They are settings like a database name, kept outside your code.

Test it

  1. Open the Application URL in your browser.
  2. If you see an error, check the log file in your app folder.
Tip: Do not hard-code a port number. The tool handles this for you through the server settings.

Quick recap

  • Node.js runs JavaScript on the server.
  • Use Setup Node.js App, then Create Application.
  • Pick the version, mode, root folder, URL and startup file.
  • Run NPM Install, then restart. Ask support if the tool is missing.