Node.js is a JavaScript runtime that lets you run server-side applications — APIs, real-time apps, microservices, and full web applications — using the same language you already know from front-end development. Ultra Web Hosting supports Node.js through CloudLinux’s Node.js Selector in cPanel, giving you a managed environment to deploy and run your applications without needing a VPS or dedicated server.
Node.js on Shared Hosting
You don’t need a VPS to run Node.js. Ultra Web Hosting’s shared plans include the Node.js Selector in cPanel, which lets you create applications, choose your Node.js version, install npm packages, and manage everything from a web interface.
- Supported Node.js versions: 14.x through 22.x
- npm package management built in
- Automatic application restart on file changes
- Environment variable support
01. What Is Node.js?
Node.js is an open-source, cross-platform runtime environment built on Chrome’s V8 JavaScript engine. Before Node.js, JavaScript could only run in web browsers. Node.js changed that by allowing JavaScript to run on a server, handling tasks like reading files, connecting to databases, and responding to HTTP requests.
Traditional web hosting languages like PHP process each request independently — a new request comes in, PHP handles it, sends a response, and the process ends. Node.js works differently. It uses an event-driven, non-blocking I/O model, which means it can handle thousands of simultaneous connections without creating a new thread for each one. This makes it especially efficient for real-time applications, APIs, and anything that handles many concurrent users.
Node.js comes with npm (Node Package Manager), the world’s largest ecosystem of open-source libraries. With over two million packages available, you can add functionality to your application — database drivers, authentication, templating, image processing — with a single npm install command.
02. Why Node.js Is Popular
One language everywhere. If you know JavaScript for front-end development, you already know the language for your back end. This eliminates context-switching between languages and lets a single developer (or team) work across the entire stack.
Speed and efficiency. The V8 engine compiles JavaScript to machine code, making Node.js fast. Its non-blocking architecture handles I/O operations (database queries, file reads, API calls) without waiting for each to finish before starting the next, which is ideal for I/O-heavy workloads.
Massive ecosystem. npm hosts over two million packages covering everything from web frameworks (Express, Fastify, Koa) to database connectors (Mongoose, Sequelize, Knex) to utility libraries (Lodash, Moment, Day.js). Whatever you need, there’s likely a well-maintained package for it.
Active community. Node.js has one of the largest developer communities in the world. Stack Overflow, GitHub, and dedicated forums provide extensive documentation, tutorials, and support. Major companies including Netflix, PayPal, LinkedIn, Uber, and NASA use Node.js in production.
Modern frameworks. Node.js powers popular frameworks like Next.js (React-based full-stack framework), Nuxt.js (Vue-based), Express (minimal API framework), and Nest.js (enterprise-grade TypeScript framework). These frameworks make it fast to build production-ready applications.
03. Common Use Cases
Node.js is well-suited for a wide range of applications:
- REST APIs and GraphQL servers — lightweight, fast API endpoints for mobile apps, SPAs, or third-party integrations
- Real-time applications — chat apps, live notifications, collaborative editing, and dashboards using WebSockets
- Server-side rendered websites — frameworks like Next.js and Nuxt.js render pages on the server for better SEO and performance
- Microservices — small, focused services that each handle one task, communicating over HTTP or message queues
- Command-line tools — build scripts, automation tools, and development utilities
- Proxy servers and middleware — lightweight intermediaries between your front end and back-end services
04. Setting Up Node.js in cPanel
Ultra Web Hosting uses CloudLinux’s Node.js Selector to manage Node.js applications. Here’s how to create and deploy your first app:
- Log in to cPanel and scroll to the Software section. Click “Setup Node.js App”.
- Click “Create Application” in the top-right corner.
- Configure the application:
- Node.js version: Choose your preferred version (LTS versions like 18.x or 20.x are recommended for production).
- Application mode: Set to
Developmentwhile building, switch toProductionwhen ready. - Application root: The directory containing your app files (e.g.,
myapp). This is relative to your home directory. - Application URL: The domain or subdomain where the app will be accessible.
- Application startup file: The entry point for your app, typically
app.jsorserver.js.
- Click “Create” to save the application.
- Upload your files to the application root directory using File Manager or FTP.
- Install dependencies. In the Node.js Selector, click “Run NPM Install” to install packages from your
package.json. - Start the application by clicking the “Start App” button (or “Restart” if it’s already running).
process.env.PORT or the Phusion Passenger integration will handle port binding for you. Do not hardcode app.listen(3000) in production — the CloudLinux/Passenger layer manages the port automatically.
05. Application File Structure
A basic Node.js application on Ultra Web Hosting looks like this:
myapp/
app.js # Entry point (startup file)
package.json # Dependencies and scripts
package-lock.json # Locked dependency versions
node_modules/ # Installed packages (created by npm install)
public/ # Static files (CSS, images, client JS)
views/ # Templates (if using a template engine)
routes/ # Route handlers
.env # Environment variables (never commit this)
A minimal app.js using Express:
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Hello from Node.js on Ultra Web Hosting!');
});
// Let Passenger handle the port
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log(`Server running on port ${PORT}`);
});
And the corresponding package.json:
{
"name": "myapp",
"version": "1.0.0",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "^4.18.0"
}
}
06. Installing npm Packages
You can install npm packages in two ways:
Through cPanel: In the Node.js Selector, there is an “Add Package” section where you can type a package name and install it directly. You can also click “Run NPM Install” to install all dependencies listed in your package.json.
Through SSH (Terminal): If you have SSH access, you can install packages from the command line. First, enter the virtual environment created by the Node.js Selector:
source /home/username/nodevenv/myapp/18/bin/activate
cd ~/myapp
npm install express
npm install
npm install within the Node.js virtual environment. If you install packages outside of it, they may use a different Node.js version and cause compatibility issues.
07. Environment Variables
Store sensitive configuration (database credentials, API keys, secrets) in environment variables rather than hardcoding them in your source files.
Using the Node.js Selector: The cPanel interface has an Environment Variables section where you can add key-value pairs. These are injected into process.env automatically when your app starts.
Using a .env file: Create a .env file in your application root and use the dotenv package to load it:
# .env
DB_HOST=localhost
DB_USER=myuser
DB_PASS=mypassword
API_KEY=abc123
// app.js
require('dotenv').config();
console.log(process.env.DB_HOST); // localhost
.env file to version control. Add it to your .gitignore. If your application is in a public directory, make sure the .env file is not web-accessible.
08. Troubleshooting
- App shows “Application Error” or a blank page. Check the error log in the Node.js Selector. Common causes include a missing startup file, a syntax error in your code, or missing dependencies (run NPM Install again).
- “Cannot find module” errors. Your
node_modulesdirectory may be missing or incomplete. Click “Run NPM Install” in the Node.js Selector, or SSH in and runnpm installinside the virtual environment. - App runs locally but not on the server. Make sure you are not hardcoding a port. Use
process.env.PORTor simply omit theapp.listen()port argument and let Passenger handle it. - Changes not showing up. Click “Restart” in the Node.js Selector after uploading new files. Node.js does not automatically detect file changes in production mode.
- Wrong Node.js version. If your app requires a specific Node.js version, change it in the Node.js Selector dropdown. After changing versions, run NPM Install again to rebuild native modules.
- Memory limits. On shared hosting, your application has memory limits enforced by CloudLinux. If your app exceeds its allocation, it will be terminated. Optimize your code, reduce memory usage, or consider upgrading to a VPS or dedicated server for resource-intensive apps.
Need Help With Your Node.js App?
If you’re having trouble deploying or running a Node.js application, open a ticket and we’ll help you get it working.
Open a Support TicketQuick Recap: Node.js on Ultra Web Hosting
- Create your app in cPanel → Setup Node.js App → Create Application
- Upload your files to the application root directory
- Install dependencies — click “Run NPM Install” in the Node.js Selector
- Start the app and test it at your configured URL
- Use environment variables for secrets — never hardcode credentials
