Skip to content

Updating Tinbox

How to update your Tinbox deployment to a newer version.

Tinbox never auto-updates. You take updates when you choose — pull the new version, run migrations, redeploy. Every step is idempotent so a re-run only applies what's actually new.

Check your current version

Open Settings → About in your inbox, or run:

tinbox doctor

Both show the running version and whether a newer one is published.

Update process

1. Pull the new version

If you installed from npm:

pnpm update tinbox

If you cloned the repo directly:

git pull origin main

2. Run migrations

pnpm tinbox migrate

Migrations are idempotent — running them twice is safe and only applies what's new. The engine tracks which migrations have been applied in D1.

3. Redeploy

pnpm tinbox deploy

Run this locally or through infrastructure you operate. This repository does not use GitHub-triggered automation for builds, migrations, releases, or deployments.

One-command update

For convenience, you can run all three steps at once:

pnpm tinbox:update

This runs tinbox update, which installs, migrates, and redeploys in one idempotent step. Pull the newer package first (pnpm update tinbox, or git pull for a cloned repo), then run it.

Breaking changes

Major version bumps (0.x → 1.0, 1.x → 2.0) may include breaking changes. Check the release notes before updating across major versions.

Migration files handle schema changes automatically, but config changes (wrangler.jsonc, environment variables) are called out in release notes when they require manual action.

Rollback

Worker code and static assets may be rolled back only when that older code explicitly supports the database schema and migrations already applied to the tenant. Check the release notes and run the compatibility/preflight check before deploying an older package. If it is compatible:

pnpm add tinbox@<previous-version>
pnpm tinbox deploy

Database migrations are forward-only by design. Rolling back Worker code never rolls D1 back, never removes migration-ledger rows, and must be refused when the older code cannot run safely on the already-forward schema. Recover with a newer compatible release or an explicit forward repair migration instead.

Update notifications

Tinbox checks for new versions when you open Settings → About. This check:

  • Reads a public version number from npm
  • Sends no data about your deployment
  • Can be disabled with TINBOX_NO_UPDATE_CHECK=1

The check never installs anything automatically — it only tells you when a newer version exists.