{"id":506,"date":"2024-07-02T14:19:49","date_gmt":"2024-07-02T14:19:49","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2024\/07\/02\/9553137-how-to-set-up-a-node-js-application-using-hostinger-cloudpanel\/"},"modified":"2026-03-16T12:11:59","modified_gmt":"2026-03-16T12:11:59","slug":"9553137-how-to-set-up-a-node-js-application-using-hostinger-cloudpanel","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/9553137-how-to-set-up-a-node-js-application-using-hostinger-cloudpanel\/","title":{"rendered":"How to set up a Node.js application on a Hostinger VPS with CloudPanel"},"content":{"rendered":"<p class=\"no-margin\">Follow the steps below to set up a Node.js application using CloudPanel on your Hostinger VPS.<\/p><h2 id=\"h_4b66f09e1c\">Step 1 &ndash; Preparation<\/h2><p class=\"no-margin\">While some basic knowledge of Node.js and server management is recommended, the basic requirements are:<\/p><ul>\n<li>\n<p class=\"no-margin\">A Hostinger <a class=\"intercom-content-link\" href=\"\/support\/8794480-how-to-use-the-cloudpanel-vps-template\" target=\"_blank\" rel=\"noopener\">VPS with CloudPanel installed<\/a>. If you don&rsquo;t have one yet, you can check the available options here: <a class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/vps\/cloudpanel-hosting\" target=\"_blank\" rel=\"noopener\">CloudPanel VPS hosting<\/a>.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">A domain name pointed to the IP address of your VPS (recommended for production environments).<\/p>\n<\/li>\n<\/ul><h2 id=\"h_19062eb26d\">Step 2 &ndash; Access CloudPanel<\/h2><p class=\"no-margin\">Open a web browser and navigate to your CloudPanel installation by entering your VPS IP followed by the CloudPanel port:<br>\n&#8203;<\/p><pre><code>https:\/\/your-vps-ip:8443<\/code><\/pre><p class=\"no-margin\">Replace <b>your-vps-ip<\/b> with the <a class=\"intercom-content-link\" href=\"\/support\/5139756-how-to-find-your-vps-ip-address\" target=\"_blank\" rel=\"noopener\">IP address of your VPS<\/a>.<\/p><p class=\"no-margin\">Enter the login credentials provided during the CloudPanel setup:<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2024\/07\/5fd6ffde-7f24-4ee7-97be-0249f6048ac8.jpg\"><\/div><h2 id=\"h_dff5b689c9\">Step 3 &ndash; Create a Node.js application<\/h2><ol>\n<li>\n<p class=\"no-margin\">Create a new application by navigating to the <b>Sites <\/b>section in CloudPanel and clicking on <b>Add Site<\/b>. Select <b>Node.js<\/b> from the application type options:<br>\n&#8203;<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2024\/07\/dc874e9b-a109-474f-8704-39faec4052bc.jpg\"><\/div>\n<p class=\"no-margin\">\n<\/p><\/li>\n<li>\n<p class=\"no-margin\">Configure the application settings<br>\n&#8203;<\/p>\n<div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2024\/07\/1970a8b9-8b36-4dc9-a080-9215432a8664.jpg\"><\/div>\n<ol>\n<li>\n<p class=\"no-margin\">Domain name &ndash; Enter the domain name for your application.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Node.js version &ndash; Select the Node.js version your application will be running on.<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">App port &ndash; Select the port for your application.<br>\n&#8203;<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<li>\n<p class=\"no-margin\">Deploy your application<\/p>\n<ol>\n<li>\n<p class=\"no-margin\">After configuring the application settings, deploy your application by uploading your Node.js application files through the file manager or by using Git.<br>\n&#8203;<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol><h2 id=\"h_079de2a860\">Step 4 &ndash; Start your Node.js application<\/h2><p class=\"no-margin\"><a class=\"intercom-content-link\" href=\"\/support\/5723772-how-to-connect-to-your-vps-via-ssh\" target=\"_blank\" rel=\"noopener\">Log in via SSH<\/a> with the site user:<\/p><pre><code>ssh user@your-vps-ip<\/code><\/pre><p class=\"no-margin\">Replace <b>your-vps-ip<\/b> with the <a class=\"intercom-content-link\" href=\"\/support\/5139756-how-to-find-your-vps-ip-address\" target=\"_blank\" rel=\"noopener\">IP address of your VPS<\/a>.<\/p><p class=\"no-margin\">Next, go to the root directory of your application:<\/p><pre><code>cd htdocs\/domain.tld\/<\/code><\/pre><p class=\"no-margin\">Replace <b>domain.tld <\/b>with your domian name.<\/p><p class=\"no-margin\">Once there, install the latest <b>pm2<\/b> via <b>npm<\/b>:<\/p><pre><code>npm install pm2@latest -g<\/code><\/pre><p class=\"no-margin\">And start your application by executing:<\/p><pre><code>pm2 start server.js<\/code><\/pre><p class=\"no-margin\">That&rsquo;s all. Now your Node.js application is working within CloudPanel on your Hostinger VPS.<\/p><p class=\"no-margin\"><b>Additional Resources<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\"><a class=\"intercom-content-link\" href=\"https:\/\/www.cloudpanel.io\/docs\/v2\/nodejs\/applications\/ghost\/\" target=\"_blank\" rel=\"noopener\">CloudPanel Node.js documentation<\/a><\/p>\n<\/li>\n<\/ul><p class=\"no-margin\">\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting up Node.js Applications with CloudPanel<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[206],"tags":[],"class_list":["post-506","post","type-post","status-publish","format-standard","hentry","category-vps-os-and-templates"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/9553137-how-to-set-up-a-node-js-application-using-hostinger-cloudpanel\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=506"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":6658,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/506\/revisions\/6658"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}