Running on Galaxy Legacy? Visit the legacy docs.
Galaxy

Node.js Reference

Environment variables, advanced configuration, and deployment reference for Node.js apps on Galaxy.

Environment Variables

Set these in the Galaxy deployment form or your app's Settings page.

Core Variables

VariableRequiredDefaultDescription
PORTYes3000Port your app listens on. Galaxy assigns this automatically.
NODE_ENVYes(none)Set to production for live apps
NODE_OPTIONSNo(none)Extra Node.js flags (e.g., --max-old-space-size=512)

Common Application Variables

VariableDefaultDescription
LOG_LEVELinfoLogging verbosity (trace, debug, info, warn, error)
TZUTCTimezone for your app

Advanced Configuration

Custom Build Commands

If you need build steps (bundling, TypeScript compilation, etc.), define a build script in your package.json:

{
  "scripts": {
    "build": "tsc && webpack",
    "start": "node dist/server.js"
  }
}

Then in Galaxy, set:

  • Build Command: npm run build
  • Start Command: npm start

Galaxy runs install, then build, then start.

Health Check Endpoint

Create a simple health check endpoint for Galaxy to monitor:

app.get('/health', (req, res) => {
  res.status(200).json({
    status: 'ok',
    timestamp: new Date().toISOString()
  });
});

In the Galaxy deployment form, set Health Check Path to /health. Galaxy checks this endpoint regularly. If it fails, Galaxy knows something's wrong.

Supported Versions

Galaxy supports Node.js 18.x, 20.x, 22.x, and later versions. For best compatibility, use Node.js 20.x or 22.x.

Select your Node.js version via the Docker Preset option during deployment or in your app's Settings page.


Need Help?

Quick Help

Live chat is fastest for urgent issues. Available directly from your Galaxy dashboard.