Quick answer: upload your app to a folder in your website, open Websites → your site → Advanced → Node.js, click Deploy app, fill in the form and click Deploy. Choose Automatic mode so the app runs for production and restarts if it stops.
Before you start
- Node.js must be enabled on your hosting plan. If you do not see the Node.js option, open a ticket.
- Your app must listen on the port you choose (for example
process.env.PORT) on0.0.0.0.
Steps
- Upload your app files with the File Manager (for example into a folder called
my-appin your home directory). - If your app has dependencies, run
npm installin that folder using SSH (see "Connect to Your Hosting with SSH" in your control panel, under Advanced → Developer Tools). - Open Advanced → Node.js and click Deploy app.
- Mode: Automatic (recommended).
- Proxy: turn it on, choose a port between 1024 and 65535 and a path.
- Startup command: for example
npm start. - Working directory: the folder of your app, relative to your home directory (for example
my-app). - Node version: pick the version your app needs, then click Deploy.
Manage the app later
In the same Node.js section you can change the startup command, version, mode, proxy or delete the app. To restart an Automatic app, switch it to Manual and back to Automatic.
Good to know
- Only your website's primary domain is proxied to the app.
- The app shares your plan's CPU and memory limits.
- If you restore a backup, redeploy the app.
- We help with the hosting side. Fixing errors inside your own app code is your responsibility.