📄 cf-api-token-guide.md 1,891 bytes Apr 21, 2026 📋 Raw

Cloudflare API Token Setup for Headless Deploy

For: notes.hoffdesk.com on headless titanium-butler
Method: API Token (no browser required)


Step 1: Create Token in Cloudflare Dashboard

  1. Go to: https://dash.cloudflare.com/profile/api-tokens
  2. Click "Create Token"
  3. Click "Custom token"

Step 2: Configure These Exact Settings

Field Value
Token name hoffdesk-blog-deploy
Permissions
Zone Zone:Read
Zone Zone:Edit
Account Cloudflare Pages:Edit
Account Account:Read
Zone Resources Include - Specific zone - hoffdesk.com
Account Resources Include - Account - <your account>
TTL No expiration (or set a date)

Step 3: Get Account ID and Zone ID

While in Cloudflare Dashboard:
1. Go to: https://dash.cloudflare.com
2. Click on hoffdesk.com
3. On the right sidebar, find:
- Account ID: (looks like 1a2b3c4d5e6f...)
- Zone ID: (looks like 7g8h9i0j1k2l...)
4. Copy both


Step 4: Give Me the Credentials

Once you have the token, export it:

export CLOUDFLARE_API_TOKEN=your_token_here

Then I can run:

# Verify token works
wrangler whoami

# Create Pages project
wrangler pages project create notes-hoffdesk

# Deploy
wrangler pages deploy ~/hoffdesk-api/dist/blog --project-name=notes-hoffdesk --branch=main

Alternative: Manual Pages Setup

If API tokens get complicated, you can also:

  1. Go to: https://dash.cloudflare.com
  2. Click "Pages" in sidebar
  3. Click "Create a project"
  4. Project name: notes-hoffdesk
  5. Upload manually (drag-drop your ~/hoffdesk-api/dist/blog folder)

Then add CNAME:
- Name: notes
- Target: notes-hoffdesk.pages.dev

This bypasses all CLI complexity.


Which route do you prefer?