Migration guide
This guide walks through upgrading Veyyon and recovering when an upgrade does not go as planned. Veyyon stores all user data under VEYYON_HOME (by default ~/.veyyon on Unix and the Veyyon application directory on Windows), so most upgrades are safe if you back up that directory first.
Before you upgrade
-
Close all running Veyyon sessions and TUI instances. Writes may still happen while the binary is running, and a backup taken during activity can be inconsistent.
-
Back up
VEYYON_HOME:cp -R ~/.veyyon ~/.veyyon-backup-$(date +%Y%m%d)Keep this backup until you have verified the new version with
veyyon plugin doctorand completed one normal session. -
Read the release notes for the version you are installing. They list required config changes, renamed fields, and any new dependencies.
Config schema updates
Veyyon reads your settings from VEYYON_HOME/config.yml and validates them against the versioned config schema. If a new release requires a new key or renames an existing one, the binary tells you exactly which file and line are affected.
Common schema changes
- New required keys are added when a new feature is on by default. The error message names the missing key and the section it belongs in. Add it to
config.ymlor disable the related feature if you do not need it. - Renamed fields are reported as unknown keys. The old name is usually accepted during a short migration window, but you should rename it to the current spelling.
- Removed fields are ignored unless you run with
--strict-config, in which case unknown keys are treated as errors. Use--strict-configin CI to keep your config clean; leave it off during normal use so upgrades do not immediately break.
Updating your config
-
Open
VEYYON_HOME/config.ymlin an editor. -
Run the new binary once to see any validation errors:
veyyon --version veyyon plugin doctor -
Fix each reported line. If you are unsure what a key does, see the sample configuration that ships with Veyyon or read Configuration.
-
After editing, run
veyyon plugin doctoragain to confirm the file loads cleanly.
You do not need to rewrite the whole file. Most upgrades only add or rename a few keys, and the rest of your settings stay the same.
Session and state data
Veyyon keeps your session data in two places under VEYYON_HOME:
sessions/contains the append-only rollout files, one per session, in JSONL format. These are the source of truth for conversation history, branching, and undo.- A local SQLite state database mirrors key events for fast lookups and diagnostics. It is rebuilt from the rollout files if it is missing or out of sync.
This means you usually do not need a manual database migration. When you start the new binary, it reads the rollout files and updates the state database as needed. If you see a warning about a stale state database, the binary repairs it automatically on startup.
If you need to force a state rebuild
- Close Veyyon.
- Remove the state database file (see File locations for the exact path on your platform).
- Restart Veyyon. The state database is rebuilt from
sessions/andarchived_sessions/.
Never delete sessions/ or archived_sessions/ to fix a state problem. Those are the durable history; the state database is only a cache.
Rolling back a binary
If the new binary does not work for you, you can go back to the previous version without losing data.
- Close all Veyyon processes.
- Restore the previous binary from your system package manager, the release archive, or your own backup.
- Restore your
VEYYON_HOME/config.ymlfrom the backup you made before upgrading, if the new version modified it in ways the old version cannot read. - Leave
sessions/,archived_sessions/, and the state database in place. Rollout files are forward-compatible for recent releases, and the old binary will rebuild the state database if needed. - Start Veyyon and run
veyyon plugin doctorto confirm the environment is healthy.
If you used a new feature that wrote settings the old binary does not recognize, remove or rename those keys before starting the old binary. The error message will point you to the right lines.
Checking health after an upgrade
After every upgrade, confirm the install is healthy:
veyyon --version
veyyon plugin doctor
veyyon plugin doctor checks extension health and warns about missing optional binaries or provider
keys; it exits non-zero when a check reports an error. Start a normal interactive session and run
/debug and /memory diagnose to confirm the runtime and memory backend are working.
Treat every failed check as actionable. Fix the reported line, then re-run. If a check fails after a
rollback, compare your VEYYON_HOME/config.yml against the backup from before the upgrade. See
Troubleshooting for the common failure modes and
Diagnostics and health for the full diagnostics surface.
Spec — not shipped: a top-level
veyyon doctorinstall-health command with--summary/--jsonreports. Useveyyon plugin doctorand the TUI/debugtoday.
Where to go next
- Configuration explains the settings that change between releases.
- File locations lists every path under
VEYYON_HOME. - Troubleshooting walks through common upgrade failures.
- Diagnostics and health covers the diagnostics surface in detail.