Prerequisites
Check these before you install a platform.
On this pagePrepare your Cloudflare account and domain · Install the CLI · Create the platform database
To run an SDK platform, you need:
- A Cloudflare account with Workers for Platforms, R2, and Analytics Engine enabled.
- An empty hosted PostgreSQL database.
- An account with your chosen login provider: GitHub, Google, OIDC, or Cloudflare Access.
- A domain for your apps, or
workers.devfor testing. You can add a domain later.
The SDK creates the Workers, storage, queues, routing, and database tables through the CLI.
Workers for Platforms requires a paid plan. Your database and Cloudflare usage are billed separately.
Prepare your Cloudflare account and domain
These steps prepare the account. In the Cloudflare dashboard, select the account for the platform:
- Open Workers & Pages once to let Cloudflare provision Workers for the account.
- Open Workers for Platforms and enable its plan. Review Workers for Platforms pricing before confirming.
- Open R2 Object Storage and complete its activation. The SDK creates the bucket later.
- For a domain installation, choose a domain you own, such as
example.app. If you need one, register it with your preferred registrar. Use a spare domain's root: apps will be served atmy-app.example.app. For workers.dev testing, skip this step and the DNS setup below.
If that domain is already in this Cloudflare account, use its existing zone. Otherwise, add the domain to Cloudflare and follow the nameserver instructions until the zone is active. A zone is Cloudflare's DNS configuration for a domain; creating one does not buy the domain.
The platform can also create the zone during installation. Setting it up now lets you scope API tokens to the zone and avoid a DNS pause. The platform API uses workers.dev by default, so it needs no additional domain.
If Cloudflare rejects Analytics Engine
The platform stores request metrics and logs in Analytics Engine. If installation stops with "You need to enable Analytics Engine" (code 10089), add an Analytics Engine binding to a Worker that is not part of the platform under Settings > Bindings, and deploy it once from the dashboard. A new Hello World Worker works. Do not edit the platform's own Workers. Then run the printed void platform install --resume command.
Install the CLI and preview
Requires: login or token
Later steps sign in to Cloudflare, PlanetScale or Neon. Keep connection strings in a password manager.
This step installs the CLI and previews the installation. It needs Node.js 24.21.0 or later.
pnpm add --global void
void platform install --planExample output: The CLI installed, then a preview of the installation.
Sign in to Cloudflare when prompted, then choose an installation name and account. --plan previews resources without changing them or asking for runtime secrets. Completed plans save your choices locally. Run void platform install again to select a saved plan; the platform checks the current Cloudflare state before asking you to apply it.
For a domain installation, use these answers. Testing mode skips the domain, zone and catch-all questions:
| Prompt | Answer |
|---|---|
| Installation name | A short name, such as team |
| Application base domain | Your domain, such as example.app |
| Cloudflare zone | The same domain |
| Platform display name | Any name your team will recognize |
| Optional custom API hostname | Leave empty to use workers.dev |
| Dedicate all unmatched traffic to the platform? | Yes only if this whole zone belongs to the platform |
Choose an unused installation name in your account. For example, team creates resources such as void-team-api and void-team-proxy.
The preview lists the credentials you need. Review Credentials, then run the install command it prints. The guided installation provides setup links and the login callback when needed.
This step selects either path directly.
void platform install --application-domain example.app --plan
void platform install --workers-dev --planExample output: A preview for a custom domain, then for workers.dev.
--workers-dev cannot be combined with --application-domain, --zone, or --dedicated-zone.
Create the Platform Database
Use an empty PostgreSQL database just for this platform. It stores users, projects and deployments. Apps can still use D1. The SDK creates the tables and the Hyperdrive connection. It does not provision the PostgreSQL server.
Any PostgreSQL provider works if it accepts connections from your computer and Cloudflare. Follow these steps:
- Create a fresh database or project dedicated to the platform, with no existing application tables. Use a database role that can create and manage its tables and schemas.
- Open the provider's connection details and select the primary database. Use a direct connection or a session-mode pooler, not transaction pooling. The connection must work from both your computer and Cloudflare.
- Copy the PostgreSQL connection URL, including the password and SSL settings, into your password manager. Paste only the URL—not a surrounding
psqlcommand—into the installer'sPostgreSQL DATABASE_URLprompt, as the provider gives it, including SSL settings such assslmode=verify-full. A Hyperdrive that the platform creates trusts only public certificate authorities, so if your database uses a private certificate authority, use a separately managed Hyperdrive, as described below.
| Provider | Connection setup |
|---|---|
| PlanetScale Postgres | Choose Postgres, not Vitess/MySQL. Open Connect, create role credentials, and use the direct primary connection on port 5432, not PgBouncer on 6432. |
| Neon | Open Connect, select the database and owner role, and turn connection pooling off. |
Once installation claims the database, continue using that same database for resume and maintenance commands. If installation stops because it cannot use the database, for example because the database is not empty, set VOID_PLATFORM_DATABASE_URL to another database's URL before you resume. Uninstall never deletes external PostgreSQL.
Use a provider CLI
You can also create the database and get its URL from a provider CLI.
PlanetScale Postgres
Install the latest PlanetScale CLI. On macOS, use brew install pscale; the installation guide also covers Linux and Windows.
This step signs in and lists your organizations and regions.
pscale auth login
pscale org listExample output: A browser sign-in, then your organizations.
pscale region list --org <organization>Example output: The available regions.
This step lists cluster sizes and prices for a region. Replace <organization> with your organization slug from step 1.
pscale size cluster list --org <organization> --engine postgresql --region <region>Example output: The available cluster sizes.
This step creates the database with the cluster size you chose, then a role that can create and migrate the tables.
pscale database create void-platform \
--org <organization> \
--engine postgresql \
--region <region> \
--cluster-size <cluster-size> \
--wait
pscale role create void-platform main void_owner \
--org <organization> \
--inherited-roles postgresExample output: The database created, then the role created.
Save the DATABASE URL printed by the role-creation command in your password manager and paste it into the installer's PostgreSQL DATABASE_URL prompt. Use the direct primary connection on port 5432 with sslmode=verify-full. The role's password is shown when it is created, so save it before closing the terminal.
See PlanetScale's database commands and role commands for more options.
Neon
This step installs the latest Neon CLI and signs in.
pnpm add --global neon@latest
neon loginExample output: The CLI installed, then a browser sign-in.
This step creates a project, database and owner role. Replace <region-id> with one of Neon's supported regions, such as aws-us-east-2:
neon projects create --name void-platform \
--database void_platform \
--role void_owner \
--region-id <region-id>Example output: The new Neon project details.
This step gets a direct connection URL with TLS verification. Use the project ID from the previous step.
neon connection-string --project-id <project-id> \
--database-name void_platform \
--role-name void_owner \
--endpoint-type read_write \
--ssl verify-fullExample output: The connection string. Store it in your password manager.
Save the printed URL in your password manager and paste it into the installer's PostgreSQL DATABASE_URL prompt. Keep this connection unpooled. See Neon's connection-string command for more options.
Use an existing Hyperdrive
The installer can create Hyperdrive or use one you manage. For an existing one:
- Point it at the dedicated platform database using a runtime user, and disable SQL result caching.
- Select it in the installer and review the database, host, port, and runtime user.
- Supply a database owner connection at the PostgreSQL URL prompt so the platform can apply migrations.
To create one first, choose Set up a separately managed Hyperdrive and follow the printed instructions or Cloudflare’s setup guide. Rerun the installer once it is ready. The SDK leaves its configuration under your control. For unattended setup, use the Hyperdrive variables in Install from CI.