Sign in

Operate

Updates, backups, and recovery

Your posts, schedules, connected accounts, and settings are stored in D1; media is stored in R2. Keep the two Worker secrets outside the repository.

Before every update

  1. Read the changelog.
  2. Export D1 and copy the media bucket with an S3-compatible backup tool.
  3. Keep .env.deploy, BETTER_AUTH_SECRET, and TOKEN_ENCRYPTION_KEY in secure storage.
  4. Pull the release, install locked dependencies, then deploy.
pnpm --filter @duskly/api exec wrangler d1 export duskly --remote \
  --output ../../duskly-backup.sql --config wrangler.deploy.json
git pull --ff-only
pnpm install --frozen-lockfile
pnpm deploy:release

What a rollback does

A Cloudflare Worker rollback restores code only. It does not undo D1 migrations, media writes, or changed secrets. Roll back both Workers to compatible versions and restore the database only after accounting for writes made since the backup.

First-response checklist

  • Sign-in fails: verify the web and API domains are the configured HTTPS origins and share one registrable domain.
  • Post stays queued: inspect the Cron trigger, queue consumer, provider permissions, and Worker logs.
  • OAuth fails: compare the callback URL character-for-character with the provider portal and confirm the correct provider secrets are set.

For the full list of known issues, read the troubleshooting guide. Never include tokens, OTPs, database exports, or private post content in an issue.