Using Node.js on a premium shared hosting account
Author: admin admin Reference Number: AA-00416 Views: 28330 Created: 2015-09-23 10:52 Last Updated: 2025-08-14 08:51 0 Rating/ Voters

We have installed node.js and npm onto all shared hosting servers. 

You can use the Setup Node JS app icon in cPanel to select your Node version ranging from 9.1.2 - 20.19.3 at the time of writing, however we always keep it updated to the latest version.

npm version 8.19.4 at the time of writing, however we always keep it updated to the latest version.


These binaries are located in

/usr/bin

making ......

/usr/bin/node

/usr/bin/npm

You can use the cPanels Setup NodeJS app icon to create your Node application.

How to Create a Node.js Application using CloudLinux Setup NodeJS App

Overview

This guide will walk you through creating a Node.js application using the CloudLinux "Setup NodeJS app" feature. This tool makes it easy for beginners to deploy Node.js applications without complex server configuration.

Prerequisites

  • Active hosting account with CloudLinux support
  • Access to cPanel
  • Basic understanding of file management

Accessing Your Hosting Control Panel

Method 1: Client Portal Login

  1. Visit the client portal: https://ifastnet.com/portal/clientarea.php
  2. Log in with your hosting account credentials
  3. Navigate to your hosting services
  4. Click on the cPanel login button for easy access

Method 2: Direct cPanel Access

  • Visit: https://yourdomain.com/cpanel (replace "yourdomain.com" with your actual domain)
  • Enter your cPanel username and password

Step-by-Step Guide to Setup Node.js Application

Step 1: Access the NodeJS App Setup

  1. Log into your cPanel using one of the methods above
  2. Scroll down to the "Software" section
  3. Look for and click on "Setup Node.js App" or "Node.js Selector"

Step 2: Create New Application

  1. Click the "Create Application" button
  2. Fill in the application details:
    • Node.js Version: Select the latest stable version (recommended)
    • Application Mode: Choose "Production" for live sites or "Development" for testing
    • Application Root: This is where your app files will be stored (e.g., nodejs_app)
    • Application URL: Choose the URL path where your app will be accessible
    • Application Startup File: Usually app.js or index.js

Step 3: Configure Application Settings

  1. Set your Application Root directory (this creates a folder in your file manager)
  2. Choose your Application URL - this determines how visitors access your app
  3. Specify the Startup File - the main file that runs your Node.js application
  4. Click "Create" to set up the basic structure

Step 4: Upload Your Application Files

Using cPanel File Manager:

  1. Go to cPanel ? File Manager
  2. Navigate to the Application Root directory you specified
  3. Upload your Node.js application files (package.json, app.js, etc.)
  4. Extract any zip files if needed

Using cPanel Terminal:

  1. In cPanel, find and click "Terminal"
  2. Navigate to your application directory:
    cd ~/nodejs_app
    
  3. You can now use command-line tools to manage your files

Using SSH (Advanced Users):

  1. Connect via SSH using port 1394:
    ssh [email protected] -p 1394
    
  2. Navigate to your application directory
  3. Upload files using SCP or manage them directly

Step 5: Install Dependencies

  1. In the Node.js App interface, look for the "Package.json" section
  2. If your app has a package.json file, the system will show available packages
  3. Click "Run NPM Install" to install all dependencies automatically
  4. Alternatively, use the Terminal to run:
    npm install
    

Step 6: Start Your Application

  1. Back in the "Setup Node.js App" interface
  2. Click the "Start" button next to your application
  3. The status should change to "Running"
  4. Your application is now live and accessible via the URL you configured

Step 7: Test Your Application

  1. Visit your application URL in a web browser
  2. Verify that your Node.js application is working correctly
  3. Check for any error messages in the application logs

Managing Your Node.js Application

Restarting the Application

  • Use the "Restart" button in the Node.js App interface
  • Or use the Terminal to restart manually

Viewing Logs

  • Check the application logs in the Node.js App interface
  • Logs help diagnose any issues with your application

Stopping the Application

  • Click "Stop" in the Node.js App interface when you need to make changes

Common Beginner Tips

  1. Start Simple: Begin with a basic "Hello World" Node.js app to test the setup
  2. Check File Permissions: Ensure your files have proper permissions set
  3. Monitor Resource Usage: Keep an eye on CPU and memory usage
  4. Regular Backups: Back up your application files regularly
  5. Keep Dependencies Updated: Regularly update your npm packages for security

Troubleshooting

Application Won't Start

  • Check that your startup file exists and is correctly named
  • Verify that all dependencies are installed
  • Review application logs for error messages

Can't Access Application

  • Confirm the Application URL is correctly configured
  • Check that the application status shows "Running"
  • Verify domain/subdomain settings

Permission Issues

  • Ensure file permissions are set correctly (usually 644 for files, 755 for directories)
  • Check that the application root directory is accessible

Getting Support

If you encounter issues that you cannot resolve:

  1. Visit the support portal: https://support.ifastnet.com/login.php
  2. First-time users: You'll need to register for an account before creating tickets
  3. Create a detailed support ticket describing your issue
  4. Include relevant error messages and steps you've already tried

Summary

The CloudLinux "Setup NodeJS app" feature simplifies Node.js deployment by handling server configuration automatically. By following these steps, you can have a Node.js application running quickly without deep technical knowledge of server management. Remember to start with simple applications and gradually work your way up to more complex projects as you become comfortable with the process.

Quick Jump Menu