Build settings
How your code becomes a running app - the build method, its commands, and the port it listens on.
The Build card, in the app's Settings -> Deployments. Most apps never touch it. A Docker image app or a pasted Compose app has no Build card.
Build methods
Three tabs at the top of the card. Switching keeps the app's domains, variables and volumes.
| Tab | What it does | Its own fields |
|---|---|---|
| Automatic (default) | Your Dockerfile or Compose file if there is one, otherwise Railpack | Framework, Port, the Advanced drawer |
| Dockerfile | Builds your Dockerfile as it is | Dockerfile path, Build context, Build stage, Port |
| Compose | Builds and starts the services of the Compose file in your repository | Compose file |
Nixpacks and Static are gone
Nixpacks, Static, Heroku and Paketo apps moved to Railpack. A folder they published became Railpack's Output directory.
Automatic
On every deploy, the server agent looks in the Root directory:
- A
Dockerfile? It builds it. - Otherwise a Compose file (
compose.yaml,compose.yml,docker-compose.yaml,docker-compose.yml) that builds a service from the repository? It deploys it as a stack. One that only runs images, or breaks a rule, is skipped and the log says why. - Otherwise, Railpack builds the app.
The card shows the result under the tabs, for example Last deploy: Railpack. To ignore a
development Dockerfile or Compose file, tick Always build with Railpack in Advanced. To
deploy a Compose file that only runs images, pick the Compose tab.
Railpack
Railpack reads your code, finds the language and the framework, and writes the build.
- No version to pick: Deplo uses the one it tested,
0.43.0today, updated with the server agent. - Its settings are variables: any
RAILPACK_*, likeRAILPACK_PYTHON_VERSION=3.13orRAILPACK_DEPLOY_APT_PACKAGES=ffmpeg. - Java follows your Gradle toolchain.
RAILPACK_JDK_VERSIONstill wins. - A
railpack.jsonin the repository is used. - GitHub downloads of language tools use a read-only token when the team has the GitHub App, past GitHub's 60 anonymous requests an hour.
Dockerfile
No framework detection. Dockerfile path and Build context are relative to the repository
root. Build stage picks one stage of a multi-stage Dockerfile, like runtime; empty builds
the last.
Docker Compose
The Compose tab: Deplo reads the Compose file in your repository on every deploy, builds its services and starts them as one stack.
- Compose file picks another path, like
deploy/compose.prod.yaml. - Your variables reach the stack. The domain goes to the service with
ports:orexpose:. - Folders a service mounts, like
./data, survive a redeploy in the server's copy of the repository. Backups and moves carry named volumes only: keep data there. - It builds on the app's own server, never a build server. A pull request preview uses its own Compose file.
Anyone who can push writes this file, so these rules always apply:
| In the file | What happens |
|---|---|
ports: | Not opened on the server. The domain reaches that port |
An env_file the repository does not ship | Skipped. Your Deplo variables arrive anyway |
image: on a service with build: | Renamed, so it never stands in for another app's image |
traefik.* labels | Ignored. Deplo routes the domains |
privileged, cap_add, devices, network_mode, pid: host, ipc: host, security_opt and other host-level keys | Refused |
| A bind mount outside the repository, or of the Docker socket | Refused |
An external volume or network, or one with a fixed name | Refused |
include:, extends of another file, label_file | Refused. Put the content in this file |
| A build that reads outside the repository, forwards SSH keys, or runs privileged | Refused |
An env_file, build folder or mounted path inside a folder a service mounts writable | Refused. Mount that folder :ro |
A refused file fails the deploy with the reason in the log. Pasted YAML is a different thing: Compose apps.
Framework detection
With Automatic, the framework is read from package.json and the root configuration on
every deploy. It fills in the build command (your build script), the port, and a start command
only where there is one obvious answer (SvelteKit adapter-node, AdonisJS). Your start script is
never used: it is usually the dev server.
The Framework select, Detect automatically by default, overrides detection, sticks across redeploys and sets that framework's port. Use plus the detected name goes back.
The fields
Port is on the card for Automatic and Dockerfile. The rest are in the Advanced drawer of Automatic. A typed value wins over detection; empty goes back to detection (the grey text is a placeholder).
| Field | What it does |
|---|---|
| Install command | Overrides the install step, like npm ci --include=dev |
| Build command | Overrides the build step, like npm run build:prod |
| Start command | Overrides the start step, like node dist/server.js |
| Output directory | Serves this folder as a static site, like dist. Empty for an app with its own server |
| Node.js version | Pins the Node.js major. Empty reads it from your project |
| Single-page application | Sends unknown paths to index.html, for client-side routing |
| Always build with Railpack | Skips your Dockerfile and Compose file |
| Port | Where the app listens in its container. 3000, or the framework's own |
Root directory is on the Source card of a repository app: the subfolder to build from, like
apps/web. Save build settings does not deploy: Redeploy applies it.
The port is the one people get wrong
Deplo sends traffic to one port per app. Framework defaults that surprise:
| Framework | Port | Framework | Port | |
|---|---|---|---|---|
| Vite, Preact, Svelte | 4173 | Astro | 4321 | |
| Angular | 4200 | AdonisJS | 3333 | |
| Gatsby | 9000 | Strapi | 1337 | |
| Eleventy, Vue | 8080 | Everything else | 3000 |
Deplo finds the real port. If the app listens on 8080 instead of 3000, the deploy moves the
traffic, saves 8080 as Port, records it in Activity and logs:
Your app listens on port 8080, not 3000: Deplo now sends its traffic to 8080.With several ports open, it picks the one that answers HTTP. PORT is still set. It cannot fix
127.0.0.1: an app listening only there fails the deploy. Make it listen on 0.0.0.0.
One hostname can override the port in Domains, to serve an API and a dashboard on two domains.
Build cache
Settings -> Advanced, the Build & triggers card. Build cache is on by default. It lives on the server, shared by every app there: the first build is slow, the next ones are not.
- The switch turns the cache off for this app only.
- Clear cache makes the next deploy build from scratch. It frees no disk: that is Docker cleanup.
- Build on (beta) builds on another server of the same CPU architecture. With Build somewhere else if that server is down on (default), a failed build server hands over to a build fallback server, then the app's own; off, the deploy fails. Build servers.
- Extra compose flags, like
--wait: Compose apps. - Deploy hook: Automatic deployments.
Troubleshooting
| Symptom | What to check |
|---|---|
No start command detected | Set Start command. |
Railpack does not recognise this folder | Set Root directory, or add a Dockerfile. |
Node.js 25 is not available (or another language) | Pin a released version: Node.js version, or the variable the message names. |
command not found during the build | Set Build command, or pick the Framework. |
listens only on 127.0.0.1 | Make the app listen on 0.0.0.0. |
| A Compose app's domain answers nothing | Add expose: ["3000"] to the service that serves the app. |
| Every build is slow | Build cache is off, or a cleanup removes it. |
| A setting saved but nothing changed | Saving is not deploying. Redeploy. |
More in Deploys and builds.
Next steps
Did this page help you?