Command Centre · Deployment Playbook

Cloudflare Pages — Setup Guide

Publish your Cowork dashboard to a Cloudflare-hosted URL, locked behind Google auth so only you can see it. Six phases, twenty minutes, free tier.

End state: command-centre.pages.dev Cost: $0 Time: ~20 min
TL;DR · the six phases
  1. Sign up for Cloudflare (free, ~2 min)
  2. Install the wrangler CLI
  3. Authenticate wrangler with your account (browser-based)
  4. Deploy the public bundle (./publish.sh deploy)
  5. Enable Zero Trust Access in the Cloudflare dashboard
  6. Test the deployed URL in an incognito window
Total time start to finish: ~20 minutes.

PREREQUISITES

  • macOS Terminal access
  • Node.js installed — verify with node --version. Install with brew install node if missing.
  • The public bundle is already built — lives at command centre/cowork-dashboard-public/ (184 files, 62 MB)
  • A Google account for the Access login (using b.kaisharis@gmail.com)
1
Phase 1

Sign up for Cloudflare

~2 min
  1. Open https://dash.cloudflare.com/sign-up
  2. Enter email + create a password (use a password manager)
  3. Verify your email — Cloudflare sends a link, click it
  4. You'll land on the Cloudflare dashboard with an empty account
  5. Skip the "Add a website" prompt — you don't need a domain for Pages
  6. Skip the upsell to Pro / Business — free tier covers everything here
Done when: you can see the Cloudflare dashboard at dash.cloudflare.com with your account name top-right.
2
Phase 2

Install the wrangler CLI

~1 min

wrangler is Cloudflare's deployment tool. One global npm install.

npm install -g wrangler

Verify:

wrangler --version

Should print something like wrangler 3.x.x or higher.

Common gotcha: if you see EACCES: permission denied, either prefix with sudo or set up an npm prefix in your home directory to avoid sudo. See npm's guide.
3
Phase 3

Authenticate wrangler

~1 min
wrangler login

This opens your default browser → Cloudflare OAuth page → click Allow → return to Terminal.

Verify:

wrangler whoami

Should print your Cloudflare email + account ID.

4
Phase 4

Deploy the bundle

~2 min

From the command centre folder:

cd ~/Documents/Claude/Projects/command\ centre
./publish.sh deploy

What this does:

  • Rebuilds the public bundle (transforms paths, strips sensitive AI Doctor links)
  • Uploads everything to Cloudflare Pages as a project called command-centre
  • First time only: prompts you to confirm project name + production branch — press Enter through the defaults

Wait for output like:

✨ Deployment complete! Take a peek over at
   https://<some-hash>.command-centre.pages.dev

Two URLs are now live:

  • Production URLhttps://command-centre.pages.dev (or similar)
  • Preview URL — the hash-prefixed one above (this deploy's specific snapshot)
⚠️ At this point the site is PUBLIC — anyone with the URL can see everything. Do not share the URL yet. Move straight to Phase 5 to lock it down.
5
Phase 5

Enable Cloudflare Access (Zero Trust)

~8 min

This is the auth layer. Anyone hitting your URL will see Cloudflare's login screen first — only your Google account can get past it.

5a · Open Zero Trust

  1. Cloudflare dashboard → left sidebar → Zero Trust
  2. First time: it asks you to create a Zero Trust account. Pick a team name (e.g., bambos) — this becomes part of your auth URL: bambos.cloudflareaccess.com. Choose the Free plan ($0, up to 50 users).
  3. Skip onboarding tour

5b · Add Google as an identity provider

  1. Zero Trust dashboard → Settings (left sidebar) → Authentication
  2. Under "Login methods" click Add new
  3. Choose Google
  4. Cloudflare needs Google OAuth credentials. Two options:
  5. Save. Google is now a valid login method.
Skip-if-impatient option: use Cloudflare's built-in One-time PIN method (email magic links) instead. Already enabled by default. You'd get a 6-digit code emailed each time you log in. Less smooth than Google but zero setup.

5c · Create an Access application

  1. Zero Trust dashboard → AccessApplicationsAdd an application
  2. Choose Self-hosted
  3. Application name: Command Centre
  4. Session duration: 1 month (or 1 week for more frequent re-auth)
  5. Application domain:
    • Subdomain: command-centre
    • Domain: pages.dev (from the dropdown)
    • Leave path empty
  6. Click Next

5d · Add a policy

  1. Policy name: Bambos only
  2. Action: Allow
  3. Session duration: inherit from application
  4. Configure rules → Include:
    • Selector: Emails
    • Value: b.kaisharis@gmail.com
  5. Click NextAdd application

5e · (Optional) Add identity providers to this app

If you set up Google in 5b, on the next screen choose to allow Google + One-time PIN. Otherwise just One-time PIN.

Done when: Application appears in the Access → Applications list with status "Active".
6
Phase 6

Test

~3 min
  1. Open an incognito / private window (so it doesn't use existing Cloudflare cookies)
  2. Visit https://command-centre.pages.dev
  3. You should see a Cloudflare login screen (not the dashboard directly)
  4. Sign in with b.kaisharis@gmail.com (Google) or request a one-time PIN
  5. After auth, dashboard loads
  6. Click through each of the 9 internal project cards — confirm each loads
  7. Click the Retirement Planner card — confirm it opens the Netlify URL in a new tab
If a card returns 404: the bundle missed a file. Re-run ./publish.sh and inspect cowork-dashboard-public/ for the missing path.

If you see the dashboard WITHOUT being prompted to log in: the Access policy isn't applied. Double-check Phase 5c step 5 (domain spelt exactly).

Maintenance — re-publishing updates

Whenever you edit dashboard.html or any of the linked project HTMLs:

cd ~/Documents/Claude/Projects/command\ centre
./publish.sh deploy

That's it. Re-builds the bundle and pushes a new deploy. Old deploys stay accessible at their preview URLs (useful for rollback).

If you want to inspect the bundle locally before deploying:

./publish.sh                       # build only
open cowork-dashboard-public/index.html
# happy? then:
./publish.sh deploy

Optional — Custom domain

If you'd rather use a domain you own (e.g., dashboard.bambos.com):

  1. Cloudflare dashboard → Workers & Pages → click command-centre
  2. Custom domains tab → Set up a custom domain
  3. Enter your domain → follow DNS instructions
  4. Then go back to Zero Trust → Access → Applications → edit Command Centre → change application domain to your custom domain

The Access policy automatically applies to the custom domain too.

Troubleshooting

wrangler pages deploy says "no project found"
First-time deploys ask to create the project. If you skipped that, run:
wrangler pages project create command-centre --production-branch=main
Then retry deploy.
Auth screen never appears (site is public)
Access only kicks in once the application is created AND the policy is attached. Confirm both in Zero Trust → Access → Applications.
npm install -g wrangler fails with EACCES
Either prefix with sudo, or set up an npm prefix in your home directory (cleaner long-term).
An internal link 404s after deploy
The source file may exist but publish.sh didn't copy it. Look at the script's per-project section, add any missing path. The transform sed only rewrites .././ — it doesn't invent files that aren't in the bundle.
The longevity page is missing a section
The strip script neutralised a sensitive link. That's expected. The original page in ~/Documents/Claude/Projects/ai doctor/longevity-command-center.html is untouched and still has full links.
I want to remove someone from access
Zero Trust → Access → Applications → Command Centre → Policies → edit "Bambos only" → adjust emails.
I want to revoke all sessions immediately
Zero Trust → My Team → Users → revoke session. Next page load forces re-auth.

Files in this folder

FilePurpose
dashboard.htmlSource-of-truth dashboard (file:// version, with ../ paths)
cowork-dashboard-public/Built bundle, regenerated by publish.sh — gitignore this
publish.shBuild script (./publish.sh to build, ./publish.sh deploy to ship)
strip_longevity_links.pyHelper: neutralises sensitive medical-PDF links in AI Doctor during build
CLOUDFLARE_SETUP.htmlThis guide

The source dashboard.html is the only file you edit. publish.sh regenerates everything else.