From a local project
to a live website.
Host Nex on cPanel: choose a supported runtime, export the package, configure the application and test your domain.
Choose a target your host supports.
cPanel is a hosting control panel. Node.js, Passenger, PHP-CGI and private-directory access depend on your plan and provider configuration.
| Nex export target | Prerequisites | Use when |
|---|---|---|
node-nex · default | Node.js 22+, Application Manager or Setup Node.js App. PHP/MVC projects also need PHP-CGI 8.2+ with OpenSSL and permission to spawn child processes. | Your hosting supports running Node applications and PHP-CGI. |
php-apache · compatibility | PHP 8.2+ with OpenSSL, Apache/mod_rewrite or compatible LiteSpeed, and access to a private directory outside the document root. | You are not using a Node application and the host meets the PHP/Apache requirements. |
This Nex website uses PHP views. If you choose the Node target, PHP-CGI is still required. Node does not translate PHP into JavaScript. Static-only hosting cannot run this project.
Confirm with your hosting provider
- Are Node.js 22+ and the application interface available?
- Can the Node application spawn PHP-CGI child processes? What is the correct executable path?
- Can the runtime read private directories and write to the application's storage/database directories?
- How are Passenger, reverse proxying, HTTPS and application logs managed for your account?
This tutorial explains configuration. Opening this page does not export files, access a cPanel account or publish a website automatically.
Prepare the correct deployment package.
- Save all source changes and test important routes with
nex devlocally. - Open File → Export hosting ZIP. This is different from Export separate sheets.
- Select Native Nex Node (
node-nex) or PHP/Apache (php-apache) based on your hosting checks. - Use Base URL / for the domain/subdomain root. For
https://example.com/nex/, use/nex/and match the hosting application path. - Review the compatibility report. For database applications, include only the required NexSQL backend aliases/snapshots already configured in the application.
- Choose the ZIP destination, then read
PANDUAN-HOSTING.md,INSTALL.md, anddeployment-report.jsonfor that package.
Through MCP, nex_hosting_plan can inspect the target, requirements, revision and tutorial without returning source or secrets. ZIP creation and destination selection remain application UI actions.
The ZIP is a standard archive containing private deployment configuration and keys; it is not automatically password protected. Store and transfer it privately. Never expose the ZIP or private directory at a public URL.
Upload the complete package privately.
The following example applies to the native Node target. In cPanel, open File Manager, go to your account's home directory and create an application directory outside the public document root.
/home/USERNAME/nexsite/
├── app.js # Node application startup
├── package.json # npm start
├── public_html/ # package PHP adapter
├── nex-private-XXXXXXXX/ # actual name follows the ZIP
│ ├── containers/ # encrypted .nexcl / .nexsv
│ └── ... # runtime & private configuration
├── INSTALL.md
├── PANDUAN-HOSTING.md
└── deployment-report.json- Upload the ZIP into that private directory and choose Extract.
- Make sure
app.jsandpackage.jsonare directly inside the application root, not an extra nested directory. - Enable Settings → Show Hidden Files to see
.htaccessif needed. - Keep the package's folder names and relationships intact. Keep a private ZIP backup or remove the uploaded copy after extraction and verification.
For the Node target, do not move only the contents of public_html to the domain. Passenger runs app.js from the application root; public_html/index.php in the Node package is a PHP-CGI adapter, not the Node startup file.
If Node/PHP runs under the same account, private directories can typically use 0700 and key/config files 0600. Match user/group access to your provider's setup; do not use 0777 as a shortcut.
Configure the application in cPanel.
On CloudLinux, open Software → Setup Node.js App → Create Application. If your cPanel uses Application Manager, register the uploaded application and match the domain, application path and deployment environment. The interfaces differ; follow the options your host provides.
| Setup Node.js App field | Example value | Explanation |
|---|---|---|
| Node.js version | 22 or newer | Select a version available and supported by your host. |
| Application mode | Production | Do not run a development runtime on a public website. |
| Application root | nexsite | Relative to the account home; the directory must contain app.js directly. |
| Application URL | nex.example.com | Select a domain/subdomain you control. This is an example, not a live domain. |
| URL path | Empty for the domain root | Match Base URL / in the export. For a subdirectory, match the prefix and proxy rules. |
| Application startup file | app.js | Not index.php or a .nexcl/.nexsv file. |
- Make sure the domain/subdomain is registered under Domains and DNS points to your hosting.
- Complete the form and click Create or Deploy/Register as provided by your panel.
- If Application Manager has no startup field, make sure
app.jsexists in the application path. For custom startup settings, follow your provider's Passenger configuration. - Continue with environment settings, then save and restart the application.
The Nex launcher uses built-in Node modules and does not require npm install for external dependencies. Use the panel's Start/Restart controls. Do not launch an additional npm start process if Passenger already manages the application.
Configure the hosting process environment.
On the application configuration page, use Environment variables → Add Variable. Enter Name and Value in separate fields.
| Name | Example Value | Notes |
|---|---|---|
| NODE_ENV | production | This may follow Application mode; make sure the process is in production mode. |
| NEX_ALLOWED_HOSTS | nex.example.com | Exact hosts only, without https://, paths, quotation marks or wildcards. Separate multiple hosts with commas. |
| PHP_CGI_BINARY | /opt/cpanel/ea-php84/root/usr/bin/php-cgi | Example path only. Confirm the actual executable with your provider; required for PHP/MVC. |
| PORT / HOST | Follow your provider's Passenger configuration | Do not choose a random port or store PORT=0 in the panel. |
Click Save, then Restart. Variables set using export in Terminal apply only to that shell session, not automatically to Passenger.
Check the PHP-CGI version if Terminal is available
Use the path confirmed by your provider, then run:
/opt/cpanel/ea-php84/root/usr/bin/php-cgi -vThe output must identify the SAPI as cgi-fcgi, not cli, with PHP 8.2+ and OpenSSL support. Changing the version in MultiPHP Manager does not automatically change the Node application's PHP-CGI path.
Server runtime environment is separate from public website input. Never paste passwords, tokens, nexsh contents, private configuration or deployment keys into tutorials, public screenshots or AI chats.
Using the PHP/Apache target.
Use this section only for a ZIP exported as php-apache. Do not mix these instructions with a Node target package.
- Make sure PHP 8.2+ and OpenSSL are enabled. Use MultiPHP Manager or your host's PHP Selector to choose the domain's PHP version.
- Extract the package into a private location. Keep the
nex-private-<id>directory outside the domain's document root. - Place the contents of the exported public directory (
index.phpand.htaccess) in the correct domain/subdomain document root. - Check that the loader's private path matches the folder location. For custom layouts, adjust only the
$privatereference according to the package'sINSTALL.md. Do not move keys into a public directory. - Make sure Apache/LiteSpeed rewriting is active,
.htaccesswas uploaded, andopen_basedirpermits access to the private directory. - Enable HTTPS and check routes and assets using the following test steps.
/home/USERNAME/
├── public_html/ # example document root
│ ├── index.php
│ └── .htaccess
└── nex-private-XXXXXXXX/ # private, not publicly downloadableA subdomain document root may differ from public_html. Use the actual path shown in cPanel Domains. For a subdirectory Base URL, follow the layout and path references in the package guide.
Nginx/IIS needs administrator-managed front-controller configuration; PHP availability alone does not mean Apache rules will work.
Verify your public domain.
- Open your HTTPS domain, for example
https://nex.example.com/. The server's127.0.0.1address is internal, not a visitor-facing URL. - Test the home page,
/panduan,/unduh, and/panduan/hostingon this website. Keep the Download button disabled because no release is available yet. - Test CSS/JavaScript, the mobile menu, code tabs, guide search and copy controls. Also refresh routes other than the home page.
- For applications with accounts/databases, test login, HTTPS cookies, roles, CSRF, and data reads/writes in an appropriate test environment.
- Make sure the ZIP, private directory, configuration, nexsh, containers and databases cannot be downloaded over HTTP. Check rejection status without sharing secret contents or screenshots.
- Review logs through cPanel or private access. Set up monitoring and backups appropriate for your project.
PHP/MVC on the Node target has adapter limits of 4 concurrent PHP requests, an 8 MB body and a 30-second timeout. Test realistic loads; working locally does not certify every shared host.
Update source without replacing production data.
- Back up production packages, keys/configuration, databases, uploads and storage through a private, recoverable process.
- Test the new package on staging. Use a consistent set of containers, runtime and configuration from the export.
- Check whether the package includes a local database snapshot. Do not replace the production database with a local snapshot without an intentional migration plan.
- Preserve directory permissions, environment, backend aliases and key/container relationships during deployment. Migrate uploads/storage/legacy SQL files separately when needed.
- Restart the Node application through the panel after updating, then test again. For PHP/Apache, check runtime loading using your provider's process.
- If verification fails, restore the appropriate backup. Never disable authentication or Host/Origin guards to hide a deployment issue.
Local and hosted databases do not synchronize automatically. A source export is not a complete backup of all production runtime data.
Start with the symptom you see.
| Symptom | What to check |
|---|---|
| Node.js menu is missing | Confirm available features with the provider. Consider php-apache if its requirements are met; installing server-wide Node is not a regular cPanel user's task. |
| Startup failure / 503 | Node 22+, application root, app.js, package integrity, Passenger logs, resource limits, PHP-CGI and child-process permissions. |
| 403 Forbidden | Match NEX_ALLOWED_HOSTS to the actual domain and Origin. Use the current exported runtime for external navigation; do not add wildcards or disable guards. |
| 404 / route refresh fails | Base URL, Application URL/path, proxy/rewrite rules, .htaccess and virtual mappings in deployment-report.json. |
| CSS/JS is missing | Base path, Blueprint asset connections, asset network responses and domain paths. Private containers are not static assets to link to. |
| 500 / 502 / 504 | Private provider/PHP logs, PHP-CGI rather than CLI, OpenSSL, storage/database permissions, child processes and timeout/body limits. |
| NexSQL fails | Included backend aliases, database file permissions, service connections and package configuration. Editor admin accounts are separate from backend accounts. |
| Login/session issues | HTTPS/proxy settings, cookie domain, sessions and CSRF. Do not disable authentication protections to fix a configuration issue. |
When asking your provider for help, include the domain, incident time, HTTP status and a sanitized log summary. Remove passwords, tokens, session cookies, keys and private configuration contents.
Follow your package's own guide.
Nex requirements and formats on this page follow the Nex exporter documentation and the tutorial returned by nex_hosting_plan. INSTALL.md and PANDUAN-HOSTING.md inside the ZIP describe your package's directory names and Base URL.
- cPanel: create a Node.js application through CloudLinux ↗
- cPanel: Application Manager and environment variables ↗
- CloudLinux: Node.js Selector ↗
Interface documentation checked on November 13, 2026. Menus, versions and permissions vary by provider. This website does not access cPanel or store hosting credentials.
← Back to getting started