Custom Builds
Temps builds apps with Autopack, its built-in builder, and doesn't run Heroku or Paketo buildpacks. To change how an app builds, add an autopack.json (system packages, runtime versions, install, build and start commands), set build commands in .temps.yaml, or bring your own Dockerfile. An existing nixpacks.toml or railpack.json still works as a fallback.
How build detection works
Temps offers presets from the files in your repository: a Compose file, a Dockerfile, framework config files such as next.config.*, language manifests such as composer.json, Gemfile, go.mod or Cargo.toml, a nixpacks.toml, and finally an index.html if nothing else matched. A plain package.json isn't a signal, so an Express, NestJS, Astro or Nuxt app needs the Autopack (Node.js) preset (nixpacks-node) chosen on the project. The presets are listed in How framework detection works.
Which builder runs depends on the preset:
autopack,nixpacks,nixpacks-*,python,go,rust,java: build with Autopack, and read the files on this page.nextjs,vite,react-app,rsbuild,docusaurus: use Temps' own generated Dockerfile. They honour the.temps.yamlbuild commands but don't readautopack.json,railpack.jsonornixpacks.toml.nixpacks-static: has no build step.
autopack.json
Put an autopack.json in the app directory:
autopack.json
{
"packages": { "node": "22" },
"aptPackages": ["libvips-dev"],
"deployAptPackages": ["ffmpeg", "imagemagick"],
"steps": {
"build": { "commands": ["...", "npm run build:docs"] }
},
"deploy": { "startCommand": "node dist/server.js" }
}
| Key | What it does |
|---|---|
packages | Runtime versions, for example { "node": "22" } |
aptPackages | Debian packages in the build image only |
deployAptPackages | Debian packages in the running container. Use this for tools your app runs, such as ffmpeg |
steps.<name>.commands | Replaces the commands of a step (install, build). "..." keeps the commands Autopack generated |
deploy.startCommand | Replaces the start command |
deploy.variables | Variables set in the running container |
provider | Forces a language provider, only under the autopack and nixpacks presets; a language-specific preset wins |
exclude | Extra paths left out of the build context |
An unknown key fails the build with an error naming it. A web: line in a Procfile also sets the start command, and deploy.startCommand wins over it. Temps runs only the web process, so other Procfile lines and deploy.tasks aren't run.
Order of precedence
- A
Dockerfilein the project directory is used, and nothing else on this page applies. - Only one config file is read:
autopack.json, elserailpack.json, elsenixpacks.toml. They aren't merged. .temps.yamlbuild commands and the project's build settings win over the config file's install and build commands.- A language-specific preset wins over
provider. - The start command comes from the config file, then a
Procfileweb:line, then the framework default.
Build commands in .temps.yaml
.temps.yaml in the app directory can override the install command, the build command and the output directory. Keys are in snake_case:
.temps.yaml
build:
install_command: pnpm install --frozen-lockfile
output_dir: dist/my-app/browser
On an Autopack preset, output_dir makes a Node.js app a static site.
On an Autopack preset, build_command replaces the whole build step, including what Autopack adds to it. Combined with output_dir on a Node.js app, the build fails with "/app/Caddyfile": not found, and a Rust app loses the step that installs its binary. To add a command, use "commands": ["...", "your command"] in autopack.json instead. build_command is safe on the nextjs, vite, react-app, rsbuild and docusaurus presets.
Project environment variables don't configure Autopack: setting AUTOPACK_APT_PACKAGES or AUTOPACK_START_CMD on a project does nothing. Use autopack.json.
nixpacks.toml and railpack.json
The nixpacks-* presets keep their names, but since August 2026 Temps builds them with Autopack, not the Nixpacks binary. If there is no autopack.json, Autopack reads a railpack.json or nixpacks.toml in the app directory and translates the parts that have an equivalent. A railpack.json alone doesn't trigger detection, so choose the autopack preset to use one.
nixpacks.toml setting | What Autopack does with it |
|---|---|
aptPkgs | Installs the Debian packages in the build image only; the running container doesn't get them |
nixPkgs | Runtimes only (nodejs_22, python311, go_1_23, …) set the language version. Other Nix packages aren't installed, and the build log shows a warning |
[phases.install] and [phases.build] cmds | Replace the install and build commands. "..." keeps the generated ones |
[phases.setup] cmds | Not run, with no warning |
| Other phases | Not run; the build log shows a warning |
[start] cmd | Replaces the start command |
[variables] | Set in the running container, not during the build |
providers | The first one forces the language provider, only under the autopack and nixpacks presets |
Other keys in the file are ignored without a warning. For tools your app runs, such as ffmpeg, move to deployAptPackages in autopack.json.
From railpack.json, Autopack reads provider, packages, buildAptPackages, steps (commands, inputs, assets, variables, caches), caches, exclude and deploy (startCommand, aptPackages, variables, paths, inputs, base).
Dockerfile
A Dockerfile gives you complete control over the build and the runtime image. Its path and build context are project settings. Multi-stage builds, build arguments and layer caching are covered in Deploy Docker Containers:
Build caching
Temps builds with BuildKit, which keeps Docker layers between builds, and Autopack builds add cache mounts for package-manager downloads (for example the Cargo registry and target/ for Rust). Cache mounts are scoped to the project, environment and branch or tag, so the first build of a new branch starts cold. Order your own Dockerfiles so dependency installs come before COPY . ., as shown in Build caching.
There is no per-project button to clear the cache. To force a clean build, run docker builder prune --all on the server, which clears the build cache for every project, then deploy again.
Build resources
Temps builds through the Docker Engine API with BuildKit on Docker 18.09 and later. BuildKit ignores per-build CPU and memory options, so builds there aren't capped. On Docker's legacy builder, the default is half the host's CPUs (at least 2) and half its RAM (at least 2 GiB, and at most 2047 MB as sent). Autopack builds need BuildKit.
Control-plane build limits
Operators can cap how many image builds run at once on the control plane. On Docker's legacy builder they can also cap each build's CPU and memory; BuildKit ignores those two caps.
Configure these in the console under Settings → Infrastructure → Build Limits (route /settings/build-limits). Three knobs are available:
| Setting | Field | Default | Range | Effect |
|---|---|---|---|---|
| Max concurrent builds | max_concurrent | 2 | 1–32 | How many image builds run at once. Extra builds queue rather than fail. |
| CPU per build (cores) | cpu_limit_cores | 0.0 | 0–64 | Legacy builder only; ignored by BuildKit. 0 = half the host's CPUs, at least 2. |
| Memory per build (MB) | memory_limit_mb | 0 | 0–262144 | Legacy builder only; ignored by BuildKit. Values above 2047 MB are reduced to 2047 MB. 0 = half the host's RAM (at least 2 GiB), reduced the same way. |
On the legacy builder, the resource caps only take effect when both cpu_limit_cores and memory_limit_mb are greater than 0; if either is 0, both fall back to the default. If both are set on a BuildKit host, Temps logs a warning at startup, and only the concurrency limit applies.
Queuing, not failing. A process-wide semaphore inside the build runtime gates every build to max_concurrent permits. When all slots are in use, additional builds wait for a free slot rather than erroring, and the build log stream shows:
[BUILD QUEUED] Waiting for an available build slot...
On the legacy builder, Temps' Docker API client sends the memory cap as a 32-bit value, so anything above 2047 MB is reduced to 2047 MB, with a warning in the server log. BuildKit ignores the value.
When changes take effect
All three settings are read once at startup, so changes take effect after temps serve restarts.
Worker nodes are not limited
These limits apply to the control plane only. Worker nodes (joined with temps join and run with temps agent) don't use them, so builds there aren't queued.