Docs Frontend Deploying a Frontend

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

  1. Open your project and click the Frontends tab
  2. Click New Frontend
  3. Enter a name for your site
  4. Click Create

Step 4: Upload and deploy

  1. Go to the Deploy tab on your frontend detail page
  2. Upload the zip file
  3. 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