{"id":8451,"date":"2023-04-30T14:59:26","date_gmt":"2023-04-30T14:59:26","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=ht_kb&#038;p=8451"},"modified":"2024-06-07T13:02:43","modified_gmt":"2024-06-07T13:02:43","password":"","slug":"how-to-setup-node-js-app-in-cpanel","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/","title":{"rendered":"How To Setup Node.js App in cPanel\ufffc"},"content":{"rendered":"\n<p>Node.js is a popular, event-driven JavaScript runtime you can use to build robust web applications. If you are already familiar with creating Node.js apps, you may be wondering how to get your app onto a shared server, a hosting environment in which you are limited in customization. Node.js requires some configuration of your server environment. But now, you can use a virtual environment within your shared hosting environment that allows for the customization necessary to run your app. Learn how to set up a Node.js in cPanel below.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Setup Node.js App in cPanel<\/li><li>Enter The Virtual Environment Command Line<\/li><li>Stopping and Restarting Your App<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Setup Node.js Application<\/h2>\n\n\n\n<p>Step 1 : Log in to cpanel<\/p>\n\n\n\n<p>Step 2 : Choose&nbsp;<strong>Setup Node.js App<\/strong>&nbsp;under&nbsp;<em>Software<\/em><\/p>\n\n\n\n<div class=\"wp-block-cover is-light\"><span aria-hidden=\"true\" class=\"wp-block-cover__gradient-background has-background-dim\"><\/span><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"344\" class=\"wp-block-cover__image-background wp-image-8452\" alt=\"\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png\" data-object-fit=\"cover\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png 814w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-300x127.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-768x325.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-50x21.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-600x254.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-320x135.png 320w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<p class=\"has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<p>Step 3 : click Create Application <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"553\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-1024x553.png\" alt=\"\" class=\"wp-image-8453\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-1024x553.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-300x162.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-768x415.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-50x27.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-920x497.png 920w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-600x324.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1-320x173.png 320w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-1.png 1116w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Step 4 : Fill in the&nbsp;<em>Application root<\/em>&nbsp;field (this is the directory in which you will upload for application files)<\/p>\n\n\n\n<p>Step 5 : Select your Application URL and startup file (if you do not name a startup file,&nbsp;<code>app.js<\/code>&nbsp;is used as the default)<\/p>\n\n\n\n<p>Step 6 : Fill in the remaining fields with your preferred values<\/p>\n\n\n\n<p>Step 7 : Click&nbsp;<strong>Create<\/strong>&nbsp;when ready<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enter The Virtual Environment Command Line<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Copy the \u201csource\u201d command listed above your app settings:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"60\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-2.png\" alt=\"\" class=\"wp-image-8454\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-2.png 682w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-2-300x26.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-2-50x4.png 50w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-2-600x53.png 600w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image-2-320x28.png 320w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><br><\/h2>\n\n\n\n<p>Once you have logged into the server via SSH, copy and paste the \u201csource\u201d command into the command prompt and hit&nbsp;<kbd>ENTER<\/kbd>.<\/p>\n\n\n\n<p>You will then see that you have been logged into your Node virtual environment, seeing a command prompt similar to the following:<\/p>\n\n\n\n<p><em>      [example-node-root (10)] [userna5@server-hostname example-node-root]$       <\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stopping and Restarting Your App<\/h2>\n\n\n\n<p>You can also stop and restart your app whenever you may need it. This can be done easily from the cPanel interface<\/p>\n\n\n\n<p>Step 1 : Log into cPanel (as you did above)<\/p>\n\n\n\n<p>step 2 : Choose&nbsp;<strong>Setup Node.js App<\/strong>&nbsp;under&nbsp;<em>Software<\/em><\/p>\n\n\n\n<p>step 3: Select your app from the list of existing applications<\/p>\n\n\n\n<p>step 5 Click to stop, restart, or edit your application under the&nbsp;<em>Actions<\/em>&nbsp;table<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Well done! You now know how to set up a Node.js app in your cPanel.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Node.js is a popular, event-driven JavaScript runtime you can use to build robust web applications. If you are already familiar with creating Node.js apps, you may be wondering how to get your app onto a shared server, a hosting environment in which you are limited in customization. Node.js requires some configuration of your server environment. [&hellip;]<\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[],"doc_tag":[],"class_list":["post-8451","docs","type-docs","status-publish","hentry"],"year_month":"2026-06","word_count":345,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Emmanuel K","author_nicename":"kimani","author_url":"https:\/\/truehost.com\/support\/author\/kimani\/"},"doc_category_info":[],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Setup Node.js App in cPanel\ufffc -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Setup Node.js App in cPanel\ufffc -\" \/>\n<meta property=\"og:description\" content=\"Node.js is a popular, event-driven JavaScript runtime you can use to build robust web applications. If you are already familiar with creating Node.js apps, you may be wondering how to get your app onto a shared server, a hosting environment in which you are limited in customization. Node.js requires some configuration of your server environment. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-07T13:02:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/\",\"name\":\"How To Setup Node.js App in cPanel\ufffc -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/image.png\",\"datePublished\":\"2023-04-30T14:59:26+00:00\",\"dateModified\":\"2024-06-07T13:02:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/image.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-setup-node-js-app-in-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Setup Node.js App in cPanel\ufffc\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Setup Node.js App in cPanel\ufffc -","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:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How To Setup Node.js App in cPanel\ufffc -","og_description":"Node.js is a popular, event-driven JavaScript runtime you can use to build robust web applications. If you are already familiar with creating Node.js apps, you may be wondering how to get your app onto a shared server, a hosting environment in which you are limited in customization. Node.js requires some configuration of your server environment. [&hellip;]","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/","article_modified_time":"2024-06-07T13:02:43+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/","name":"How To Setup Node.js App in cPanel\ufffc -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png","datePublished":"2023-04-30T14:59:26+00:00","dateModified":"2024-06-07T13:02:43+00:00","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2023\/04\/image.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-setup-node-js-app-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How To Setup Node.js App in cPanel\ufffc"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/8451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=8451"}],"version-history":[{"count":2,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/8451\/revisions"}],"predecessor-version":[{"id":8479,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/8451\/revisions\/8479"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=8451"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=8451"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=8451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}