SlideShare a Scribd company logo
1 of 8
Download to read offline
How to Install Node.js on
cPanel?
Setting up a Node.js application in cPanel can be effortless, even
for beginners.
Whether you're new to web development or an aspiring
developer, cPanel provides user-friendly options to get your
Node.js applications up and running.
This guide will help you set up your Node.js application using the
cPanel interface, making it simple enough for those without prior
technical knowledge to complete.
Think of Node.js as a magical genie that can make your website
come to life. It's a technology that allows you to run your
website's code and make it do cool things.
cPanel, on the other hand, is like a magical box that holds your
website and all its files. It's a tool that helps you manage your
website easily, ensuring it runs smoothly and stays online.
Now, let's relate this to a real-life scenario:
Imagine you're baking a cake. Think of your server as your
kitchen. It's where you build and run your website (bake your
cake). The ingredients for your cake are like the code and files of
your website. You need specific ingredients in the right amounts
to make your cake delicious (functional website).
Now, think of Node.js as your recipe. The instructions tell you
how to combine the ingredients (code) and bake the cake (run
the website). cPanel is like your recipe book. It's a collection of
recipes (tools and settings) that help you bake different types of
cakes (websites). Just like each recipe (tool) inside the book
(cPanel) helps you create a specific kind of cake (website).
So, you, the aspiring web developer, are like a baker. With the
help of Node.js (recipe) and cPanel (recipe book), you can create
all sorts of delicious cakes (websites) to share with the world.
By following the right recipes and using the magical powers of
Node.js and cPanel, you'll become a master baker (web
developer) in no time!
Also Read: How to Install a PHP Script in cPanel?
Steps to Install Node in cPanel
Now that you understand the basics of cPanel and Node.js, let us
list the steps to install Nodes in cPanel.
Just like there are different methods to bake a cake, there are
two methods to install Nodes in cPanel.
Method 1:
1. Log in to cPanel.
2. In the ‘software’ section of cPanel, click on the ‘Setup
Node.js App’ icon.
3. Click the ‘Create Application’ button on the Node.js selector
page to start the application setup.
4. Fill in the required fields of the application setup.
➔ Node.js version: Choose the preferred Node.js version from
the drop-down list.
 ★ (Note: Versions that are supported include 8.17.0,
9.11.2, 10.24.1, 11.15.0, 12.22.9, 14.20.1, 16.17.1, and
18.14.1.)
➔ Application mode: from the drop-down choices, select
Development or Production. You can initially select Development
and afterward switch to Production.
➔ Application Root: the application files are kept under the
application root on the system. The item will be added to
/home/username to create the complete path to the application
files in the cPanel home directory.
➔ Application URL: the open-source URL to your application.
➔ Application startup file: the first file that will be processed
when beginning the application.
➔ Passenger Log File: In this, You have to define the path along
with the file name.
5. Click the ‘Create’ button when the form is complete.
After installing a functioning application, the working set can be
improved using the package.json settings file and the npm
package manager. Follow the instructions in the following two
sections to install package.json and npm.
Also Read: How to upload Laravel Project on Shared
Hosting With cPanel?
➢ Create the package JSON.
1. Go back to cPanel's dashboard. Click the ‘File Manager’ icon
to open the file manager in the ‘Files’ section of cPanel.
2. In the left-hand column of File Manager, click the text of the
application root folder.
3. Click the ‘+file’ button to create a new file.
4. Enter the file name ‘package.json’ and click the ‘Create
New File’ button in the dialog box.
5. Once the file is created, right-click on the package.json file in
the right-hand column of File Manager and then click ‘Edit’.
{
"name": "app",
"version": "1.0.0",
"description": "My App",
6. An edit dialog box is displayed. Click the ‘OK’ button in the
edit dialog box and enter the following text in the editor screen.
7. To save files, click on the ‘Save Changes’ button.
8. Click ‘Close’ to close the editor.
➢ To install NPM, Follow these steps:
1. In the ‘Software’ section of cPanel, click on the ‘Setup
Node.js App’ icon.
2. In the Actions column of the web applications list, click
the ‘Pencil icon’ to edit the application.
3. Click the ‘Run NPM Install’ button.
"main": "app.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC"
}
The NPM installation runs and presents a success indicator when
completed:
To install packages with NPM and do other command-like tasks
related to the application, log in via SSH and enter the
application's virtual environment using the command shown in
the information box at the top of the application setup page.
Also Read: How to Change Server Timezone in cPanel?
Method 2:
Setting up Node.js Application using Command Line
If you are familiar with SSH, you may find the command line
interface faster and easier than the cPanel install interface.
To set up a node.js application from the command line, follow
these steps:
1. Connect to your account via SSH.
2. Create the Node.js application with the following command:
3. Once inside your account's home directory, change to the
application directory.
Open your preferred text editor and create the package.json file.
In our example, we'll use the vi editor,3
Press i to change the insert mode and paste the following text
into the editor.
Press the Escape key followed by: to enter command line mode.
cloudlinux-selector create --json --interpreter nodejs --version
11 --app-root app --domain example.com --app-uri app
cd ~/app
vi package.json
Press x followed by the Enter key to save and exit the vi editor.
4. Install npm by entering the following command.
To install packages with NPM and do other command-line tasks
related to the application, log in via SSH and enter the virtual
environment for the application using the command.
And there you go! You've successfully set up Node.js in your
cPanel through the user-friendly interface or the command line
for more advanced users.
Source
https://www.hostitsmart.com/manage/knowledgebase/300/How-
to-Install-Node.js-on-cPanel.html
{
"name": "app",
"version": "1.0.0",
"description": "My App",
"main": "app.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC"
}
cloudlinux-selector install-modules --json --interpreter nodejs
--user example --app-root app
Source/home/example/nodevenv/app/11/bin/activate && cd /home/example/app

More Related Content

Similar to How to Install Node.js on cPanel.pdf

Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with ElectronCross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with ElectronEsinniobiwa Quareeb
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACInexture Solutions
 
Software Developer’s Project Documentation Template
Software Developer’s Project Documentation TemplateSoftware Developer’s Project Documentation Template
Software Developer’s Project Documentation TemplateSalim M Bhonhariya
 
Hybrid Apps in a Snap
Hybrid Apps in a SnapHybrid Apps in a Snap
Hybrid Apps in a SnapPaulina Gallo
 
Orangescrum Invoice Pro Add-on user manual
Orangescrum Invoice Pro Add-on user manualOrangescrum Invoice Pro Add-on user manual
Orangescrum Invoice Pro Add-on user manualOrangescrum
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-frameworkNilesh Bangar
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdfRavinderKSingla
 
GoDaddy Guide to cPanel and WordPress
GoDaddy Guide to cPanel and WordPressGoDaddy Guide to cPanel and WordPress
GoDaddy Guide to cPanel and WordPressGoDaddy
 
How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?Inexture Solutions
 
Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7helpido9
 
Managing Web Infrastructure Systems with Windows PowerShell 2.0 Demo Script
Managing Web Infrastructure Systems with Windows PowerShell 2.0 Demo ScriptManaging Web Infrastructure Systems with Windows PowerShell 2.0 Demo Script
Managing Web Infrastructure Systems with Windows PowerShell 2.0 Demo ScriptMicrosoft TechNet
 
M365 global developer bootcamp 2019
M365 global developer bootcamp 2019M365 global developer bootcamp 2019
M365 global developer bootcamp 2019Thomas Daly
 
M365 global developer bootcamp 2019 PA
M365 global developer bootcamp 2019  PAM365 global developer bootcamp 2019  PA
M365 global developer bootcamp 2019 PAThomas Daly
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 
Training Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183xTraining Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183xAbdelilah CHARBOUB
 

Similar to How to Install Node.js on cPanel.pdf (20)

Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with ElectronCross-platform Desktop Apps development using HTML, CSS, JS with Electron
Cross-platform Desktop Apps development using HTML, CSS, JS with Electron
 
Steps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MACSteps to Install NPM and Node.js on Windows and MAC
Steps to Install NPM and Node.js on Windows and MAC
 
Sencha Touch MVC
Sencha Touch MVCSencha Touch MVC
Sencha Touch MVC
 
Software Developer’s Project Documentation Template
Software Developer’s Project Documentation TemplateSoftware Developer’s Project Documentation Template
Software Developer’s Project Documentation Template
 
Hybrid Apps in a Snap
Hybrid Apps in a SnapHybrid Apps in a Snap
Hybrid Apps in a Snap
 
web application.pptx
web application.pptxweb application.pptx
web application.pptx
 
Orangescrum Invoice Pro Add-on user manual
Orangescrum Invoice Pro Add-on user manualOrangescrum Invoice Pro Add-on user manual
Orangescrum Invoice Pro Add-on user manual
 
Getting started-with-zend-framework
Getting started-with-zend-frameworkGetting started-with-zend-framework
Getting started-with-zend-framework
 
codeblocks-instructions.pdf
codeblocks-instructions.pdfcodeblocks-instructions.pdf
codeblocks-instructions.pdf
 
GoDaddy Guide to cPanel and WordPress
GoDaddy Guide to cPanel and WordPressGoDaddy Guide to cPanel and WordPress
GoDaddy Guide to cPanel and WordPress
 
How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?How to Install Node.js and NPM on Windows and Mac?
How to Install Node.js and NPM on Windows and Mac?
 
Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7Cis 407 i lab 1 of 7
Cis 407 i lab 1 of 7
 
Managing Web Infrastructure Systems with Windows PowerShell 2.0 Demo Script
Managing Web Infrastructure Systems with Windows PowerShell 2.0 Demo ScriptManaging Web Infrastructure Systems with Windows PowerShell 2.0 Demo Script
Managing Web Infrastructure Systems with Windows PowerShell 2.0 Demo Script
 
Dreaweaver cs5
Dreaweaver cs5Dreaweaver cs5
Dreaweaver cs5
 
DotNetNuke
DotNetNukeDotNetNuke
DotNetNuke
 
M365 global developer bootcamp 2019
M365 global developer bootcamp 2019M365 global developer bootcamp 2019
M365 global developer bootcamp 2019
 
M365 global developer bootcamp 2019 PA
M365 global developer bootcamp 2019  PAM365 global developer bootcamp 2019  PA
M365 global developer bootcamp 2019 PA
 
Getting Started with MEAN Stack
Getting Started with MEAN StackGetting Started with MEAN Stack
Getting Started with MEAN Stack
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
Training Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183xTraining Alcatel-Lucent WDM PSS 183x
Training Alcatel-Lucent WDM PSS 183x
 

Recently uploaded

SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 MonthsIndeedSEO
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Timegargpaaro
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel
 
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...lizamodels9
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannaBusinessPlans
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGpr788182
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubaijaehdlyzca
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Falcon Invoice Discounting
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentationuneakwhite
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptxnandhinijagan9867
 
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...yulianti213969
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecZurliaSoop
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGpr788182
 
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book nowPARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book nowkapoorjyoti4444
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizharallensay1
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165meghakumariji156
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGpr788182
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon investment
 
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableCuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Availablepr788182
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting
 

Recently uploaded (20)

SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
Only Cash On Delivery Call Girls In Sikandarpur Gurgaon ❤️8448577510 ⊹Escorts...
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 Updated
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
obat aborsi bandung wa 081336238223 jual obat aborsi cytotec asli di bandung9...
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book nowPARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165Lucknow Housewife Escorts  by Sexy Bhabhi Service 8250092165
Lucknow Housewife Escorts by Sexy Bhabhi Service 8250092165
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableCuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Cuttack Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 

How to Install Node.js on cPanel.pdf

  • 1. How to Install Node.js on cPanel? Setting up a Node.js application in cPanel can be effortless, even for beginners. Whether you're new to web development or an aspiring developer, cPanel provides user-friendly options to get your Node.js applications up and running. This guide will help you set up your Node.js application using the cPanel interface, making it simple enough for those without prior technical knowledge to complete. Think of Node.js as a magical genie that can make your website come to life. It's a technology that allows you to run your website's code and make it do cool things. cPanel, on the other hand, is like a magical box that holds your website and all its files. It's a tool that helps you manage your website easily, ensuring it runs smoothly and stays online. Now, let's relate this to a real-life scenario: Imagine you're baking a cake. Think of your server as your kitchen. It's where you build and run your website (bake your cake). The ingredients for your cake are like the code and files of your website. You need specific ingredients in the right amounts to make your cake delicious (functional website). Now, think of Node.js as your recipe. The instructions tell you how to combine the ingredients (code) and bake the cake (run the website). cPanel is like your recipe book. It's a collection of recipes (tools and settings) that help you bake different types of cakes (websites). Just like each recipe (tool) inside the book (cPanel) helps you create a specific kind of cake (website). So, you, the aspiring web developer, are like a baker. With the help of Node.js (recipe) and cPanel (recipe book), you can create all sorts of delicious cakes (websites) to share with the world. By following the right recipes and using the magical powers of Node.js and cPanel, you'll become a master baker (web developer) in no time!
  • 2. Also Read: How to Install a PHP Script in cPanel? Steps to Install Node in cPanel Now that you understand the basics of cPanel and Node.js, let us list the steps to install Nodes in cPanel. Just like there are different methods to bake a cake, there are two methods to install Nodes in cPanel. Method 1: 1. Log in to cPanel. 2. In the ‘software’ section of cPanel, click on the ‘Setup Node.js App’ icon. 3. Click the ‘Create Application’ button on the Node.js selector page to start the application setup.
  • 3. 4. Fill in the required fields of the application setup. ➔ Node.js version: Choose the preferred Node.js version from the drop-down list.  ★ (Note: Versions that are supported include 8.17.0, 9.11.2, 10.24.1, 11.15.0, 12.22.9, 14.20.1, 16.17.1, and 18.14.1.) ➔ Application mode: from the drop-down choices, select Development or Production. You can initially select Development and afterward switch to Production. ➔ Application Root: the application files are kept under the application root on the system. The item will be added to /home/username to create the complete path to the application files in the cPanel home directory.
  • 4. ➔ Application URL: the open-source URL to your application. ➔ Application startup file: the first file that will be processed when beginning the application. ➔ Passenger Log File: In this, You have to define the path along with the file name. 5. Click the ‘Create’ button when the form is complete. After installing a functioning application, the working set can be improved using the package.json settings file and the npm package manager. Follow the instructions in the following two sections to install package.json and npm. Also Read: How to upload Laravel Project on Shared Hosting With cPanel? ➢ Create the package JSON. 1. Go back to cPanel's dashboard. Click the ‘File Manager’ icon to open the file manager in the ‘Files’ section of cPanel. 2. In the left-hand column of File Manager, click the text of the application root folder. 3. Click the ‘+file’ button to create a new file.
  • 5. 4. Enter the file name ‘package.json’ and click the ‘Create New File’ button in the dialog box. 5. Once the file is created, right-click on the package.json file in the right-hand column of File Manager and then click ‘Edit’. { "name": "app", "version": "1.0.0", "description": "My App",
  • 6. 6. An edit dialog box is displayed. Click the ‘OK’ button in the edit dialog box and enter the following text in the editor screen. 7. To save files, click on the ‘Save Changes’ button. 8. Click ‘Close’ to close the editor. ➢ To install NPM, Follow these steps: 1. In the ‘Software’ section of cPanel, click on the ‘Setup Node.js App’ icon. 2. In the Actions column of the web applications list, click the ‘Pencil icon’ to edit the application. 3. Click the ‘Run NPM Install’ button. "main": "app.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC" }
  • 7. The NPM installation runs and presents a success indicator when completed: To install packages with NPM and do other command-like tasks related to the application, log in via SSH and enter the application's virtual environment using the command shown in the information box at the top of the application setup page. Also Read: How to Change Server Timezone in cPanel? Method 2: Setting up Node.js Application using Command Line If you are familiar with SSH, you may find the command line interface faster and easier than the cPanel install interface. To set up a node.js application from the command line, follow these steps: 1. Connect to your account via SSH. 2. Create the Node.js application with the following command: 3. Once inside your account's home directory, change to the application directory. Open your preferred text editor and create the package.json file. In our example, we'll use the vi editor,3 Press i to change the insert mode and paste the following text into the editor. Press the Escape key followed by: to enter command line mode. cloudlinux-selector create --json --interpreter nodejs --version 11 --app-root app --domain example.com --app-uri app cd ~/app vi package.json
  • 8. Press x followed by the Enter key to save and exit the vi editor. 4. Install npm by entering the following command. To install packages with NPM and do other command-line tasks related to the application, log in via SSH and enter the virtual environment for the application using the command. And there you go! You've successfully set up Node.js in your cPanel through the user-friendly interface or the command line for more advanced users. Source https://www.hostitsmart.com/manage/knowledgebase/300/How- to-Install-Node.js-on-cPanel.html { "name": "app", "version": "1.0.0", "description": "My App", "main": "app.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "", "license": "ISC" } cloudlinux-selector install-modules --json --interpreter nodejs --user example --app-root app Source/home/example/nodevenv/app/11/bin/activate && cd /home/example/app