How to set build and start commands on Voroa
Set the build and start commands Voroa uses for your app, change them any time from Settings, and redeploy with one click so the new commands take effect.
Voroa builds most apps automatically. When you need more control, you can set an explicit build command and start command for your service.
Build command vs start command
- Build command runs once during a deploy to prepare your app — for example installing
dependencies or compiling assets (
npm install,npm run build). - Start command launches your app after the build — for example
npm start.
Leave a field empty to let Voroa detect the default for your project.
Edit the commands
- Open the service and go to Settings.
- Under Build & runtime, edit Build command and Start command.
- Select Save.
Saving a build or start command redeploys your service so the change takes effect. You can watch the new build in the Deploys tab.
When the build command runs
Your build command runs after Voroa has set up the language runtime for your project — the Python
virtual environment, or node_modules, are already in place — and before your service starts. That
is the right place to do extra build work your project needs, such as compiling assets or
downloading a tool your app depends on at runtime.
Anything your build command writes into the project stays in the built image. Anything it writes outside the image, such as a file in a temporary directory, does not.
It replaces the automatic build, it does not add to it
Setting a build command takes the place of the build Voroa would have run on its own. If your
project would normally be built with npm run build and you set the build command to npm install,
then nothing gets built: the install runs, and the build step is gone.
So include the build itself in the command:
npm install && npm run build
This matters most for front-end projects, where the deploy can otherwise finish successfully and the site still return “not found” for every page, because there was nothing to serve. Voroa now stops a deploy like that and tells you in the deploy log instead of publishing an empty site.
Tip: the port is managed for you
Voroa sets a port for your app and tells it through the PORT environment variable. Reading it from
process.env.PORT in your start command or app code is the most reliable option, because that port is
always the one Voroa expects.
If your app listens on a fixed port of its own instead, Voroa detects it during the deploy and sends traffic there. You will see a line in the deploy log saying which port is being used.
Common commands by framework
| Framework | Build command | Start command |
|---|---|---|
| Node.js (Express, Fastify) | leave empty | npm start |
| Next.js | npm install && npm run build |
npm run start |
| Django | SECRET_KEY=collectstatic-only python manage.py collectstatic --noinput |
gunicorn myproject.wsgi --bind 0.0.0.0:$PORT |
| Flask | leave empty | gunicorn app:app --bind 0.0.0.0:$PORT |
Leave both empty first. Voroa detects most projects and installs dependencies on its own; set these only when the default does not fit. Framework guides: Node.js, Next.js and Django.
Frequently asked questions
Where do database migrations go?
Not in the build command. Run them as a pre-deploy step so they apply once, just before the new version starts. The Django guide shows the pattern.
Why does my deploy build but never go live?
The start command usually listens on 127.0.0.1 or the wrong port. Listen on 0.0.0.0 and read the
port from PORT. See deploy status.