# Build settings

Every service that builds from a repository has **Build settings**. They are filled in for you from what Zaroz detects, and you can change them in the console without a [`zaroz.toml`](/git-builds/zaroz-toml) file.

You find them in the service, in the **Source** tab, under **Build settings**. The branch, auto-deploy and checks rules are next to them, under **When it builds and deploys**.

## Change a setting

1. Open the service, go to **Source** and open **Build settings**.
2. Change what you need. A field you leave alone keeps its detected or default value, shown as **Default (value)**. Choose **Use default** on a field to go back to it.
3. Choose **Save settings**.

**Saving does not start a build and does not deploy.** The next build uses the new values. To use them right away, choose **Build now** in the **Builds** tab. If you only changed deploy settings, such as the start command, port or health check, choose **Deploy this build** on the current build to deploy it again with them. See [Rollbacks and redeploys](/git-builds/rollbacks).

You need permission to deploy the service to change its build settings. Anyone who can see the service can read them.

## The settings

The console uses the same names and the same rules as [`zaroz.toml`](/git-builds/zaroz-toml). A value that is valid in the file is valid in the console, and the other way around. Each field is checked when you save, and a problem is shown under the field that has it.

| Setting | What it does | Same as in `zaroz.toml` |
|---|---|---|
| Root directory | The service's folder in the repository. Detection and watch paths start here. | `root` |
| Builder | **Auto**, **Dockerfile**, **Railpack** or **Static site**. See [How builds are detected](/git-builds/detection). | `build.builder` |
| Dockerfile | The path to the Dockerfile, from the root directory. | `build.dockerfile` |
| Build context | The folder sent to the build, from the repository root. | `build.context` |
| Docker target | The stage of a multi-stage Dockerfile. | `build.target` |
| Install command | Replaces the detected install command. | `build.install` |
| Build command | Replaces the detected build command. | `build.command` |
| Start command | The command that runs your app. For a Dockerfile image it replaces `CMD`. | `deploy.start` |
| `{language}` version | A version of Node, Python, Go, PHP, Java or Ruby. | `build.versions` |
| Build variables | Values that are meant to be inside the build. See [Variables at build time](/git-builds/variables-at-build-time). | `build.args` |
| Build secrets it asks for | The names of the [build secrets](/git-builds/build-secrets) the build uses. | `build.secrets` |
| Only build when these change | Path patterns, one per line, from the repository root. | `build.watch` |
| Builder size | **Small**, **medium** or **large**. See below. | `build.size` |
| Timeout | The time limit of a build, such as `20m`. | `build.timeout` |
| Use the build cache | The layer and dependency cache. | `build.cache` |
| Pre-deploy command | Runs before each deploy. See [Pre-deploy and health checks](/git-builds/pre-deploy-and-health-checks). | `deploy.pre_deploy` |
| Health check | The HTTP path Zaroz checks before the new version takes over. | `deploy.health_check` |
| Port | The port your app listens on. The default is 8080. | `deploy.port` |

### Builder size

**Change** next to **Builder size** opens the sizes you can pick, with their processors, memory and how many included minutes each minute of build uses (1x, 2x or 4x). A size your plan or organization does not allow, or that the region does not offer, is shown as not available with the reason. **Use the plan default** puts the size back to what the plan gives. Nothing changes until you save. See [Build minutes](/git-builds/billing#builder-sizes).

### Timeout

A build can run from 5 up to 60 minutes. Your organization may be allowed less: new organizations without a credit limit are held to 30 minutes at first. The console refuses a timeout above your limit when you save, and again when a build is queued.

### Watch paths with a plain git address

A repository added as a plain git address is checked by polling. Polling only sees that there is a new commit, not which files changed, so the console says that **every push to the branch builds** and the watch paths do not apply.

## When `zaroz.toml` also sets a setting

If the repository has a `zaroz.toml` and **Read zaroz.toml** is on, the file wins for every setting it sets:

- The field is **read-only** and says it is set by `zaroz.toml`.
- If you had saved a different value in the console, it stays saved. The field shows **Also saved here: value. It applies if zaroz.toml stops setting this.** Remove the key from the file and the saved value is used again.
- The page says which commit it read the file from: the head of the branch the service follows, or the last build when the git server cannot show newer files. When nothing was read from the repository yet, you see the service's own values and the defaults.

You can turn **Read zaroz.toml** off in **When it builds and deploys**. Then the file is ignored and the console values are used.

## Check a file and export your settings

- **Check file** opens a box where you paste a `zaroz.toml`. You get the check a build runs, with the line and column of each problem. Nothing is saved.
- **Export as zaroz.toml** writes your console settings as a file, to download or copy. It has the names of your build secrets and never their values. Commit it to the repository to move your settings into the file. Zaroz never commits for you.

## Extra build minutes

Included minutes are counted per service, but extra minutes and their limit are set for the whole organization, so they have their own page: **Settings > Builds**. It shows:

- this month's use against the minutes your plans include, with a bar that also shows the extra minutes you allowed;
- the minutes each service used, grouped by project;
- **Extra minutes**, which are **off by default**.

An Owner or Admin can turn extra minutes on there, choosing a **monthly limit**: 4, 10 or 25 EUR, or another amount from 1 to 500 EUR. The page shows the rate and how many minutes the limit buys on each builder size, who turned them on and when. Other members see the page but cannot change it. Turn them off, or change the limit, at any time.

The full rules, including what happens when included minutes run out, are in [Build minutes](/git-builds/billing#extra-minutes). When a build is refused for minutes, the error points you to this page.

## Other things on the Source tab

- **Build secrets**: private values for the build. See [Build secrets](/git-builds/build-secrets).
- **Deploy hooks**: private URLs that start a build when called. See [Build from your CI](/git-builds/ci).
- **Change repository**: pick another repository for the service. Nothing changes until you save the rules.
