FlaresendDocs

Upgrading

Update a running Flaresend deployment to a newer version of the repo.

If CI deploys for you, upgrading is merging into main. The steps below are for deploying by hand.

Pull and install

git pull
pnpm install
pnpm build

Check what changed

Look at new files in apps/mailer/migrations and at changes to apps/mailer/wrangler.jsonc. A new binding, queue or secret has to exist in your account before the new code runs. Compare your wrangler.jsonc values (database_id, PUBLIC_BASE_URL, routes) with the new file so a merge doesn't overwrite them.

Apply migrations, then deploy the mailer

cd apps/mailer
npx wrangler d1 migrations apply flaresend --remote
npx wrangler deploy

Always migrate first. Wrangler records applied migrations in D1 and only runs new ones. From the repo root, pnpm run deploy runs both commands.

Deploy the dashboard

pnpm --filter @flaresend/dashboard run deploy

Deploy it after the mailer: the dashboard calls the mailer's AdminRpc methods, so a new dashboard may call methods an old mailer doesn't have yet.

Check it

curl https://mailer.example.com/health

{ "ok": true } means the Worker is up and can query D1.

Client package versions

Your apps use @flaresend/client from npm. It is released on its own schedule (see CI and releases), and @flaresend/types always has the same version.

  • Upgrade the mailer before you upgrade the client in your apps, so the server knows any new fields the client sends.
  • While the version is 0.x, breaking changes are released as minor versions. Read the GitHub release notes (tags client-v*) before moving to a new minor.

RPC callers bind to the mailer directly, so a mailer upgrade reaches them straight away. Only their TypeScript types come from the client package.

On this page