Deploy in 5 minutes
The shortest path from a local project to a live Worker.
This page lists the commands that put a new project on Cloudflare. Deploy and operate explains each step.
You need the Workers Paid plan and wrangler login.
Steps
-
Create the resources, if the scaffolder did not (
--create-resources). Put the database ID intowrangler.jsonc.pnpm exec wrangler d1 create my-site pnpm exec wrangler r2 bucket create my-site -
Apply the migrations to the production database:
pnpm db:migrate --remote -
Set the secret that signs sessions:
pnpm exec wrangler secret put BETTER_AUTH_SECRET -
Build and deploy (the
deployscript builds first):pnpm run deploy -
Open
/adminon theworkers.devURL and create your admin account.
Create your admin account right after the first deploy. Until a user exists, /admin/create-first-user is open to anyone.
Next
- Custom domains, which the edge cache needs.
- Upgrading.