Using SSH in cPanel to Manage Node.js Applications on Hiverift

Using SSH in cPanel to Manage Node.js Applications on Hiverift

Using SSH in cPanel to Manage Node.js Applications on Hiverift

Using SSH in cPanel to Manage Node.js Applications on Hiverift

SSH (Secure Shell) access is a powerful tool for managing Node.js applications directly from the command line. If you’re hosting your Node.js app on Hiverift, SSH access through cPanel gives you full control for installing packages, starting apps, viewing logs, and managing environment variables. Here’s how to set it up and use it effectively.

πŸ” Step 1: Enable SSH Access in Hiverift cPanel

  1. Log in to your Hiverift cPanel.
  2. Go to Security section and click on SSH Access.
  3. Click Manage SSH Keys if you want to use key-based authentication (recommended).
  4. Alternatively, get your SSH login credentials (host, port, username, password).

πŸ§‘β€πŸ’» Step 2: Connect via SSH

Use a terminal (macOS/Linux) or PuTTY (Windows) to connect:

ssh username@yourdomain.com -p 22

If prompted, enter your password or provide the private key.

πŸ“ Step 3: Navigate to Your Application Directory

After login, move to your Node.js application folder:

cd ~/myapp

Use ls to list files and ensure you’re in the right directory.

πŸ“¦ Step 4: Install Node.js Dependencies

If you’ve uploaded your Node.js app using File Manager or Git, install its dependencies:

npm install

This installs all the modules listed in your package.json.

πŸš€ Step 5: Run Your Application

Start your app manually using:

node server.js

Or use a process manager like pm2 for better control (if available):

npx pm2 start server.js

To keep the app running after you log out:

nohup node server.js &

πŸ§ͺ Step 6: View Logs and Debug Errors

    • View the default output of your Node.js app:
cat nohup.out
    • Check error logs (if applicable):
cat error.log

πŸ”„ Step 7: Restart App After Making Changes

After editing files via SSH or File Manager, restart the app:

killall node
node server.js

πŸ“‹ Useful Commands Summary

  • cd – change directory
  • ls – list files
  • npm install – install packages
  • node app.js – run app
  • nano .env – edit environment variables
  • tail -f nohup.out – live log monitor

πŸ’‘ Tips for SSH on Shared Hosting

  • Always test commands locally before running on server
  • Use .env and the dotenv package for sensitive data
  • Use screen or tmux (if available) to maintain sessions
  • Use Git inside SSH to pull project updates directly

πŸ“Œ Conclusion

SSH access on Hiverift gives you developer-grade control over your Node.js apps. You can run, restart, debug, and deploy applications with precision. When combined with cPanel’s Node.js environment setup, SSH becomes an essential part of your deployment and maintenance workflow.

Β© 2025 Node.js SSH Guide | Hosted on Hiverift

 

Post Your Comment

Build Your Website with HiveRift

From professional business to enterprise, we’ve got you covered!

Β©2025, Hosting. All Rights Reserved by KhatuShyam Technologies

HiveRift
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.