Skip to content
Skip to Content

How builds work

A service from Git is built on your own server, with its Dockerfile or with Railpack, by OpenPanel's agent there.

When you deploy a service that comes from a Git repository, it is built into an image on one of your own servers. OpenPanel's servers never see your code.

Everything here works the same from the console, the CLI, the API and MCP. In the console, a service's build is set under Build and start, in New service and on the service's Settings tab: Auto builds with Railpack, Dockerfile with the path you give.

Where a build runs

  • On your server. The build runs on the first server the deployment is placed on, by OpenPanel's agent there, with the server's own git and Docker's buildx. The agent's installer adds both when they are missing.
  • One at a time. A server runs one build at a time; the next waits for it.
  • With the server's resources. A build is not limited: it uses the server's processors and memory, beside the services that run there.
  • In a folder of its own. Each build clones into a scratch folder that is deleted when the build ends, and runs with no Git or Docker settings of the server's own.

Railpack or a Dockerfile

BuildWhenWhat it does
RailpackThe default, when the service names no DockerfileRailpack looks at the service's folder, works out its language and framework, and builds an image without a Dockerfile. See Languages and frameworks.
DockerfileWhen you name a DockerfileDocker builds the folder with your Dockerfile. See Dockerfile builds.

A repository that has a Dockerfile is still built with Railpack until you name the Dockerfile in the service's settings.

What a build does, step by step

  1. Clone. The agent clones the branch's newest commit, or the commit you deployed, and records the commit it got. A commit that differs from the one you asked for fails the build.
  2. Build. It builds the service's folder in the repository with Railpack or your Dockerfile.
  3. Keep the image. The image stays on that server, under a name made of the service's and the deployment's ids, and the deployment moves to deploying.
  4. Clean up. The scratch folder, with the clone and any Git credentials, is deleted.

A path that leads out of the repository, through .. or a symbolic link, fails the build. The build cannot read the server's own files.

Variables do not reach the build

Your service's variables are given to its containers when they run, not to the build. A framework that reads a variable while it builds, for example to put an address into a web page, does not get it. Keep such values in the repository, or read them when the service starts.

Time limits

LimitWhat happens
30 minutes of buildingThe build stops, and the deployment fails with a message that starts with "The build failed: timed out after 30m0s".
60 minutes from the deployA build that has not finished, for example because the server's agent is offline, fails with "The build did not finish within 60 minutes."

Build output

What the build prints is kept with the deployment as its build log (its first 2 MiB, and the last 200 lines of a longer one):

openpanel logs --deployment "$DEPLOYMENT_ID" --follow

or GET /deployments/{id}/logs (the MCP tool deployments_logs). See Build and deploy logs.