Skip to main content
This guide explains how to deploy a Next.js application (SSR / Production Build) on Aisbir Cloud DirectAdmin hosting using a custom server.js runner.

1. Create server.js in Your Project Root

In your local Next.js project root directory, create a file named server.js and add the following code:
server.js

2. Build Your Next.js Application Locally

Run the production build command in your terminal:
Verify that the .next build folder has been successfully generated.

3. Compress Project Files into a ZIP Archive

Select and compress the following files into a single .zip archive (e.g. nextjs.zip):
  • .next folder
  • public folder (if containing static assets/images)
  • server.js file
  • package.json & package-lock.json
  • .env file (if you have environment variables)
DO NOT include the node_modules folder! Dependencies will be installed cleanly on the server.

4. Upload and Extract in DirectAdmin File Manager

  1. Open File Manager in your DirectAdmin panel.
  2. Navigate to domains -> [yourdomain] -> public_html.
  3. Upload nextjs.zip into public_html.
  4. Right-click the .zip file and select Extract to unpack everything into public_html.

5. Setup Node.js App in DirectAdmin

  1. Open the Setup Node.js App tool in DirectAdmin.
  2. Click Create Application:
    • Node.js Version: Select the appropriate Node version (e.g. Node 18 or Node 20).
    • Application Mode: Set to Production.
    • Application Root: Enter your website root path (e.g. domains/yourdomain.com/public_html).
    • Application URL: Select your domain name.
    • Application Startup File: Enter server.js.
  3. Click Create.
  4. Click Run NPM Install on the Node.js configuration page to install all dependencies.
  5. Click Restart / Start Application.

Done 🎉

Your Next.js application is now running seamlessly on DirectAdmin!
Last modified on August 30, 2026