> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Bach builds Windows installers from one bach.toml with the bach command: bach init, bach check, bach preview, bach build. Installs are per user and need no administrator rights by default. installer.scope = "machine" installs for every user after one Windows prompt. On Windows, run setup files with Start-Process -Wait -PassThru in PowerShell, and give signtool arguments that start with the word sign.

# Why aren't automatic updates working?

> Work through why installed apps don't update: feed address, publishing, versions, signatures, rollouts, scheduled task and running apps.

If installed copies don't update, work through these steps in order. Each one narrows down the problem.

## 1. Ask the installed app

On a computer that should update:

```powershell theme={"theme":{"light":"github-light","dark":"github-dark"}}
$p = Start-Process "$env:LOCALAPPDATA\Programs\Hello Notes\uninstall.exe" -ArgumentList '--check-update' -Wait -PassThru
$p.ExitCode
```

* **10:** the app sees the new version. Go to step 4.
* **0:** it thinks it's up to date. Go to step 2.
* **1:** it can't read the feed. Go to step 3.
* **2:** this installation has no `[updates]`. It was built without them; the user has to run a newer setup file once.

The reasons are written to `%TEMP%\<app id>-update.log`.

## 2. It says it's up to date

* Open the feed address in a browser. Is `version` higher than the installed one? Only a higher version counts.
* Is it a staged rollout (`"rollout"` in the feed)? Computers outside it wait.
* Is it a GitHub pre-release, or published with "latest" off? Then GitHub's latest feed is still the old one.
* On the beta channel, only the beta feed is asked.

## 3. It can't read the feed

* Open the feed address in a browser. A 404 means the file isn't where `bach.toml` said. For GitHub, the release must contain `latest.json`, and the repository must be public.
* The address must be `https`, including redirects.
* With a `public_key`, the feed must be signed with the matching key. An unsigned or wrongly signed entry is ignored. Sign with `BACH_FEED_KEY` and upload again.
* With `max_age_days`, an old signature is ignored. Sign the current release again.
* Private updates need the access key; your server may be refusing it.

## 4. It sees the update but doesn't install it

* The app is running. Background updates wait until it's closed. Check for processes in the background.
* The download is refused: the file doesn't match the feed's checksum (you replaced or signed the file after writing the feed; run [`bach feed`](/docs/reference/cli/feed) again), or it isn't signed by your `signer`.
* The user turned off **Automatic updates**, or `auto` is `"never"`. Then your app has to run `--download-update` and `--apply-update`.
* Check the scheduled task: Task Scheduler, folder `Bach`, task named after your app id.
* Apps installed for every user can't update in the background.

## 5. The download link is wrong

With your own host, check that `download_url` plus the file name matches where you uploaded it. Names with spaces appear as `%20`.

## Check that it's fixed

`--check-update` returns 10 on an old copy, and after closing the app, `--apply-update` (or the next background check) installs the new version. Settings › Apps shows the new version number.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.