# Updates and advisories

Coldtill tells server admins when to update, and a release install can apply the update from the dashboard
with one click, the way WordPress does. Nothing is installed without an admin clicking **Update**.

## What the server does

A minute after the API starts, and then once a day, it fetches `https://coldtill.com/releases.json`. The request
carries only a `User-Agent` such as `coldtill/1.4.0 (pro)`: no install ID, no domain, no counts. Then:

- **New version.** Admins see a dismissible banner with a link to the changelog. Dismissing hides it until the
  next release.
- **Security advisory affecting this version.** Admins see a red banner on every page that cannot be dismissed
  until the server runs a fixed version. Critical and high advisories are also emailed once to every server admin
  (when SMTP is set up).
- Account → Software updates shows the version, edition, latest release, last check and any advisories, with
  **Check now**. When a newer release exists, **Update** installs it (see below). On an install that doesn't
  have the updater yet, the page shows the command to run on the server instead.

A development build gets no advisories and is never offered an update. That covers version `dev` and any
version that isn't a plain release number, such as `v1.4.0-3-gabc1234` from `git describe`: the published
release can be older than the code it runs, so "updating" could go backwards.

Turn the check off with `COLDTILL_UPDATE_CHECK=off`. Then watch
[coldtill.com/security](https://coldtill.com/security) yourself.

## One-click update

**Update** installs the release named in the feed, for the edition the server already runs. It downloads it,
checks its SHA-256, backs up the database to `backups/`, loads the new image and restarts Coldtill. That's the
same `install.sh` upgrade you can run by hand. It takes a few minutes; the page reconnects and shows the result.
If the update fails, the page shows the error and the end of the install log, and the server keeps the version
it had. The full log is `updater.log` in the install directory.

How it works:

- `install.sh` adds an `updater` service to `docker-compose.yml` and turns it on with
  `COMPOSE_PROFILES=updater` in `.env`. It is the only service with the Docker socket, so the read-only, public
  API container never gets it. The updater publishes no port; the API reaches it on the internal network, with
  a secret (`COLDTILL_UPDATE_SECRET`) that `install.sh` generates.
- The updater checks every request on its own before starting. The running image must report a numbered
  release, the version asked for must be the latest in the feed and newer than the running one, and the edition
  must match.
- Standard and Pro need the install token to download. `install.sh` keeps it in `updater.env` (root only, mode
  600), which only the updater container reads. It is not in `.env`, because every Coldtill container loads
  `.env`, including the public API.
- Existing installs get the updater the next time you run `install.sh`, for example with the command the
  dashboard shows.

The updater holds the Docker socket, which is root on the server, and it runs `install.sh` from coldtill.com.
That is the same trust as installing with `curl … | sudo bash`, but it happens when an admin clicks. If you'd
rather update only by hand, run `docker compose rm -sf updater`, then remove `updater` from
`COMPOSE_PROFILES` in `.env` and delete the `COLDTILL_UPDATER_URL` line. Re-running `install.sh` turns it back on.

## Move a source install to a release install

A server built from the git repository (`deploy/install.sh`, image `coldtill:local`) reports version `dev`, so it
gets no update banners, no advisories and no **Update** button. To move it to the one-line installer's layout in
`/opt/coldtill`, with the one-click updater, keep its data and secrets:

1. **Back up.** In the old `deploy/` folder:

   ```bash
   sudo docker compose exec -T postgres pg_dump -U coldtill coldtill | gzip > ~/coldtill-backup-$(date +%F).sql.gz
   ```

   Also copy `.env` and `secrets/` somewhere safe, offline. They are the only copy of the hot-wallet identity.
2. **Stop the old stack.** Use `stop`, never `down -v`, which would delete the database volume:

   ```bash
   sudo docker compose stop
   ```

3. **Copy the secrets.** Keep their owner and permissions (`-a`). Copy a custom `Caddyfile` too if you changed it:

   ```bash
   sudo mkdir -p /opt/coldtill
   sudo cp -a .env secrets /opt/coldtill/
   ```

4. **Run the installer** with the edition the server already runs and your install token (Free needs no token):

   ```bash
   curl -fsSL https://coldtill.com/install.sh | sudo bash -s -- --edition pro --token cti_…
   ```

   It sees the existing `.env` and keeps every secret, downloads the release compose file and `Caddyfile`, loads
   the release image, adds the updater and starts Coldtill. Database migrations run on start.
5. **Check.** `cd /opt/coldtill && sudo docker compose ps` lists every service as running, and **Account → Software
   updates** shows the release version and edition.
6. **Retire the old folder** so nobody runs `docker compose down` there by mistake, for example
   `mv deploy deploy.old`.

This works because both layouts use the Compose project name `deploy`, so the database volume (`deploy_pgdata`)
and Caddy's certificates are the same volumes in both places. Don't set `COLDTILL_COMPOSE_PROJECT` differently in
the new `.env`. Use the edition the server already runs: the sweep fee is fixed in each deposit wallet when it's
created, and a Free or Standard binary would charge its fee on any deposit wallet created after the move.

To roll back, run `sudo docker compose stop` in `/opt/coldtill`, then `sudo docker compose up -d` in the old folder;
its `coldtill:local` image is still there. Restore the database backup only if the new version changed data you
need to undo.

## Update year and security fixes

Standard and Pro include a year of updates from purchase. After that, the version you have keeps working forever.
**Security fixes are always free**: when an advisory is published, the fixed release can be downloaded by every
paid buyer whatever their update year.

## Feed format

```json
{
  "latest": {
    "version": "1.4.0",
    "date": "2026-11-02",
    "url": "https://coldtill.com/changelog#1.4.0",
    "summary": "Checkout domains, energy rental for Tron sweeps"
  },
  "advisories": [
    {
      "id": "CT-2026-0001",
      "severity": "high",
      "title": "Webhook secret visible to read-only project members",
      "affected": ">=1.2.0, <1.3.2 || >=1.4.0, <1.4.1",
      "fixed": ["1.3.2", "1.4.1"],
      "url": "https://coldtill.com/security/CT-2026-0001",
      "published": "2026-11-05"
    }
  ]
}
```

- `severity` is `critical`, `high`, `medium` or `low`.
- `affected` is a version range: comma-separated conditions (`>=`, `>`, `<=`, `<`, `=`) that must all hold, with
  `||` between alternatives. A range the server can't parse counts as affected, so a typo over-warns rather than
  hiding a problem.
- Versions compare as `major.minor.patch`. A build from `git describe` such as `v1.4.0-3-gabc1234` compares as
  `1.4.0`.

---

Source: https://coldtill.com/docs/updates/ · All Coldtill docs: https://coldtill.com/llms.txt
