# Custom start command

Source : https://webgune.cloud/en-us/docs/commande-demarrage · Mis à jour le 2026-10-27

# Custom start command

The auto builder correctly guesses the start command in the vast majority of cases. If it doesn't, or if you want specific behavior, you can override it from **Settings → Start command**.

## Common examples

```bash
# Next.js in standalone mode, if automatic detection fails
node .next/standalone/server.js

# Node.js application supervised by PM2
npx pm2-runtime start ecosystem.config.js

# Python API served by Gunicorn
gunicorn app:app --bind 0.0.0.0:$PORT --workers 2

# Already-compiled Go binary from the build
./main --port $PORT
```

## The port counts twice

Your application must listen on the address `0.0.0.0` (not `localhost`) and on the port defined by the `PORT` environment variable. Traefik uses that port to route traffic to your pod.

```javascript
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0");
```

A start command that ignores `PORT` and listens hardcoded on `3000` will work as long as the port configured in Webgune stays `3000`. But it will break silently as soon as that port changes.
