Keys / Convex
CONVEX_DEPLOY_KEY
The deploy key your build or CI runs npx convex deploy with. A production key starts with prod:, a preview key with preview:.
- Expires
- the docs don't say
- API
- create and delete, with the Management API
Get it
Create one on dashboard.convex.dev/deployment/settings. The steps aren't recorded yet.
Set it
CONVEX_DEPLOY_KEY=...
The Convex CLI reads it and runs against that deployment without asking. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- On the deployment's settings page, click Generate a deploy key, with the same permissions as the old one. Preview keys come from the project's settings page.
- Deploy it everywhere that reads
CONVEX_DEPLOY_KEY, such as your Vercel Production or Preview environment. - Check that nothing still uses the old key, then delete it from the Deploy keys list.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.