# Deploy your workspace

> Run the deployment helper and choose Cloudflare, Vercel, Netlify or your own VPS.

Canonical: https://ownpost.fyi/docs/guides/deploy

## Before you begin

The source repository, Node.js 22.18 or later, pnpm 11, and your chosen hosting account. Node hosts also need a libSQL database and private S3-compatible storage. This is an administrator task.

## Steps

1. Open the source folder in a terminal, run pnpm install, then pnpm run deploy. Choose a host. The helper prepares configuration and instructions; --dry-run previews without writing, and --execute explicitly starts deployment.

2. For Cloudflare, create your own D1 database and R2 bucket and update wrangler.jsonc. For Vercel, Netlify or a VPS, fill in the private .env.production.local file with your libSQL database and S3-compatible storage settings, then configure those values on the host.

3. Generate separate values for SESSION_PEPPER, MCP_TOKEN_PEPPER, SETUP_TOKEN and CRON_SECRET. Set APP_BASE_URL to the final HTTPS origin and APP_TIMEZONE to your IANA timezone. Keep secrets out of Git.

4. Review and apply the checked-in migrations to the intended database: pnpm db:migrate:node for Node hosts, or pnpm run db:migrate:remote for Cloudflare. Existing Cloudflare data is not automatically copied to another host.

5. Run pnpm test and pnpm run typecheck, then follow the generated instructions to build and deploy your target. The full operator guide is docs/deployment.md in the source repository.

6. Open /setup, create the owner login and keep recovery codes outside the app. Verify a draft, media upload and MCP connection. Configure an authenticated call to /api/cron/reminders every minute on Node hosts; Cloudflare has its scheduled Worker. Cron does not run an AI model.

## A practical example

Preview the hosting helper before preparing configuration. Replace the target with the provider you actually intend to use, and review its generated instructions before executing a deployment.

```
pnpm run deploy --target vercel --dry-run
```

## Check the result

Your HTTPS workspace opens setup/sign-in and can save a draft and image.

## Troubleshooting

Check database credentials or bindings and pending migrations, then storage credentials or the MEDIA binding. APP_BASE_URL must match the HTTPS origin. Serverless upload limits can be lower than the app's limits, and Vercel Hobby needs an external scheduler for minute-level jobs. See docs/deployment.md.

## Keep going

[Protect your new workspace](https://ownpost.fyi/docs/guides/owner-setup)

[Connect Telegram reminders](https://ownpost.fyi/docs/guides/telegram)

[Connect your X account](https://ownpost.fyi/docs/guides/connect-x)

[Export data or make a content backup](https://ownpost.fyi/docs/guides/backup)

[Next.js hosting options](https://nextjs.org/docs/app/getting-started/deploying)

## Related

- [Previous: X API usage & costs](https://ownpost.fyi/docs/guides/x-api-costs)
- [Next: Connect X](https://ownpost.fyi/docs/guides/connect-x)
