Node.js
Deploy your Node.js app on Galaxy with zero-downtime deploys and autoscaling.
Deploy your Node.js app on Galaxy with zero-downtime deploys and autoscaling.
Prerequisites
- A Galaxy account
- Your app in a Git repo with a
package.jsonand astartscript - A payment method added for identity verification
1. Prepare Your App
Galaxy runs your start script and routes traffic to the port it assigns. Two things are required:
Listen on process.env.PORT:
const port = process.env.PORT || 3000;
app.listen(port, () => console.log(`Listening on ${port}`));Define a start script in package.json:
{
"scripts": {
"start": "node server.js"
}
}2. Deploy
Connect your repo
Go to your Galaxy dashboard, click Create New, then Deploy New App. Select Node.js as the app type and connect your GitHub or Bitbucket account.
Select repo and branch
Pick your repository and the branch to deploy from (usually main).
Choose plan and container
Select a plan (Sandbox for testing, Production for live apps) and a container size. Start small, scale later.
Configure and deploy
Set your app name, region, and any environment variables. Hit Deploy.
Galaxy clones your repo, runs npm install, runs your build command (if set), and starts your app.
Every push to your deploy branch triggers a new deployment automatically.
Install the CLI
npm install -g @galaxy-cloud/cliLog in
galaxy loginFor more CLI options, see the Galaxy CLI guide.
3. Configure (Optional)
Build command: Set if you need a build step (e.g., npm run build for TypeScript or bundlers).
Health check path: Point Galaxy at an endpoint like /health so it can verify your app is running.
Environment variables: Set them in the deploy form or your app's Settings page. See the Node.js Reference for a full list.
4. Try It
Express Examples
Official Express.js examples including hello-world, auth, and more
Next.js on OpenNext
Open-source Next.js examples for self-hosted deployments
Fastify Examples
Official collection of runnable Fastify examples

