prdddDocsOpen viewer ↗

Self-host a team workspace

The hosted app runs in your Cloudflare account. Its Worker serves the site, D1 stores workspace records, and each PRD has a Durable Object with its own SQLite history. Large revision bodies live in R2. Use a domain in that Cloudflare account and configure the sender sign-in@mail.<your-domain> for sign-in links and invitations.

Install the repository's locked dependencies with pnpm install --frozen-lockfile. Authenticate Alchemy to the intended Cloudflare account. Export PRDDD_STAGE in the shell that runs both commands. The package scripts use it to select the Alchemy stage and default to prod. Set the remaining values in that environment or in apps/hosted/.env. Exported values take precedence. Keep secrets out of version control.

SettingWhat to supply
PRDDD_DOMAINYour site domain. Configure the sender on a subdomain.
PRDDD_STAGEThe stage prefix for this deployment's resources. Keep it stable across upgrades.
PRDDD_AUTHA comma-separated list of sign-in methods, such as email or github,email.
PRDDD_BILLINGUse off for a self-hosted team. Every workspace then has self-hosted entitlements.
PRDDD_SOCIAL_IMAGEA required, publicly accessible HTTPS image URL without credentials.
PRDDD_SUPPORTThe email address or absolute HTTPS URL where your users can reach the operator.
OPERATOR_TOKENA deployment secret used to authorize backup and restore. Keep it in the operator's secret store.

OPERATOR_TOKEN unlocks a full export of every workspace, so the deploy refuses one shorter than 32 characters. Generate it with openssl rand -base64 32.

If you enable GitHub or Google, supply the matching OAuth credentials through Alchemy: GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET, or GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. Email-only sign-in with billing off needs neither OAuth nor Stripe credentials.

From the repository root, inspect the Alchemy plan. The deploy command builds the hosted viewer and applies that plan using the configured stage. Confirm that the account, domain and stage identify the intended deployment before applying it.

pnpm --filter @prddd/hosted run plan
pnpm --filter @prddd/hosted run deploy

Open /docs/support/ on the configured domain to verify that users can reach your support contact. Sign in at the site root. On a fresh deployment, your personal workspace starts empty.

Before upgrading, take a backup. Keep the source revision with your backup so you can restore to the same database schema. Build the new revision and deploy to the same stage. Deploy applies outstanding D1 migrations. Each room applies its outstanding migrations when it next opens.