Documentation/Deploy & connect
DEPLOY & CONNECT

Your code. Your infrastructure.

One deployment helper, four hosting choices. Prepare your configuration, connect your services, and deploy your own workspace.

12 min read

1. Choose your host

Run pnpm run deploy in your copy of the kit and choose Cloudflare, Vercel, Netlify, or a VPS. The helper prepares configuration and prints the remaining steps. Add --dry-run to inspect the plan without writing files. Deployment only runs when you add --execute.

Vercel, Netlify and VPS deployments include a Node.js runtime with a libSQL database adapter and private S3-compatible media storage. Cloudflare remains available with OpenNext, D1, R2 and its scheduled Worker. You do not need a Cloudflare account for the Node hosts.

Terminal
pnpm install
pnpm run deploy
# Or choose directly:
pnpm run deploy --target vercel --dry-run

The helper does not create hosting accounts, purchase services or move an existing workspace. You still provide a database, storage and credentials. Review the generated plan and your copy of the kit's README before deployment.

2. Connect your database and media storage

For Vercel, Netlify or a VPS, create a remote libSQL database, such as Turso, and a private S3-compatible bucket. Fill DATABASE_URL, DATABASE_AUTH_TOKEN, S3_BUCKET, S3_REGION, S3_ACCESS_KEY_ID and S3_SECRET_ACCESS_KEY in the generated .env.production.local. Add S3_ENDPOINT and S3_FORCE_PATH_STYLE when your storage provider requires them.

The helper creates missing local configuration without replacing existing values. You can choose another private file with --env-file. Set XPL_RUNTIME=node on Node hosts. Never commit an environment file or use a production database for a preview deployment.

Terminal
pnpm run deploy --target vercel
# Edit .env.production.local, then inspect migrations:
pnpm db:migrate:node --status

3. Set the origin and private secrets

  1. Set APP_BASE_URL to your final HTTPS origin without a trailing slash, and APP_TIMEZONE to a valid IANA timezone such as Europe/London.
  2. The Node helper generates missing SESSION_PEPPER, MCP_TOKEN_PEPPER, SETUP_TOKEN, CRON_SECRET and X_CREDENTIAL_KEY values. Keep them and a secure copy outside the repository. For manual configuration, generate a different random value for each secret.
  3. For Vercel or Netlify, add the private values to your production project's environment settings. Configure both build and server runtime where required. For a VPS, Docker Compose reads the private environment file.
  4. Leave optional Telegram values empty for manual use. Keep the generated base64-encoded 32-byte X_CREDENTIAL_KEY; the key alone does not connect X or enable publication.
Run once per secret
node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))"

On a new Vercel or Netlify production project, --execute --upload-env can upload configuration from the private file. It refuses to overwrite existing app values; later updates should keep using the project's saved environment. Netlify upload needs NETLIFY_AUTH_TOKEN or a token entered at the hidden prompt. Keep production credentials out of preview contexts.

4. Check and deploy a Node host

Review your selected project, database and migration SQL first. --execute applies pending Node database migrations and runs the provider deployment. The provider CLI may ask you to sign in or choose a project. For Netlify, create a site in its dashboard first; the helper links an existing site. Default preparation and --dry-run do not deploy or migrate your database.

For a VPS, run the command on your server with Docker and Compose installed. The included Compose setup builds the app, applies migrations and starts an authenticated scheduler. Add an HTTPS reverse proxy in front of the local application port and set APP_BASE_URL to its public origin.

Open /setup, create the owner login, and save recovery codes. Verify a draft, media upload, MCP connection and a scheduled action before relying on the installation.

Terminal
pnpm test
pnpm typecheck
pnpm build:node
# Choose one target:
pnpm run deploy --target vercel --execute
# pnpm run deploy --target netlify --execute
# pnpm run deploy --target vps --execute

5. Enable scheduled work

For Vercel and Netlify, configure an external scheduler to call /api/cron/reminders every minute with the Authorization header Bearer followed by your CRON_SECRET. Use the production HTTPS origin, keep the secret private, and inspect failed calls. The VPS Compose setup includes this scheduler; Cloudflare has its native trigger.

Vercel Hobby's native cron runs at most daily, so it cannot drive minute-level reminders. Serverless execution limits also apply to calls made by an external scheduler. Monitor job duration and use a VPS if your workload needs longer execution.

Cron handles due work and approved publication. It never starts an AI model; any scheduled Codex or Claude work belongs in your external client.

Prefer Cloudflare? Keep D1 and R2

  1. Run pnpm run deploy --target cloudflare. Sign in with Wrangler, create your own D1 database and private R2 bucket, and replace all resource names and identifiers in wrangler.jsonc. Keep the DB and MEDIA binding names.
  2. Set APP_BASE_URL and APP_TIMEZONE, then store SESSION_PEPPER, MCP_TOKEN_PEPPER, SETUP_TOKEN and CRON_SECRET with pnpm exec wrangler secret put followed by each name.
  3. Review pending migrations with pnpm exec wrangler d1 migrations list DB --remote. Check the Worker with pnpm run build:cloudflare and pnpm exec wrangler deploy --dry-run. If Windows blocks OpenNext's symlinks, build in Linux/WSL.
  4. After verifying that every identifier belongs to your account, run pnpm run deploy --target cloudflare --execute --confirm-cloudflare-config. This applies D1 migrations and deploys the Worker. Complete owner setup and verify its schedule.

The source may contain an existing installation's identifiers. The confirmation flag asserts that you reviewed and replaced them; it does not discover or create your resources.

Moving an existing workspace

Changing the hosting target prepares a new installation. For supported workspaces, download a content backup from Account & data and restore it into an initialized empty destination. Credentials and connections are excluded; the destination keeps its own owner login.

Verify restored content, reconnect integrations, and deliberately resume the routines and automation you want. Disable the old scheduler before resuming delivery on the new installation. Keep separate database, media and secret backups; the content package has size and record limits.

Aim for free or low-cost hosting

Start by checking Cloudflare: the kit already includes its database, media, and scheduler integration. Workers Free allows 100,000 requests a day with a 10 ms CPU limit per invocation. D1 and R2 Standard have separate free allowances. Test the actual app workload against all limits before relying on $0 hosting.

If the free CPU or usage limits do not fit, Workers Paid starts at $5 USD per month, with additional usage charges where applicable. Database and media storage have their own pricing. This is a low-cost starting point to evaluate, not an all-inclusive hosting quote.

Netlify Free is another candidate, with 300 credits per month; projects pause when those credits run out. The kit still needs a separate libSQL database, private S3-compatible storage, and an external scheduler. Check each service's allowance and include scheduled requests in your usage estimate.

Use Vercel Hobby only for eligible personal, non-commercial use. Choose a suitable commercial plan if your workspace supports a business. Deployment help aims to find a free or inexpensive fit. Current kit and deployment prices are listed in the website pricing section; provider charges remain separate.

Provider details checked 22 September 2026. Free operation has not been verified for every app workload. Plans and allowances can change; domains, AI usage, optional X API access, and usage beyond included allowances remain separate.

Understand the running costs

Hosting, databases, storage, schedulers, domains, AI plans and optional X API access are separate from the kit. Free allowances depend on your provider and usage. R2 requires activation if you choose Cloudflare.

The app accepts images up to 10 MB and videos up to 50 MB, but your host can reject smaller requests before they reach the app. Vercel and Netlify function payload limits can also prevent large content backup imports. Use smaller files or a VPS with suitable proxy limits; the kit does not include direct-to-storage upload bypasses.

Your workspace should feel like yours. Start small, then make it fit.