Skip to main content
All CollectionsVPSVPS OS and Templates
How to Set Up a Node.js Application Using CloudPanel
How to Set Up a Node.js Application Using CloudPanel

Setting up Node.js Applications with CloudPanel

Updated over a month ago

CloudPanel makes management of web applications easier - follow these steps to set up a Node.js application using CloudPanel on your Hostinger VPS:

Step 1 – Preparations

While some basic knowledge of Node.js and server management is recommended, the basic requirements are:

Step 2 – Access CloudPanel

Open a web browser and navigate to your CloudPanel installation by entering your VPS IP followed by the CloudPanel port:

https://your-vps-ip:8443

Replace your-vps-ip with the IP address of your VPS.

Enter the login credentials provided during the CloudPanel setup:

Step 3 – Create a Node.js Application

  1. Create a new application – Navigate to the Sites section in CloudPanel and click on Add Site. Select Node.js from the application type options:

  2. Configure the application settings

    1. Domain name – Enter the domain name for your application.

    2. Node.js version – Select the Node.js version your application will be running on.

    3. App port – Select the port for your application.

  3. Deploy your application

    1. After configuring the application settings, deploy your application by uploading your Node.js application files through the file manager or by using Git.

Step 4 – Start Your Node.js Application

Log in via SSH with the site user:

ssh user@your-vps-ip

Replace your-vps-ip with the IP address of your VPS.

Next, go to the root directory of your application:

cd htdocs/domain.tld/

Replace domain.tld with your domian name.

Once there, install the latest pm2 via npm:

npm install pm2@latest -g

And start your application by executing:

pm2 start server.js

That's all, now your Node.js application is started within CloudPanel on your Hostinger VPS.

Additional Resources

Did this answer your question?