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
| Runtime | Version | Use case |
|---|---|---|
| Deno | Latest stable | TypeScript-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
- Open your project and click the Backends tab
- Click New Backend
- Enter a name and select your runtime (Deno)
- Set the start command (e.g.,
deno run --allow-all main.ts) - Click Create
Step 3: Upload and deploy
- Zip your project files (excluding
node_modules) - Go to the Deploy tab on your backend detail page
- Upload the zip file
- 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
- Manage environment variables
- Deploy a frontend to pair with your backend