Docs Backend Deploying a Backend

Deploying a Backend

PocketBase Cloud lets you run backend using Deno runtime. Deploy APIs, webhook handlers or any server-side logic.

Prerequisites

  • An active managed plan subscription
  • A project created in the dashboard

Supported runtimes

RuntimeVersionUse case
DenoLatest stableTypeScript-first, secure by default

Step 1: Prepare your code

Your backend needs a start command that launches an HTTP server. Example for Deno:

// main.ts
Deno.serve({ port: Number(Deno.env.get("PORT")) }, (req) => {
  return new Response("Hello from PocketBase Cloud!");
});

Important: Your server must listen on the port provided via the PORT environment variable.

Step 2: Create a backend deployment

  1. Open your project and click the Backends tab
  2. Click New Backend
  3. Enter a name and select your runtime (Deno)
  4. Set the start command (e.g., deno run --allow-all main.ts)
  5. Click Create

Step 3: Upload and deploy

  1. Zip your project files (excluding node_modules)
  2. Go to the Deploy tab on your backend detail page
  3. Upload the zip file
  4. Click Deploy

Your backend will be provisioned and assigned a URL:

https://<backend-name>.pocketbasecloud.com

Environment variables

Configure secrets and configuration via the Env Vars tab. See Environment Variables for details.

Redeploying

To update your backend, upload a new zip file and click Deploy again. The platform handles the rest — zero-downtime redeployments.

Next steps