- Log into WHM:
https://your-server-ip:2087 - Go to EasyApache 4 > Currently Installed Packages > Customize
- In Additional Packages, search for nodejs18 or nodejs20 and enable it.
- In Apache Modules, search for mod-passenger and enable it.
- WHM > List Accounts > Create a New Account > set domain, username, password, email
- Go to:
https://your-server-ip:2083
- Go to: File Manager
- Upload and unzip your project folder inside the home directory (e.g., /home/your-cpanel-username/pdf-tools-all-in-one).
-
cPanel > Domains > Domains > Create a New Domain
- Enter the domain (e.g.,
yourdomain.com) (If not already done) - Set the Document Root to your app’s folder (e.g.,
/pdf-tools-all-in-one) (If not already done)
- Enter the domain (e.g.,
-
Update DNS Records: In your domain registrar’s DNS settings, add:
- Record 01:
- Type: A Record | Name: @ | Points to: your-server-ip
- Record 02:
- Type: CNAME Record | Name: www | Points to: yourdomain.com
- Record 01:
In cPanel, under the Software section, you’ll see either Setup Node.js App or Application Manager, depending on your OS.
-
Go to cPanel > Software > Setup Node.js App
-
Click Create Application
- Node.js Version ➡️
18 LTS (or 20) - Application Mode ➡️
Production - Application Root ➡️
/pdf-tools-all-in-one(The directory where your app files are located.) - Application URL ➡️ The domain you added earlier (e.g.,
yourdomain.com) - Application Startup File ➡️
app.js - Environment Variables ➡️ Leave this section as it is.
- Node.js Version ➡️
-
Click Create, then Start
- In Node.js App section, click Run NPM Install
open a terminal and log in to your VPS using the following command:
ssh root@your-server-ip
or
and enter password (VPS login password)
Navigate to the project directory and install the dependencies using the following commands:
cd /home/your-cpanel-username/pdf-tools-all-in-one
npm run build
PS: Replace your-cpanel-username with your cPanel username
- In Setup Node.js App, click Restart
Then visit your domain to check if it's working: https://yourdomain.com
- After making changes to the code.
- Open a terminal, navigate to the project directory and run the command: npm run build
- Click Restart
- Refresh the page
-
cPanel > Software > Application Manager
-
Click Register Application
- Application Name ➡️
pdftools - Deployment Domain ➡️
yourdomain.com(The domain you added earlier) - Base Application URL ➡️
/ - Application Path ➡️
pdf-tools-all-in-one - Deployment Environment ➡️ Production
- Application Name ➡️
-
Click Deploy
- Click Ensure Dependencies
open a terminal and log in to your VPS using the following command:
ssh root@your-server-ip
or
and enter password (VPS login password)
Navigate to the project directory and install the dependencies using the following commands:
cd /home/your-cpanel-username/pdf-tools-all-in-one
npm run build
PS: Replace your-cpanel-username with your cPanel username
Then visit your domain to check if it's working: https://yourdomain.com
- After making changes to the code.
- Open a terminal, navigate to the project directory and run the command: npm run build
- Switch off the Enabled button and then switch it on.
- Refresh the page
7. 🛠 Depending on your OS Install The Following Required Dependencies (You may consult ChatGPT to obtain the appropriate commands for your operating system):
Verify Installation by running the following commands:
- gs --version
- libreoffice --version
- qpdf --version
Each should return the version number.
- Ensure your domain DNS points to the VPS.
- Ensure DNS is properly propagated before testing.
- If you encounter issues running commands to install dependencies or build the application via the cPanel terminal, consider using the SSH terminal from your local machine instead.