Skip to content
Back to the blog

How to host a Node.js app: Sites, Projects or a VPS

Check package.json, PORT and your domain before choosing Node Apps in Sites, Git deployments in Projects, or Docker on a VPS.

  • Node.js
  • hosting
  • deployment

A Node.js application needs a running process on a server. Uploading its files to static hosting does not start that process. Before choosing a product, check how the app starts, which external services it needs and how much of the server you want to operate.

Hostbrid has three distinct paths: Sites for managing a Node.js app associated with a domain, Projects for deploying services from Git, and a VPS for operating the system and its containers. They have different workflows and responsibilities.

Inspect the project first

At the repository root, find package.json, the entry file and the start command. Check whether the app also needs PostgreSQL, Redis, persistent storage, scheduled jobs or secret environment variables. A framework name alone does not prove that an app is static or tell you what server size it needs.

The process must listen on the port supplied by its environment (PORT). Do not treat a development port as the production port. Test the public URL after deployment and inspect logs if the app fails to start. An app that works on your computer can still fail when production dependencies are installed, routes are resolved or a database connection is made.

If you use Express

Express is a Node server: uploading its files as a static site does not run its routes. This snippet assumes app is the Express instance created earlier; it requires PORT in production and uses 3000 only in local development:

const port = process.env.PORT ?? (process.env.NODE_ENV === 'development' ? 3000 : undefined);
if (!port) throw new Error('PORT must be configured');
app.listen(port);

The Node Apps guide explains how to prepare the entry file and use PORT on Sites. Do not assume that process, proxy or storage settings are identical across Projects and a VPS.

Choose the workflow that fits

Need Product to review What to check
Upload files and manage a Node app associated with a site Sites The Node Apps guide requires an existing site, package.json and an entry file. The app uses the domain and, while active, replaces the previous site served on that domain. One app is allowed per domain.
Deploy from Git when changes are pushed and connect a backend service Projects Check the current plan: backend processes require a paid service plan. Review environment variables, logs and any managed or external database the app uses.
Manage Docker Compose, system packages or the whole machine VPS You operate system setup, updates, security, backups and maintenance. Measure the workload before choosing resources.

If your repository produces only static HTML, CSS and JavaScript, it may not need a Node process in production. Distinguish the server used to build the app (build) from the server that must handle requests (start). The guide to choosing hosting for an AI-built website covers that architecture decision.

Deploy on Sites and verify the domain

The Node Apps documentation describes the Sites workflow: create the site first, prepare package.json and the entry file, then manage the app from the Node.js section. Production dependency installation, port, runtime status and logs are handled in that workflow; follow the current panel instructions for your app.

Before activating it, confirm the selected domain and identify what is currently published there. The Node app takes over the domain while active, so if the current website must remain available, use a separate test domain. A route on the same domain does not prevent the app from replacing the previous site. After startup, open the public URL in a private window, check the main routes and review the logs. Separately verify whether app data survives restarts: do not assume persistent disk or an included database unless the product confirms it.

Avoid three common failures

  • The process does not start: check the entry file, expected command and production dependencies.
  • The deployment starts but does not respond: listen on PORT and inspect process logs.
  • The previous website disappears: the app can occupy the domain while active; verify the domain before enabling it.

If you need Git, several services or system-level resources, compare Projects and VPS before moving the domain. For local diagnosis of a Node process in Docker, see the guide to port, health and state; that diagnostic does not replace the Sites deployment instructions.

Manage your sites, servers and email.

Forgot your password?

Free, and it takes a minute.

At least 8 characters. Not all digits, not a common one.

We'll email you to confirm the account.