{"id":745,"date":"2024-10-20T23:36:48","date_gmt":"2024-10-20T23:36:48","guid":{"rendered":"https:\/\/webhostingpune.co.in\/blog\/?p=745"},"modified":"2024-10-20T23:36:51","modified_gmt":"2024-10-20T23:36:51","slug":"how-to-set-up-node-js-selector-in-cpanel","status":"publish","type":"post","link":"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/","title":{"rendered":"How to Set Up a Node.js Application Using CloudLinux\u2019s Node.js Selector in cPanel"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you are hosting your application on a server with\u00a0<strong><a href=\"https:\/\/www.cloudlinux.com\/\" target=\"_blank\" rel=\"noopener\">CloudLinux<\/a><\/strong>\u00a0installed and have access to\u00a0<strong>cPanel<\/strong>, setting up a Node.js application becomes straightforward. CloudLinux\u2019s\u00a0<strong>Node.js Selector<\/strong>\u00a0allows you to easily manage and deploy Node.js applications with various versions, without requiring advanced server configurations. Here\u2019s a step-by-step guide to setting up a Node.js application using the Node.js Selector in cPanel.<\/p>\n\n\n\n<nav aria-label=\"Table of Contents\" class=\"wp-block-table-of-contents\"><ol><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#prerequisites\">Prerequisites<\/a><ol><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-1-log-in-to-cpanel\">Step 1: Log in to cPanel<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-2-access-the-node-js-selector\">Step 2: Access the Node.js Selector<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-3-create-a-new-node-js-application\">Step 3: Create a New Node.js Application<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-4-upload-your-application-files\">Step 4: Upload Your Application Files<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-5-install-dependencies\">Step 5: Install Dependencies<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-6-start-your-application\">Step 6: Start Your Application<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-7-test-your-application\">Step 7: Test Your Application<\/a><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#step-8-managing-and-monitoring-the-application\">Step 8: Managing and Monitoring the Application<\/a><\/li><\/ol><\/li><li><a class=\"wp-block-table-of-contents__entry\" href=\"https:\/\/webhostingpune.co.in\/blog\/how-to-set-up-node-js-selector-in-cpanel\/#conclusion\">Conclusion<\/a><\/li><\/ol><\/nav>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A cPanel account with Node.js Selector enabled by your <a href=\"https:\/\/www.webhostingpune.co.in\/web-hosting\/\">hosting provider<\/a>.<\/li>\n\n\n\n<li>SSH or terminal access to execute commands (if necessary).<\/li>\n\n\n\n<li>Your Node.js application code ready for deployment.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-log-in-to-cpanel\">Step 1: Log in to cPanel<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to your hosting account\u2019s\u00a0<strong><a href=\"https:\/\/www.cpanel.net\/\" target=\"_blank\" rel=\"noopener\">cPanel<\/a><\/strong>. You can typically access cPanel by visiting\u00a0<code>yourdomain.com\/cpanel<\/code>\u00a0and entering your credentials.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-access-the-node-js-selector\">Step 2: Access the Node.js Selector<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once logged in, scroll down or use the search bar to find&nbsp;<strong>Setup Node.js App<\/strong>&nbsp;under the&nbsp;<strong>Software<\/strong>&nbsp;section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-create-a-new-node-js-application\">Step 3: Create a New Node.js Application<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the\u00a0<strong>Setup Node.js App<\/strong>\u00a0interface, click the\u00a0<strong>Create Application<\/strong>\u00a0button.<\/li>\n\n\n\n<li>You will be prompted to configure your application:\n<ul class=\"wp-block-list\">\n<li><strong>Node.js Version<\/strong>: Choose the version of Node.js you want to use for your application. Select the latest stable version that matches your app&#8217;s requirements.<\/li>\n\n\n\n<li><strong>Application Mode<\/strong>: Select whether the application should run in\u00a0<strong>Development<\/strong>\u00a0or\u00a0<strong>Production<\/strong>\u00a0mode.<\/li>\n\n\n\n<li><strong>Application Root<\/strong>: This is the directory where your application files will be stored. You can either use an existing directory or create a new one.<\/li>\n\n\n\n<li><strong>Application URL<\/strong>: Define the URL path where your application will be accessible (e.g.,\u00a0<code>https:\/\/yourdomain.com\/app<\/code>).<\/li>\n\n\n\n<li><strong>Application Startup File<\/strong>: Enter the name of the file that will start your application (e.g.,\u00a0<code>app.js<\/code>\u00a0or\u00a0<code>server.js<\/code>).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click\u00a0<strong>Create<\/strong>\u00a0once all the information is filled in. The system will now initialize the environment for your Node.js application.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-upload-your-application-files\">Step 4: Upload Your Application Files<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Using the\u00a0<strong>File Manager<\/strong>\u00a0in cPanel or an FTP client, navigate to the\u00a0<strong>Application Root<\/strong>\u00a0directory that you defined in the previous step.<\/li>\n\n\n\n<li>Upload your Node.js application files into this directory.<\/li>\n\n\n\n<li>Make sure that your\u00a0<strong>package.json<\/strong>\u00a0file is correctly configured with the necessary dependencies and scripts.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"788\" src=\"https:\/\/webhostingpune.co.in\/blog\/wp-content\/uploads\/2024\/10\/node-js-cpanel-cloudlinux-1.jpg\" alt=\"\" class=\"wp-image-749\" style=\"width:589px;height:auto\" srcset=\"https:\/\/webhostingpune.co.in\/blog\/wp-content\/uploads\/2024\/10\/node-js-cpanel-cloudlinux-1.jpg 940w, https:\/\/webhostingpune.co.in\/blog\/wp-content\/uploads\/2024\/10\/node-js-cpanel-cloudlinux-1-300x251.jpg 300w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-install-dependencies\">Step 5: Install Dependencies<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Back in cPanel, return to the\u00a0<strong>Setup Node.js App<\/strong>\u00a0interface.<\/li>\n\n\n\n<li>Locate your application and click the\u00a0<strong>Manage<\/strong>\u00a0button.<\/li>\n\n\n\n<li>In the management interface, you will see an option to run the\u00a0<strong>NPM Install<\/strong>\u00a0command. Click this button to install the dependencies listed in your\u00a0<code>package.json<\/code>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-6-start-your-application\">Step 6: Start Your Application<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>After the dependencies are installed, scroll down in the management interface and click the\u00a0<strong>Run JS Script<\/strong>\u00a0button next to the\u00a0<strong>Application Startup File<\/strong>\u00a0to start your application.<\/li>\n\n\n\n<li>You should see a message indicating that the application has started successfully.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-7-test-your-application\">Step 7: Test Your Application<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to the&nbsp;<strong>Application URL<\/strong>&nbsp;you configured earlier. If everything is set up correctly, your Node.js application should be running live.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-8-managing-and-monitoring-the-application\">Step 8: Managing and Monitoring the Application<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Restart Application<\/strong>: If you make changes to your code, you may need to restart the application using the\u00a0<strong>Restart<\/strong>\u00a0button in the Node.js Selector interface.<\/li>\n\n\n\n<li><strong>View Logs<\/strong>: To troubleshoot any issues, use the\u00a0<strong>Error Log<\/strong>\u00a0or\u00a0<strong>Access Log<\/strong>\u00a0options to view your application\u2019s logs.<\/li>\n\n\n\n<li><strong>Change Node.js Version<\/strong>: You can easily change the Node.js version by stopping the application and selecting a new version in the setup interface.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Setting up a Node.js application using CloudLinux\u2019s Node.js Selector in cPanel simplifies the deployment process significantly. By following these steps, you can quickly deploy, manage, and scale your Node.js applications directly from cPanel, without worrying about server configurations or manual installations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With this setup, you\u2019re now ready to develop and host Node.js applications with ease.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are hosting your application on a server with\u00a0CloudLinux\u00a0installed and have access to\u00a0cPanel, setting up a Node.js application becomes straightforward. CloudLinux\u2019s\u00a0Node.js Selector\u00a0allows you to easily manage and deploy Node.js applications with various versions, without requiring advanced server configurations. Here\u2019s a step-by-step guide to setting up a Node.js application using the Node.js Selector in cPanel. Prerequisites Step 1: Log in to cPanel Log in to your hosting account\u2019s\u00a0cPanel. You can typically access cPanel by visiting\u00a0yourdomain.com\/cpanel\u00a0and entering your credentials. Step 2: Access the Node.js Selector Once logged in, scroll down or use the search bar to find&nbsp;Setup Node.js App&nbsp;under the&nbsp;Software&nbsp;section. Step 3: Create a New Node.js Application Step 4: Upload Your Application Files Step 5: Install Dependencies Step 6: Start Your Application Step 7: Test Your Application Navigate to the&nbsp;Application URL&nbsp;you configured earlier. If everything is set up correctly, your Node.js application should be running live. Step 8: Managing and Monitoring the Application Conclusion Setting up a Node.js application using CloudLinux\u2019s Node.js Selector in cPanel simplifies the deployment process significantly. By following these steps, you can quickly deploy, manage, and scale your Node.js applications directly from cPanel, without worrying about server configurations or manual installations. With this setup, you\u2019re now ready to develop and host Node.js applications with ease.<\/p>\n","protected":false},"author":1,"featured_media":748,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/comments?post=745"}],"version-history":[{"count":2,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/745\/revisions"}],"predecessor-version":[{"id":750,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/posts\/745\/revisions\/750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/media\/748"}],"wp:attachment":[{"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/media?parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/categories?post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingpune.co.in\/blog\/wp-json\/wp\/v2\/tags?post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}