What this means
What this means
A Node.js app is any server-side JavaScript application — Express APIs, Fastify services, Next.js with a custom server, or WebSocket backends. The platform clones your repository, detects your package manager from the lockfile (pnpm-lock.yaml → pnpm, yarn.lock → yarn, otherwise npm), installs dependencies, runs your build script automatically if package.json defines one, and starts your app with the command you specify. No database is provisioned automatically.
Before you start
Before you start
Your GitHub repository must contain a package.json in the root directory. Your app must listen on the port provided by the $PORT environment variable (e.g. app.listen(process.env.PORT)). Prepare your start command — typically node server.js, node index.js, or npm start. Do not commit a .env file to your repository — the platform passes your environment variables to the app directly, and frameworks such as Next.js re-read a committed .env at startup and can overwrite them. Do not set NODE_ENV=production as a variable either: the platform already builds in production mode, and setting it makes the install skip devDependencies, which breaks any build that needs TypeScript or a bundler.
Step-by-step guidance
Step-by-step guidance
- Purchase an App Hosting plan or start a free trial from the Services page.
- Push your Node.js project to a public GitHub repository. Ensure package.json is at the root.
- Make sure your app binds to the port provided by process.env.PORT.
- Navigate to Portal → Services and open your App Hosting service.
- In the Deploy App section, set Action to Deploy Node.js app and Runtime to node.
- Paste your GitHub repository URL into the Artifact Reference field.
- Enter your start command in the Start Command field (e.g. node server.js or npm start).
- Add any required environment variables using the Environment Variables fields.
- Click Redeploy App. The platform installs dependencies with your lockfile's package manager (npm, pnpm, or yarn), runs your build script if present, and starts your server.
- No database is provisioned automatically. If your app needs one, deploy PocketBase as a separate service, or connect an external database by adding your own environment variables.
- Visit your assigned domain to confirm your app is running.
What CM Cloud support will review
What CM Cloud support will review
Support checks that your repository is accessible, package.json is present, the start command is valid, and the app responds on the health path after startup.
What is not automated yet
What is not automated yet
If package.json defines a build script, the platform runs it automatically (with your lockfile's package manager) before starting; if it does not, no build runs. For a custom build, set a Build Command in the deploy form or fold it into your start command (e.g. node dist/server.js after a committed build).
Safety note
Safety note
Reading this article does not trigger payment, provisioning, DNS, registrar, Cloudflare, or provider changes.
Safe next action
Safe next action
Push your Node.js project to GitHub with package.json at the root, then open the deploy form.