Files

65 lines
1.9 KiB
Plaintext

import { Callout } from 'nextra/components'
# Updates
Keeping LearnHouse up to date ensures you have the latest features, bug fixes, and security patches.
## Updating LearnHouse
Use the built-in `update` command. It pulls the target image, rewrites the image tag in `docker-compose.yml`, restarts the stack, and prompts for database migrations.
```bash
# Update to the latest version
learnhouse update
# Update to a specific version
learnhouse update --version 1.4.2
```
Flags:
| Flag | Description |
|---|---|
| `--version <tag>` | Pull a specific image tag from `ghcr.io/learnhouse/app`. Defaults to `latest`. |
| `--migrate` | Run database migrations without prompting. |
| `--no-migrate` | Skip database migrations without prompting. |
<Callout type="warning">
Always create a backup before updating. This allows you to roll back if anything goes wrong.
</Callout>
## Recommended Update Procedure
```bash
# 1. Create a backup
learnhouse backup
# 2. Run the update
learnhouse update
# 3. Verify all services are healthy
learnhouse doctor
# 4. Check logs for any errors
learnhouse logs
```
## Checking for Updates
Review the [LearnHouse release notes](https://github.com/learnhouse/learnhouse/releases) before updating to understand what has changed. Some updates may include:
- New features or UI changes
- Database migrations (applied automatically when you accept the prompt or pass `--migrate`)
- Configuration changes that may require updating your `.env` file
- Breaking changes (rare, but documented in release notes)
## Rolling Back
If an update causes issues, restore from your latest backup:
```bash
learnhouse restore <archive.tar.gz>
```
Backups live under `<installDir>/backups/` and are named `learnhouse-backup-<timestamp>.tar.gz`. The restore command replays the database dump and optionally restores the `.env` file — uploaded files on the filesystem are **not** restored (they are not included in the backup).