Skip to content

Setup Troubleshooting

Terminal window
wrangler login
wrangler whoami
pnpm run setup

A database, bucket or Worker name already exists

Section titled “A database, bucket or Worker name already exists”

Setup asks for a different name. It never overwrites another deployment’s resources in your account. Accept the suggested name or type your own. If setup refuses because the Worker “belongs to a different deployment”, pick a new name when prompted.

Check the D1 binding in the root wrangler.toml. For an existing deployment it must contain the real database_id. Do not replace it with the repository’s placeholder. If a merge overwrote it, recover the value from history:

Terminal window
git log -p -- wrangler.toml

Do not re-run setup to recover it: that provisions new resources instead.

The API returns errors on every request, or sign-in fails oddly

Section titled “The API returns errors on every request, or sign-in fails oddly”

GET /api/v1/system/status should report authSecretConfigured: true. If it does not, or wrangler tail shows an auth secret error, BETTER_AUTH_SECRET is missing:

Terminal window
wrangler secret put BETTER_AUTH_SECRET

Setup normally sets it. Rotating it later signs every user out.

The bootstrap routes return 404 once any user exists. If someone already created an account, the Owner cannot be bootstrapped again. Use Owner recovery if you have lost the Owner account. If the routes should work, confirm you are calling the API Worker URL, not the Admin Worker URL.

If the token has expired (30 minutes) or you cannot find it, call bootstrap/request again and read the new [installation-bootstrap] line with wrangler tail. See Create the Owner.

Without an email provider, the link is logged instead of sent. Run wrangler tail, trigger the email, and open the /verify-email?token=… link from the log.