{"id":18542,"date":"2025-01-24T10:18:26","date_gmt":"2025-01-24T10:18:26","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=18542"},"modified":"2025-01-24T13:14:10","modified_gmt":"2025-01-24T13:14:10","password":"","slug":"how-to-deploy-nextjs-on-cyberpanel","status":"publish","type":"docs","link":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/","title":{"rendered":"How to deploy Nextjs on Cyberpanel."},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Deploying a Next.js app on CyberPanel is easy with the right steps. This guide walks you through setting up a custom\u00a0<code>server.js<\/code>, configuring LiteSpeed, and getting your Next.js app live quickly. Let\u2019s get started!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Part 1: Preparing a Next.js App for Deployment<\/strong><\/h2>\n\n\n\n<p>To deploy a Next.js app on CyberPanel, follow these steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Create a Custom Next.js Server (server.js)<\/strong><\/h3>\n\n\n\n<p>Next.js apps typically use the built-in server for development. However, for deployment on CyberPanel, you need to create a custom server.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Create a <code>server.js<\/code> file in the root directory of your project.<\/li>\n\n\n\n<li>Add the following code to the file:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>const { createServer } = require('http');\nconst { parse } = require('url');\nconst next = require('next');\n\nconst dev = process.env.NODE_ENV !== 'production';\nconst hostname = 'localhost';\nconst port = process.env.PORT || 3000;\n\nconst app = next({ dev, hostname, port });\nconst handle = app.getRequestHandler();\n\napp.prepare().then(() =&gt; {\n  createServer(async (req, res) =&gt; {\n    try {\n      const parsedUrl = parse(req.url, true);\n      const { pathname, query } = parsedUrl;\n\n      if (pathname === '\/a') {\n        await app.render(req, res, '\/a', query);\n      } else if (pathname === '\/b') {\n        await app.render(req, res, '\/b', query);\n      } else {\n        await handle(req, res, parsedUrl);\n      }\n    } catch (err) {\n      console.error('Error occurred handling', req.url, err);\n      res.statusCode = 500;\n      res.end('Internal server error');\n    }\n  })\n    .once('error', (err) =&gt; {\n      console.error(err);\n      process.exit(1);\n    })\n    .listen(port, () =&gt; {\n      console.log(`&gt; Ready on http:\/\/${hostname}:${port}`);\n    });\n});<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"320\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.png\" alt=\"\" class=\"wp-image-18543\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.png 640w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121-300x150.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>This code sets up a custom server to handle requests and serve your Next.js app.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Modify the package.json File<\/strong><\/h3>\n\n\n\n<p>Update the <code>package.json<\/code> file to use the custom server for production. Add the following to the <code>start<\/code> script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"start\": \"NODE_ENV=production node server.js\",<\/code><\/pre>\n\n\n\n<p>This ensures that the custom server (<code>server.js<\/code>) is used when the app is deployed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"280\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-122.png\" alt=\"\" class=\"wp-image-18544\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-122.png 611w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-122-300x137.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Build the Next.js Application<\/strong><\/h3>\n\n\n\n<p>Before deploying, build your Next.js app by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm run build<\/code><\/pre>\n\n\n\n<p>This generates an optimized production build of your app. Ensure there are no errors during the build process.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"618\" height=\"315\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-123.png\" alt=\"\" class=\"wp-image-18545\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-123.png 618w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-123-300x153.png 300w\" sizes=\"auto, (max-width: 618px) 100vw, 618px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Prepare Files for Deployment<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Open your file manager and locate your Next.js project files.<\/li>\n\n\n\n<li>Enable visibility for hidden files (if necessary).<\/li>\n\n\n\n<li>Exclude the following files and folders:\n<ul class=\"wp-block-list\">\n<li><code>node_modules<\/code><\/li>\n\n\n\n<li><code>.git<\/code><\/li>\n\n\n\n<li><code>README.md<\/code><\/li>\n\n\n\n<li><code>.gitignore<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Select all remaining files and folders, then create a ZIP archive.<\/li>\n<\/ol>\n\n\n\n<p>Excluding <code>node_modules<\/code> reduces the deployment package size. Dependencies will be installed on the server later.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"302\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-124.png\" alt=\"\" class=\"wp-image-18546\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-124.png 611w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-124-300x148.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Part 2: Deploying the Next.js App on CyberPanel<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Install Node.js on CyberPanel Server<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Ubuntu Installation Guide<\/h4>\n\n\n\n<p>Follow the guide at <a href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-nodejs-on-cyberpanel-ubuntu-server\/\">Truehost Support<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">AlmaLinux Installation Guide<\/h4>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Ensure <code>curl<\/code> is installed:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo yum install -y curl<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Download the setup script for Node.js version 18: Replace with your preferred version. <\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/rpm.nodesource.com\/setup_18.x -o nodesource_setup.sh<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Run the setup script:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>bash nodesource_setup.sh<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Install Node.js:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf -y install nodejs<\/code><\/pre>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>Confirm installation:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>node -v<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"193\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-125-1024x193.png\" alt=\"\" class=\"wp-image-18547\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-125-1024x193.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-125-300x57.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-125-768x145.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-125.png 1150w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Upload and Extract Next.js Project<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Create a website in CyberPanel.<\/li>\n\n\n\n<li>Navigate to the File Manager and upload the Next.js archive.<\/li>\n\n\n\n<li>Extract the files and ensure they are in the <code>public_html<\/code> folder, including the <code>server.js<\/code> file.<\/li>\n<\/ol>\n\n\n\n<p>Created: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"988\" height=\"437\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-127.png\" alt=\"\" class=\"wp-image-18549\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-127.png 988w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-127-300x133.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-127-768x340.png 768w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/figure>\n\n\n\n<p>Upload: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"493\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-128-1024x493.png\" alt=\"\" class=\"wp-image-18550\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-128-1024x493.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-128-300x144.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-128-768x370.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-128.png 1302w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"419\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-129-1024x419.png\" alt=\"\" class=\"wp-image-18551\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-129-1024x419.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-129-300x123.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-129-768x314.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-129.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install Dependencies<\/h3>\n\n\n\n<p>Via SSH, navigate to the website path and run npm install : ideally <code><strong><em>\/home\/yourdomain.com\/public_html\/<\/em><\/strong><\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install <\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"494\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-130-1024x494.png\" alt=\"\" class=\"wp-image-18552\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-130-1024x494.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-130-300x145.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-130-768x370.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-130.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Part 3: Add Application Context in CyberPanel<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Configure vHost<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Go to CyberPanel dashboard > <strong>Websites > List Website<\/strong> (Your Domain Website) > <strong>Manage <\/strong>> <strong>Configurations > vHost.<\/strong><\/li>\n\n\n\n<li>Add the following context to the <strong>vHost<\/strong> section: \\<\/li>\n<\/ol>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong><em>NOTE: Do note delete the existing content.  Just scroll to the bottom and add your context. <\/em><\/strong><\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>context \/ {\n  type                    appserver\n  location                \/home\/yourdomain.com\/public_html\n  binPath                 \/usr\/bin\/node\n  appType                 node\n  startupFile             server.js\n  maxConns                100\n\n  rewrite  {\n  }\n  addDefaultCharset       off\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Ensure the <code>location<\/code> path matches your domain.<\/p>\n\n\n\n<p>Ensure you include the <strong><em><code>startupFile<\/code><\/em><\/strong> : server.js in the context definition. <\/p>\n\n\n\n<p><strong><code>startupFile<\/code><\/strong>: This is  key addition (Compared to Nodejs setups). It tells LiteSpeed which file to use to start your Next.js application. In this case, it should be\u00a0<code>server.js<\/code>.<\/p>\n\n\n\n<p>For Nodejs setup, adding startupFile is not required. <\/p>\n\n\n\n<p><strong>Restart Openlitespeed.<\/strong><\/p>\n\n\n\n<p><code><strong><em>systemctl restart lsws<\/em><\/strong><\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Reload Your Site<\/strong><\/h3>\n\n\n\n<p>Once all steps are completed, reload your site, and your<strong> Next.js<\/strong> application should be running successfully on CyberPanel.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"569\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-131-1024x569.png\" alt=\"\" class=\"wp-image-18555\" srcset=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-131-1024x569.png 1024w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-131-300x167.png 300w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-131-768x427.png 768w, https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-131.png 1228w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>In case of Errors, use command below to troubleshoot and Fix the errors.<\/p>\n\n\n\n<p><strong><em><code>\/usr\/local\/lsws\/logs\/error.log<\/code><\/em><\/strong><\/p>\n\n\n\n<p>By following these steps, you can easily deploy your<strong><em> Next.js<\/em><\/strong> app on <strong>CyberPanel<\/strong> and ensure a smooth deployment process.<\/p>\n\n\n\n<p>Happy Hosting! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deploying a Next.js app on CyberPanel is easy with the right steps. This guide walks you through setting up a custom\u00a0server.js, configuring LiteSpeed, and getting your Next.js app live quickly. Let\u2019s get started! Part 1: Preparing a Next.js App for Deployment To deploy a Next.js app on CyberPanel, follow these steps: Step 1: Create a [&hellip;]<\/p>\n","protected":false},"author":24,"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":[2121],"doc_tag":[],"class_list":["post-18542","docs","type-docs","status-publish","hentry","doc_category-cyberpanel"],"year_month":"2026-07","word_count":730,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Kibera","author_nicename":"dan-k","author_url":"https:\/\/truehost.com\/support\/author\/dan-k\/"},"doc_category_info":[{"term_name":"Cyberpanel","term_url":"https:\/\/truehost.com\/support\/docs-category\/cyberpanel\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to deploy Nextjs on Cyberpanel. -<\/title>\n<meta name=\"description\" content=\"Learn how to deploy Next.js on CyberPanel with LiteSpeed. Step-by-step guide to configure custom server.js, set up Node.js.\" \/>\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-deploy-nextjs-on-cyberpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to deploy Nextjs on Cyberpanel. -\" \/>\n<meta property=\"og:description\" content=\"Learn how to deploy Next.js on CyberPanel with LiteSpeed. Step-by-step guide to configure custom server.js, set up Node.js.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-24T13:14:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.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=\"5 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-deploy-nextjs-on-cyberpanel\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/\",\"name\":\"How to deploy Nextjs on Cyberpanel. -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image-121.png\",\"datePublished\":\"2025-01-24T10:18:26+00:00\",\"dateModified\":\"2025-01-24T13:14:10+00:00\",\"description\":\"Learn how to deploy Next.js on CyberPanel with LiteSpeed. Step-by-step guide to configure custom server.js, set up Node.js.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image-121.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2025\\\/01\\\/image-121.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-deploy-nextjs-on-cyberpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to deploy Nextjs on Cyberpanel.\"}]},{\"@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 deploy Nextjs on Cyberpanel. -","description":"Learn how to deploy Next.js on CyberPanel with LiteSpeed. Step-by-step guide to configure custom server.js, set up Node.js.","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-deploy-nextjs-on-cyberpanel\/","og_locale":"en_US","og_type":"article","og_title":"How to deploy Nextjs on Cyberpanel. -","og_description":"Learn how to deploy Next.js on CyberPanel with LiteSpeed. Step-by-step guide to configure custom server.js, set up Node.js.","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/","article_modified_time":"2025-01-24T13:14:10+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/","name":"How to deploy Nextjs on Cyberpanel. -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.png","datePublished":"2025-01-24T10:18:26+00:00","dateModified":"2025-01-24T13:14:10+00:00","description":"Learn how to deploy Next.js on CyberPanel with LiteSpeed. Step-by-step guide to configure custom server.js, set up Node.js.","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2025\/01\/image-121.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-deploy-nextjs-on-cyberpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to deploy Nextjs on Cyberpanel."}]},{"@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\/18542","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\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=18542"}],"version-history":[{"count":4,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/18542\/revisions"}],"predecessor-version":[{"id":18560,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/docs\/18542\/revisions\/18560"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=18542"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=18542"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=18542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}