Deploy to Vercel
Warning
The Vercel adapter is experimental. It needs a hosted libSQL database, such as Turso, because functions can't keep a local SQLite file.
1. Create a project
npm create pagescms@latest -- my-cms --target vercel
cd my-cms
npm install2. Migrate the database
export DATABASE_URL="libsql://your-database.example"
export DATABASE_AUTH_TOKEN="your-database-token"
npm run migrate3. Register a GitHub App
npm run setup:github-app -- --base-url cms.example.com --output terminal4. Deploy
- Push the project to a Git repository and import it into Vercel.
- In the project settings, add
BETTER_AUTH_URL,BETTER_AUTH_SECRET(fromopenssl rand -base64 32), the database values,CRYPTO_KEYand the GitHub App credentials. SetADMIN_EMAILSto your verified sign-in email for instance-wide Admin access; without it, no one is an instance administrator. See Environment variables. - Deploy, open the URL and sign in with GitHub.
Notes
- Uploads. Files are sent as base64, and Vercel rejects requests above about 4.5 MB, so uploads top out around 3 MB. See function limits.
- Plugin endpoints.
/api/*and/.well-known/*go to the function. For other plugin paths, add a rewrite to/apiinvercel.jsonbefore the SPA fallback. - Previews. Use a separate database and separate credentials.