Skip to main content
You can run Node.js applications, such as an Express website or an API, on HostCloud hosting. This guide shows you how to set one up in cPanel.

Create the application

1

Open Setup Node.js App

Log in to cPanel, type Setup Node.js App in the Search Tools box and open it.
2

Start a new app

Click Create Application.
3

Fill in the details

4

Create

Click Create. cPanel sets up the app and its folder.

Upload your code and install packages

1

Upload your files

Upload your app’s files, including package.json, to the application root folder. Don’t upload the node_modules folder. See Upload files with File Manager or FTP.
2

Install packages

Back in Setup Node.js App, edit your app and click Run NPM Install. This installs the packages listed in package.json.
3

Start the app

Restart the app from the same page, then open the application URL in your browser.
Your app must use the port it’s given, not a fixed port. In your code, listen on process.env.PORT, for example app.listen(process.env.PORT).

After changing your code

Upload the changed files, run Run NPM Install again if package.json changed, then restart the app.
Apps that need to run heavy background work around the clock, or use their own database server, may outgrow shared hosting. A HostCloud VPS gives you full control. See Connect to your Linux VPS with SSH.
Still stuck? Open a ticket with your app’s URL and any error shown on the Setup Node.js App page.