What gets created
Resource IDs aren’t in
wrangler.jsonc on purpose: the button and wrangler deploy provision them. See How it works for what each one does.
With the Deploy button
2
Fill in the form
The form shows:
- A repository name for your copy of Jun in your GitHub account.
- A name for each resource: the Worker, the D1 database, the R2 bucket and the queue. Keep the defaults for your first desk.
SETUP_TOKEN: any passphrase of 16 or more characters. You enter it once to create the owner account, and again only to recover access.
3
Deploy
Cloudflare copies the repo into your GitHub account, creates the resources and builds the Worker with Workers Builds. The deploy step is
npm run deploy, which applies D1 migrations and deploys.4
Open the Worker's URL
Open
https://<worker-name>.<your-subdomain>.workers.dev and continue with First sign-in.A second desk in the same account
If this Cloudflare account already has Jun installed, give the new one its own names on the form, for examplejun-trial, jun-trial-files and jun-trial-crawl.
”Could not push contents of source repo to destination repo”
If the build stops with this message, Cloudflare created your repo with onlyREADME.md and wrangler.jsonc and couldn’t copy the rest. GitHub refused the copy: its push protection blocks a push that contains something shaped like a key. Jun’s own files no longer carry any, so this should only happen with a fork that adds one. workers-sdk#14553 reports the same message.
To get past it, either:
- use the command line route below, or
- push the code into the repo the button created, keeping that repo’s
wrangler.jsonc.git pushprints the file GitHub objects to.
From the command line
You need Node 22.18 or later and a Cloudflare account.1
Clone and install
2
Sign in to Cloudflare
3
Pick names (optional)
For a second desk in the same account, change the names in Keep the binding names (
wrangler.jsonc: the Worker name, database_name, bucket_name, and the queue in both producers and consumers.wrangler.jsonc
DB, FILES, CRAWL_QUEUE, AI) and the Durable Object classes as they are.4
Set the setup token
5
Deploy
npm run deploy runs scripts/deploy.ts, which:- builds the dashboard, the widget frame and the Worker with Vite,
- on a first deploy (no D1 database with that name yet), deploys first so the database gets provisioned, then applies the migrations,
- on later deploys, applies new D1 migrations first, then deploys, so new code never runs against an old schema.
Optional secrets
Nothing else is required. Add these when you need them, withnpx wrangler secret put <NAME> or in the Cloudflare dashboard under the Worker’s Settings → Variables and Secrets:
The full list is in Secrets.
First sign-in
Create the owner account with your setup token.
Custom domain
Serve the desk from your own hostname.