
How to Deploy Node.js Apps on Hiverift Using cPanel
How to Deploy Node.js Apps on Hiverift Using cPanel
Deploying your Node.js application on Hiverift is seamless, thanks to its integrated cPanel support. Whether you’re a developer looking to host a full-stack application or an API service, this guide walks you through each step—from setting up the environment to launching your app.
🚀 Prerequisites
Before starting the deployment process, ensure you have the following:
- A hosting plan from Hiverift that supports Node.js
- Access to cPanel
- Your Node.js application files ready for deployment (e.g., zipped project folder)
- Basic understanding of command line and file structure
📁 Step 1: Log into cPanel
- Go to your Hiverift-hosted domain’s cPanel (e.g.,
https://yourdomain.com/cpanel
). - Enter your username and password provided by Hiverift.
🛠️ Step 2: Set Up a Node.js Application
- In the cPanel dashboard, scroll to the “Software” section.
- Click on “Setup Node.js App”.
- Click Create Application.
- Configure the following settings:
- Node.js version: Select the version compatible with your app.
- Application mode: Choose Production or Development.
- Application root: The folder where your app files are located (e.g.,
myapp
). - Application URL: The subdomain/path where your app will be accessible.
- Application startup file: Usually
app.js
orserver.js
.
- Click Create.
📦 Step 3: Upload Your Application Files
- Return to the main cPanel dashboard.
- Open File Manager.
- Navigate to the application root directory (e.g.,
myapp
). - Upload your zipped application folder.
- Extract the contents within the root directory.
📄 Step 4: Install Dependencies
- Go back to the Node.js App section in cPanel.
- Find your application and click on “Run NPM Install”.
- If your app uses environment variables, create a
.env
file manually in the root directory.
🔄 Step 5: Start the Application
- After dependencies are installed, click “Restart” next to your app.
- Visit your Application URL to verify it’s running.
✅ Troubleshooting Tips
- White screen or 502 error: Check your startup file and ensure the
listen()
method is correctly configured. - Missing dependencies: Re-run
npm install
or check for typos inpackage.json
. - Environment variables not loading: Ensure
.env
is correctly formatted and loaded usingdotenv
.
🧪 Optional: Connect a Custom Domain
- Go to Domains > Subdomains or Domains > Addon Domains in cPanel.
- Point the new domain to your Node.js app’s root directory.
- Use
.htaccess
or cPanel’s domain routing to serve the app via the new domain.
🔒 Bonus: Add SSL with AutoSSL
- Go to SSL/TLS > Manage SSL Sites.
- Use AutoSSL (provided by Hiverift) to install free SSL for your domain.
- Ensure your app handles HTTPS connections correctly.
📘 Conclusion
Deploying Node.js apps on Hiverift using cPanel is straightforward, even for developers new to server management. With built-in support for Node.js environments, file management, and SSL integration, Hiverift provides all the tools you need to get your application live and secure.
Have questions? Hiverift’s support team is available 24/7 to assist you.