Deploy to Netlify
Warning
The Netlify 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 netlify
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 Netlify.
- In the site 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, so uploads top out around 4 MB. See function limits.
- Plugin endpoints.
/api/*and/.well-known/*go to the function. For other plugin paths, add them toconfig.pathinnetlify/functions/api.mjs. - Previews. Use a separate database and separate credentials.