Deploying a Frontend
PocketBase Cloud hosts static sites — the output of your frontend build step. Works with React, Vue, Svelte, Astro, Next.js (static export), or any framework that produces HTML/CSS/JS.
Prerequisites
- An active managed plan subscription
- A project created in the dashboard
- A frontend project that builds to static files
Step 1: Build your project
Run your framework’s build command to generate static output:
# React (Vite)
npm run build # outputs to dist/
# Astro
npm run build # outputs to dist/
# Next.js (static export)
next build # outputs to out/
Step 2: Zip the build output
Zip the contents of your build output directory:
cd dist # or out/
zip -r ../frontend.zip .
The zip should contain index.html at the root level.
Step 3: Create a frontend deployment
- Open your project and click the Frontends tab
- Click New Frontend
- Enter a name for your site
- Click Create
Step 4: Upload and deploy
- Go to the Deploy tab on your frontend detail page
- Upload the zip file
- Click Deploy
Your site will be live at:
https://<frontend-name>.pocketbasecloud.com
Redeploying
Upload a new zip file and deploy again. The new version replaces the old one instantly.
Next steps
- Set up a custom domain
- Deploy a PocketBase instance to serve as your backend