{"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-10-29T14:41:22","modified_gmt":"2026-10-29T14:41:22","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\">To set up a Node.js application on a <a data-click-id=\"hgr-post-content-link-hostinger-vps\" href=\"\/vps-hosting\">Hostinger VPS<\/a> with CloudPanel, create a Node.js site in CloudPanel, upload your application files, and start the application with the pm2 process manager over SSH.<\/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 data-click-id=\"hgr-post-content-link-vps-with-cloudpanel-installed\" class=\"intercom-content-link\" href=\"\/support\/8794480-how-to-use-the-cloudpanel-vps-template-at-hostinger\/\" 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 data-click-id=\"hgr-post-content-link-cloudpanel-vps-hosting\" class=\"intercom-content-link\" href=\"\/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:<\/p><pre><code>https:\/\/your-vps-ip:8443<\/code><\/pre><p class=\"no-margin\">Replace <b>your-vps-ip<\/b> with the <a data-click-id=\"hgr-post-content-link-ip-address-of-your-vps\" class=\"intercom-content-link\" href=\"\/support\/5139756-how-to-find-your-vps-ip-address-at-hostinger\/\" 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=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2024\/07\/5fd6ffde-7f24-4ee7-97be-0249f6048ac8.jpg\/public\" alt=\"CloudPanel login form with admin username and password fields and Log In button\" data-media-id=\"2426\"><\/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:<\/p>\n<div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2024\/07\/dc874e9b-a109-474f-8704-39faec4052bc.jpg\/public\" alt=\"Node.js site option highlighted in CloudPanel site creation menu\" data-media-id=\"2427\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Configure the application settings<\/p>\n<div class=\"intercom-container\"><img decoding=\"async\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2024\/07\/1970a8b9-8b36-4dc9-a080-9215432a8664.jpg\/public\" alt=\"CloudPanel New Node.js Site form with Node 22 LTS and app port 3000 fields\" data-media-id=\"2428\"><\/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.<\/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.<\/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 data-click-id=\"hgr-post-content-link-log-in-via-ssh\" class=\"intercom-content-link\" href=\"\/support\/5723772-how-to-connect-to-your-vps-via-ssh-at-hostinger\/\" 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 data-click-id=\"hgr-post-content-link-ip-address-of-your-vps-2\" class=\"intercom-content-link\" href=\"\/support\/5139756-how-to-find-your-vps-ip-address-at-hostinger\/\" 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 data-click-id=\"hgr-post-content-link-cloudpanel-node-js-documentation\" 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<li><a data-click-id=\"hgr-post-content-link-how-to-install-a-lets-encrypt-ssl-certificate-on-a-vps-with\" href=\"\/support\/8592551-how-to-install-a-let-s-encrypt-ssl-certificate-on-a-vps-with-cloudpanel-at-hostinger\/\">How to install a Let&rsquo;s Encrypt SSL Certificate on a VPS with CloudPanel at Hostinger<\/a><\/li>\n<\/ul>\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":5,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":22502,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/506\/revisions\/22502"}],"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}]}}