Cloud Service >> Knowledgebase >> How To >> How to Set Up Node.js from the DirectAdmin Panel
submit query

Cut Hosting Costs! Submit Query Today!

How to Set Up Node.js from the DirectAdmin Panel

Introduction

Node.js is a pote­nt JavaScript tool used for crafting quick and efficient we­b programs. With DirectAdmin, you have an easy way to install and manage­ Node.js applications right from their control panel. This guide­ will help you install Node.js using DirectAdmin's pane­l with ease.

Step 1: Log in to DirectAdmin

1. Open your browser and go to your DirectAdmin login page.

2. Enter your credentials to access the control panel.

Step 2: Install Node.js Support (If Not Pre-Installed)

1. Once logged in, go to Extra Features in the DirectAdmin dashboard.

2. Check if the Node.js Manager option is available. If it’s not present, contact your cloud hosting provider to enable Node.js support on your server.

Node.js Support

 

Step 3: Navigate to the Node.js Manager

1. After confirming Node.js support, click on Node.js Manager under Extra Features.

2. You’ll be taken to the Node.js management page, where you can create and manage your Node.js applications.

Step 4: Create a New Node.js Application

1. In the Node.js Manager, click on Create Application to start the setup process.

Node.js Application

2. You will be prompted to enter details for your Node.js application. These include:

Application Name: Choose a name for your Node.js application.

Application Path: Specify the directory where your Node.js app files will be located. For example, /home/username/domains/domain.com/public_html/app.

Application Mode: Choose between Development or Production mode, depending on your use case.

Application Port: Define the port on which your Node.js application will run.

Node.js Application

Step 5: Upload Your Node.js Files

1. Once the application is created, upload your Node.js files to the specified Application Path using either the File Manager in DirectAdmin or through an FTP client.

2. Ensure your app.js (or the entry file) is correctly placed in the application directory.

Step 6: Configure the Application

1. After uploading your files, go back to Node.js Manager and click on your application’s name.

2. Under Entry Point, set the main file that starts your Node.js application (e.g., app.js, server.js).

3. Specify any environment variables you need under Environment Variables.

4. If your application requires specific Node.js modules, ensure your package.json file is in place, and run npm install to install all necessary dependencies.

Step 7: Start the Node.js Application

1. Once your application is set up, click Start or Restart to run your Node.js application.

Node.js Application

 

2. The Node.js Manager will automatically start your application on the port you specified earlier.

Step 8: Access the Node.js Application

1. Have your app up and re­ady? Great! Use this format, http://domain.com:port, and replace­ "port" with the one you picked. You're­ in! 

2. Don't fancy mentioning the port? Not an issue! You can use­ Nginx or Apache, two handy tools, or set up a reve­rse proxy. This will direct reque­sts to your Node.js application smoothly, no port neede­d in the URL!

Step 9: Setting Up a Reverse Proxy (Optional)

To avoid using a port in the URL, you can configure a reverse proxy in your DirectAdmin panel:

1. In the Apache Settings or Nginx Settings, add a reverse proxy to direct traffic from your domain to the port where your Node.js application is running.

2. This way, visitors can access your application directly via http://domain.com.

Final Words

Getting Node­.js up and running in DirectAdmin isn't a tough task. This guide offers an e­asy pathway to manage and kick-start your apps. The steps he­rein will get your Node.js de­cked out just right, ensuring your app navigation become­s a breeze.

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!