{"id":689,"date":"2024-03-14T13:40:08","date_gmt":"2024-03-14T13:40:08","guid":{"rendered":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/?p=689"},"modified":"2024-03-14T14:11:35","modified_gmt":"2024-03-14T14:11:35","slug":"how-to-install-node-js-on-cpanel-html","status":"publish","type":"post","link":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html","title":{"rendered":"How to Install Node.js on cPanel?"},"content":{"rendered":"<div class=\"kb-article-content\">\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Setting up a Node.js application in cPanel can be effortless, even for beginners.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Whether you&#8217;re new to web development or an aspiring developer, cPanel provides user-friendly options to get your Node.js applications up and running.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Think of Node.js as a magical genie that can make your website come to life. It&#8217;s a technology that allows you to run your website&#8217;s code and make it do cool things.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">cPanel, on the other hand, is like a magical box that holds your website and all its files. It&#8217;s a tool that helps you manage your website easily, ensuring it runs smoothly and stays online.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Now, let&#8217;s relate this to a real-life scenario:<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Imagine you&#8217;re baking a cake. Think of your server as your kitchen. It&#8217;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).&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">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&#8217;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).<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">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.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">By following the right recipes and using the magical powers of Node.js and cPanel, you&#8217;ll become a master baker (web developer) in no time!<\/span><\/p>\n<hr style=\"border-top: 2px dotted black;\">\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/258\/How-to-Install-a-PHP-Script-in-cPanel.html\"><strong>How to Install a PHP Script in cPanel?<\/strong><\/a><\/span><\/p>\n<hr style=\"border-top: 2px dotted black;\">\n<h2><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Steps to Install Node in cPanel<\/strong><\/span><\/h2>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Now that you understand the basics of cPanel and Node.js, let us list the steps to install Nodes in cPanel.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Just like there are different methods to bake a cake, there are two methods to install Nodes in cPanel.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Method 1:<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">1. Log in to cPanel.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/840_cPanel.png\" alt=\"cPanel\" width=\"405\" height=\"383\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">2. In the <\/span><strong>\u2018software\u2019<\/strong><span style=\"font-weight: 400;\"> section of cPanel, click on the<\/span><strong> \u2018Setup Node.js App\u2019<\/strong><span style=\"font-weight: 400;\"> icon.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/841_Setup-node-js.png\" alt=\"Setup node js\" width=\"1006\" height=\"252\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">3. Click the<\/span><strong> \u2018Create Application\u2019<\/strong><span style=\"font-weight: 400;\"> button on the Node.js selector page to start the application setup.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/842_Click-on-new-file-option.png\" alt=\"Click on new file option\" width=\"981\" height=\"194\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">4. Fill in the required fields of the application setup.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/843_Click-on-create-application.png\" alt=\"Click on create application\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">\u2794 Node.js version: Choose the preferred Node.js version from the drop-down list.<\/span><\/p>\n<ul style=\"list-style: none;\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">\u2605 (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.)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">\u2794 <\/span>Application mode: from the drop-down choices, select Development or Production. You can initially select Development and afterward switch to Production.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">\u2794 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.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">\u2794 Application URL: the open-source URL to your application.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">\u2794 Application startup file: the first file that will be processed when beginning the application.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">\u2794 Passenger Log File: In this, You have to define the path along with the file name.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">5. Click the <\/span><strong>\u2018Create\u2019 <\/strong><span style=\"font-weight: 400;\">button when the form is complete.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/844_Click-on-create-button.png\" alt=\"Click on create button\" width=\"219\" height=\"59\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">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.<\/span><\/p>\n<hr style=\"border-top: 2px dotted black;\">\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/228\/How-to-upload-Laravel-Project-on-Shared-Hosting-With-cPanel.html\"><strong>How to upload Laravel Project on Shared Hosting With cPanel?<\/strong><\/a><\/span><\/p>\n<hr style=\"border-top: 2px dotted black;\">\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>\u27a2 Create the package JSON.<\/strong><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">1. Go back to cPanel&#8217;s dashboard. Click the <\/span><strong>\u2018File Manager\u2019<\/strong><span style=\"font-weight: 400;\"> icon to open the file manager in the <\/span><strong>\u2018Files\u2019<\/strong><span style=\"font-weight: 400;\"> section of cPanel.<\/span><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/845_Filemanager.png\" alt=\"Filemanager\" width=\"793\" height=\"315\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">2. In the left-hand column of File Manager, click the text of the application root folder.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/846_Select-app-folder.png\" alt=\"Select app folder\" width=\"105\" height=\"28\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">3. Click the<strong> \u2018+file\u2019 <\/strong>button to create a new file.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/847_Select-add-file-option.png\" alt=\"Select add file option\" width=\"70\" height=\"37\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">4. Enter the file name <\/span><strong>\u2018package.json\u2019<\/strong><span style=\"font-weight: 400;\"> and click the <\/span><strong>\u2018Create New File\u2019<\/strong><span style=\"font-weight: 400;\"> button in the dialog box.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/848_Create-new-file.png\" alt=\"Create new file\" width=\"496\" height=\"246\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">5. Once the file is created, right-click on the package.json file in the right-hand column of File Manager and then click <\/span><strong>\u2018Edit\u2019<\/strong><span style=\"font-weight: 400;\">.&nbsp;<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/849_Edit-json-file.png\" alt=\"Edit json file\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">6. An edit dialog box is displayed. Click the <\/span><strong>\u2018OK\u2019<\/strong><span style=\"font-weight: 400;\"> button in the edit dialog box and enter the following text in the editor screen.<\/span><\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">{<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;name&#8221;: &#8220;app&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;version&#8221;: &#8220;1.0.0&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;description&#8221;: &#8220;My App&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;main&#8221;: &#8220;app.js&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;scripts&#8221;: {<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;test&#8221;: &#8220;echo \\&#8221;Error: no test specified\\&#8221; &amp;&amp; exit 1&#8243;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">},<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;author&#8221;: &#8220;&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;license&#8221;: &#8220;ISC&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">}<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">7. To save files, click on the \u2018Save Changes\u2019 button.<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/850_Save-changes.png\" alt=\"Save changes\" width=\"347\" height=\"49\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">8. Click <\/span><strong>\u2018Close\u2019<\/strong><span style=\"font-weight: 400;\"> to close the editor.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/851_Click-on-Close-option.png\" alt=\"Click on Close option\" width=\"344\" height=\"44\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>\u27a2 To install NPM, Follow these steps:<\/strong><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">1. In the <\/span><strong>\u2018Software\u2019<\/strong><span style=\"font-weight: 400;\"> section of cPanel, click on the <\/span><strong>\u2018Setup Node.js App\u2019<\/strong><span style=\"font-weight: 400;\"> icon.<\/span><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/852_Setup-node-js.png\" alt=\"Setup node js\" width=\"1006\" height=\"252\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">2.&nbsp;<span style=\"font-weight: 400;\">In the Actions column of the web applications list, click the<\/span><strong> \u2018Pencil icon\u2019<\/strong><span style=\"font-weight: 400;\"> to edit the application.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/853_Click-on-Edit-option.png\" alt=\"Click on Edit option\" width=\"187\" height=\"102\"><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><span style=\"font-weight: 400;\">3. Click the <\/span><strong>\u2018Run NPM Install\u2019<\/strong><span style=\"font-weight: 400;\"> button.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/854_click-NPM-install.png\" alt=\"click NPM install\" width=\"205\" height=\"39\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">The NPM installation runs and presents a success indicator when completed:<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\"><img loading=\"lazy\" decoding=\"async\" style=\"max-width: 100%; display: block; text-align: center; height: auto; margin: 20px auto 20px auto;\" src=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/855_Node.js.png\" alt=\"Node.js\" width=\"296\" height=\"59\"><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">To install packages with NPM and do other command-like tasks related to the application, log in via SSH and enter the application&#8217;s virtual environment using the command shown in the information box at the top of the application setup page.<\/span><\/p>\n<hr style=\"border-top: 2px dotted black;\">\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Also Read: <\/strong><a href=\"https:\/\/www.hostitsmart.com\/manage\/knowledgebase\/269\/How-to-Change-Server-Timezone-in-cPanel.html\"><strong>How to Change Server Timezone in cPanel?<\/strong><\/a><\/span><\/p>\n<hr style=\"border-top: 2px dotted black;\">\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Method 2:<\/strong><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><strong>Setting up Node.js Application using Command Line<\/strong><\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">If you are familiar with SSH, you may find the command line interface faster and easier than the cPanel install interface.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">To set up a node.js application from the command line, follow these steps:<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">1. Connect to your account via SSH.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">2. Create the Node.js application with the following command:<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><span style=\"font-weight: 400; font-family: 'Console', monospace;\">cloudlinux-selector create &#8211;json &#8211;interpreter nodejs &#8211;version 11 &#8211;app-root app &#8211;domain example.com &#8211;app-uri app<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">3. Once inside your account&#8217;s home directory, change to the application directory.<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">cd ~\/app<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Open your preferred text editor and create the package.json file. In our example, we&#8217;ll use the vi editor,3<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">vi package.json<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Press i to change the insert mode and paste the following text into the editor.<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\">\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">{<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;name&#8221;: &#8220;app&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;version&#8221;: &#8220;1.0.0&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;description&#8221;: &#8220;My App&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;main&#8221;: &#8220;app.js&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;scripts&#8221;: {<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;test&#8221;: &#8220;echo \\&#8221;Error: no test specified\\&#8221; &amp;&amp; exit 1&#8243;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">},<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;author&#8221;: &#8220;&#8221;,<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">&#8220;license&#8221;: &#8220;ISC&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: 'Console', monospace;\">}<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Press the Escape key followed by: to enter command line mode.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">Press x followed by the Enter key to save and exit the vi editor.<\/span><\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">4. Install npm by entering the following command.<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><span style=\"font-weight: 400; font-family: 'Console', monospace;\">cloudlinux-selector install-modules &#8211;json &#8211;interpreter nodejs &#8211;user example &#8211;app-root app<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">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.<\/span><\/p>\n<table style=\"border-collapse: collapse; width: 100%; margin-bottom: 10px;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><span style=\"font-weight: 400; font-family: 'Console', monospace;\">Source\/home\/example\/nodevenv\/app\/11\/bin\/activate &amp;&amp; cd \/home\/example\/app<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400; font-family: verdana, geneva, sans-serif;\">And there you go! You&#8217;ve successfully set up Node.js in your cPanel through the user-friendly interface or the command line for more advanced users.<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Setting up a Node.js application in cPanel can be effortless, even for beginners. Whether you&#8217;re new to web development or an aspiring developer, cPanel provides user-friendly options to get your Node.js applications up and running.&nbsp; This guide will help you set up your Node.js application using the cPanel interface, making it simple enough for those [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-689","post","type-post","status-publish","format-standard","hentry","category-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Node.js on cPanel?<\/title>\n<meta name=\"description\" content=\"Know the step-by-step process of installing Node.js on cPanel effortlessly and elevate your web development experience with this comprehensive guid\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Node.js on cPanel?\" \/>\n<meta property=\"og:description\" content=\"Know the step-by-step process of installing Node.js on cPanel effortlessly and elevate your web development experience with this comprehensive guid\" \/>\n<meta property=\"og:url\" content=\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\" \/>\n<meta property=\"og:site_name\" content=\"Host IT Smart Knowledge base\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-14T13:40:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-14T14:11:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostitsmart.com\/manage\/images\/kb\/840_cPanel.png\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html#article\",\"isPartOf\":{\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\"},\"author\":{\"name\":\"Admin\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/8b538056beea86b043adbd20df3a6ee9\"},\"headline\":\"How to Install Node.js on cPanel?\",\"datePublished\":\"2024-03-14T13:40:08+00:00\",\"dateModified\":\"2024-03-14T14:11:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\"},\"wordCount\":1106,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#organization\"},\"articleSection\":[\"cPanel\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\",\"url\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\",\"name\":\"How to Install Node.js on cPanel?\",\"isPartOf\":{\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#website\"},\"datePublished\":\"2024-03-14T13:40:08+00:00\",\"dateModified\":\"2024-03-14T14:11:35+00:00\",\"description\":\"Know the step-by-step process of installing Node.js on cPanel effortlessly and elevate your web development experience with this comprehensive guid\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#website\",\"url\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/\",\"name\":\"Host IT Smart Knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#organization\",\"name\":\"Host IT Smart Knowledge base\",\"url\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/logo\/image\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":240,\"height\":80,\"caption\":\"Host IT Smart Knowledge base\"},\"image\":{\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/8b538056beea86b043adbd20df3a6ee9\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17348df3a33347d3945161d87b752de1d7a7ec25dcbe15baacbd3b8a35367f66?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17348df3a33347d3945161d87b752de1d7a7ec25dcbe15baacbd3b8a35367f66?s=96&d=mm&r=g\",\"caption\":\"Admin\"},\"sameAs\":[\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/\"],\"url\":\"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Node.js on cPanel?","description":"Know the step-by-step process of installing Node.js on cPanel effortlessly and elevate your web development experience with this comprehensive guid","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html","og_locale":"en_US","og_type":"article","og_title":"How to Install Node.js on cPanel?","og_description":"Know the step-by-step process of installing Node.js on cPanel effortlessly and elevate your web development experience with this comprehensive guid","og_url":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html","og_site_name":"Host IT Smart Knowledge base","article_published_time":"2024-03-14T13:40:08+00:00","article_modified_time":"2024-03-14T14:11:35+00:00","og_image":[{"url":"https:\/\/hostitsmart.com\/manage\/images\/kb\/840_cPanel.png"}],"author":"Admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html#article","isPartOf":{"@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html"},"author":{"name":"Admin","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/8b538056beea86b043adbd20df3a6ee9"},"headline":"How to Install Node.js on cPanel?","datePublished":"2024-03-14T13:40:08+00:00","dateModified":"2024-03-14T14:11:35+00:00","mainEntityOfPage":{"@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html"},"wordCount":1106,"commentCount":0,"publisher":{"@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#organization"},"articleSection":["cPanel"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html","url":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html","name":"How to Install Node.js on cPanel?","isPartOf":{"@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#website"},"datePublished":"2024-03-14T13:40:08+00:00","dateModified":"2024-03-14T14:11:35+00:00","description":"Know the step-by-step process of installing Node.js on cPanel effortlessly and elevate your web development experience with this comprehensive guid","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/300\/How-to-Install-Node.js-on-cPanel.html"]}]},{"@type":"WebSite","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#website","url":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/","name":"Host IT Smart Knowledge base","description":"","publisher":{"@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#organization","name":"Host IT Smart Knowledge base","url":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":240,"height":80,"caption":"Host IT Smart Knowledge base"},"image":{"@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/8b538056beea86b043adbd20df3a6ee9","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/17348df3a33347d3945161d87b752de1d7a7ec25dcbe15baacbd3b8a35367f66?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17348df3a33347d3945161d87b752de1d7a7ec25dcbe15baacbd3b8a35367f66?s=96&d=mm&r=g","caption":"Admin"},"sameAs":["https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/"],"url":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":1,"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":690,"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/posts\/689\/revisions\/690"}],"wp:attachment":[{"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/media?parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/categories?post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/new.hostitsmart.com\/manage\/knowledgebase\/wp-json\/wp\/v2\/tags?post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}