HostingDomainsEmailSSLPricingSupport
Login to Client Area Get Started Free
πŸ“– Knowledge Base

How Can We
Help You?

Browse guides, tutorials and troubleshooting articles for all our services.

How to Enable Node.js and Install npm Modules in Enhance Hosting

This guide explains how to enable Node.js for your website and how to install npm modules inside your isolated Node.js container using SSH.

1. Enable Node.js for Your Website

  1. Log in to your hosting control panel.
  2. Go to Websites and select your domain.
  3. Open the Node.js App section.
  4. Click Create Node.js App.
  5. Configure:
    • Port (auto‑assigned or custom)
    • Startup command (e.g., node app.js)
    • Node.js version (Stable recommended)
    • Working directory (Home directory)
    • Start mode (Automatic)
  6. Save your settings.

Your website now has its own isolated Node.js container. The log panel will show the startup process.

2. Access Your Node.js Container via SSH

To install npm modules, you must log in directly to your website’s container. This is done through the SSH settings shown in your control panel.

Step 1: Open the SSH Access Panel

In your website dashboard, go to:

Websites → Advanced → SSH Key Manager / SSH Password Authentication

Option A: Log in using an SSH Key (recommended)

  1. Click Upload Public Key in the SSH Key Manager.
  2. Add your SSH public key.
  3. Use the SSH command shown in the panel to connect:

Option B: Log in using SSH Password Authentication

  1. Enable SSH password authentication.
  2. Copy the SSH login command shown in the panel.
  3. Use your SSH password to log in:

Once logged in, you are inside your website’s Node.js container, as shown in the screenshot.

3. Navigate to Your Application Directory

Your Node.js application files are located in your container’s home directory:

ls -la

You should see files such as:

  • app.js
  • package.json
  • package-lock.json
  • node_modules (if already installed)
  • public_html

If your app is inside a subfolder:

cd foldername

4. Install npm Modules

All npm installations must be done inside your container.

Install all dependencies from package.json

npm install

Install a specific module

npm install express

Install multiple modules

npm install express axios dotenv

5. Restarting Your Node.js Application

To restart your app:

Delete the Node.js app and create a new one.

Steps:

  1. Go to Websites → Node.js App.
  2. Click Delete App.
  3. Create the app again with the same settings.

This forces to rebuild and restart the container with your latest code and modules.

6. Common Issues & Fixes

Error: Cannot find module 'express'

Modules were not installed inside the container.

npm install express

App not updating after changes

Delete and recreate the Node.js app in the control panel.

Can't Find What You're Looking For?

Our support team is available 24/7 to help. Open a ticket and we'll get back to you as soon as possible.