Update xopc
Check the current version
xopc --version
xopc update --checkChoose a release
Use the current stable build for normal installations, and pin an exact version for servers or unattended deployments. Before changing channels or skipping versions, check the intervening release notes for migrations and permission changes. Desktop, Gateway, mobile, and browser extension updates are distributed separately. GitHub Releases · npm package history · Mobile downloads
Desktop app
Use Settings → Gateway when an in-app update is offered, or download the current installer from xopc.ai. Historical artifacts remain available on GitHub Releases. Close other xopc windows before replacing the application.
Command-line installation
xopc updateIf xopc was installed globally through npm, you can also use:
npm install -g @xopcai/xopc@latestDocker
Pull the selected tag and recreate the container while keeping the state volume:
docker pull ghcr.io/xopcai/xopc:latest
docker compose up -dFor predictable deployments, pin a version instead of latest.
After updating
xopc --version
xopc config validate
xopc doctor
xopc gateway healthThen test one model call and each important channel or extension. Review release notes for new required settings, permission changes, or migration notes.
If an update fails
- Record the old and attempted versions.
- Read the first update or startup error in the logs.
- Confirm the state directory is writable and has free disk space.
- Check extension compatibility.
- Avoid deleting the state directory; it contains your local data.
Package installation and Gateway activation are separate steps. The updater loads service-management modules before replacing package files and still schedules a process restart if extension synchronization or service-definition refresh fails. A failed restart is reported as an error with the installed version and restart details, rather than a successful update.
Before activating a staged npm installation, the updater loads the candidate's Gateway module graph in a fresh process with a temporary state directory. Missing dependency exports and incomplete builds fail verification before the old package and CLI shim are replaced. This does not start a second Gateway or access the live database.
If the package is already current but the running Gateway is older, retrying the update from the console schedules the missing restart without reinstalling. CLI daemon updates verify readiness and the running version through authenticated /api/status; an unverified version or timeout is reported as a restart failure. An in-process update reports a scheduled restart; verify the running version after reconnecting. --no-restart and commands.restart=false still require a manual restart.
If an update migrated your database, restore its matching pre-update backup before running an older version. Back up and restore xopc
Maintainer release checks
Pin the Pi runtime packages (pi-agent-core, pi-ai, pi-coding-agent, pi-codemode, pi-mcp, pi-tui, and chord) as exact direct dependencies from the same tested release. The workspace lockfile and pnpm overrides alone do not constrain an end user's npm dependency resolution. For example, xopc 0.0.381's pi-coding-agent 1.1.0 accepted pi-codemode 1.2.0 through an upstream caret range, but could not load its removed MCP_TYPESCRIPT_PREAMBLE export.
After building, run pnpm run release:check-package and pnpm run release:smoke-package. The second check packs the artifact, installs it into an empty npm prefix without the workspace lockfile, checks Pi versions as resolved by pi-coding-agent, and starts an isolated Gateway to verify readiness and authenticated running-version status. To test an existing artifact, pass its path as pnpm run release:smoke-package /path/to/xopc.tgz. npm is used only inside this isolated check to reproduce user installations; manage repository dependencies with pnpm.
Both checks gate the patch-release script and npm publishing. CI tests the exact tarball that will be published before uploading it as the release artifact. A source-only fix takes effect for users after a new package version is published. An upgrade initiated by an older running updater still uses that updater's checks; the new pre-activation check applies to subsequent upgrades after the fixed version is running.
Database upgrades
xopc v0.0.487 upgrades installed SQLite schemas v202–v280 to v281. Fresh installations start at v281.
Stop other xopc/Gateway processes using the same database before starting the updated app. Before changing the database, xopc writes a consistent snapshot beside it as xopc.db.pre-upgrade-v<version>-<uuid>.bak. The snapshot includes committed WAL data. The complete upgrade chain runs in one transaction and checks database integrity and foreign keys before committing. If a migration fails, xopc rolls it back and keeps the backup for recovery. Retired feature data may remain in installed databases or the pre-upgrade snapshot; those features are not re-enabled.
Back up the entire state directory and external workspaces as described in Back up and restore; the automatic SQLite snapshot contains only the database. Keep enough free disk space for the snapshot and migration. Do not replace a live database with a backup or mix it with unrelated WAL/SHM files.
Recover a v180 database
- Quit xopc and stop any standalone Gateway using the same state directory. Back up the entire state directory, including
xopc.json,xopc.db, and any SQLite WAL/SHM files. Back up external workspaces separately. - Start xopc 0.0.332 with the same state directory. On an Intel Mac, choose
xopc-0.0.332-x64.dmg. Wait for the app to open. This release upgrades the database to v208, imports legacy Agent settings and bindings into SQLite, and resets retired experimental scene data. Its configuration migration converts the legacy ordinary memory write policyconfirmtoallow. - Quit 0.0.332 completely, then start v0.0.487 to finish the database upgrade. Check that your conversations and Agent settings are present. Keep the original backup until you have verified your data.
If the intermediate release fails or you have another schema below v202, retain the full backup and collect the startup report for support.