Running on Galaxy Legacy? Visit the legacy docs.
Galaxy
Web Apps

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


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/cli

Log in

galaxy login

Deploy

From your project root:

galaxy deploy my-app-name

For 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


Troubleshooting


What's Next?