# Upgrades

> How versions work, how to upgrade the engine, and what happens to courses and progress.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://learn.docs.sypnia.com/self-hosting/upgrades/

For agents: Semver; image tags :1 (major), :1.4 (minor), :1.4.2. Minor and patch upgrades: pull, restart, migrations forward-only and safe to run on a live engine. Majors: release notes; the previous major gets security fixes for 6 months. Lesson format version is separate (format: 1); engines read every format they know and refuse newer ones with a clear message; learn lint warns. Course versions and progress are never rewritten by an upgrade. Back up Postgres and the storage bucket before a major. CLI and engine work one minor apart.

## Versions

The engine follows semantic versions. Image tags: `:1` (the newest 1.x), `:1.4`, `:1.4.2`.

| Upgrade        | What to do                                                                        |
| -------------- | --------------------------------------------------------------------------------- |
| patch or minor | pull the image and restart; migrations only add, and are safe on a running engine |
| major          | read the release notes, back up Postgres and the storage bucket, then upgrade     |

The previous major gets security fixes for six months after a new one.

## Courses and progress

- **Nothing is rewritten.** An upgrade never changes a published course version or anyone's progress.
- **The lesson format has its own version** (`format: 1`). An engine reads every format it knows and refuses a newer one with a clear message; `learn lint` warns before you publish.
- **The CLI** works with an engine one minor version apart, older or newer.
