-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Complete production deployment guide for DO Manager on Cloudflare Workers.
- Node.js 20+
- Cloudflare account
- Cloudflare Workers subscription (free tier works)
npx wrangler loginCreate the metadata database that stores namespace configs, instance tracking, and job history:
npx wrangler d1 create do-manager-metadataNote the database_id from the output — you'll need it for wrangler.toml.
Initialize the schema:
npx wrangler d1 execute do-manager-metadata --remote --file=worker/schema.sqlFor backup/restore functionality:
npx wrangler r2 bucket create do-manager-backupsCopy the example configuration:
cp wrangler.toml.example wrangler.tomlEdit wrangler.toml and update the database_id from Step 2:
[[d1_databases]]
binding = "DB"
database_name = "do-manager-metadata"
database_id = "your-database-id-here"
[[r2_buckets]]
binding = "BACKUPS"
bucket_name = "do-manager-backups"DO Manager uses Cloudflare Access (Zero Trust) for enterprise authentication.
- Go to Cloudflare Zero Trust Dashboard
- Navigate to Settings → Authentication
- Add your preferred identity provider (GitHub OAuth, Google, etc.)
- Go to Access → Applications
- Click Add an application → Self-hosted
- Configure:
- Application name: DO Manager
- Session duration: 24 hours (recommended)
- Application domain: your-do-manager.workers.dev (or custom domain)
- Add an Access policy (e.g., allow specific emails or groups)
- Save and copy the Application Audience (AUD) tag
Your team domain is shown in Zero Trust settings:
- Format:
https://yourteam.cloudflareaccess.com
- Go to Cloudflare API Tokens
- Click Create Token → Custom Token
- Add permissions:
- Account → Workers Scripts → Read
- Account → D1 → Edit (if managing D1-backed DOs)
- Create and copy the token
Note: Both API Tokens (Bearer auth) and Global API Keys (X-Auth-Key auth) are supported.
Store sensitive values as Worker secrets:
npx wrangler secret put ACCOUNT_ID
# Enter your Cloudflare account ID
npx wrangler secret put API_KEY
# Enter your API token from Step 6
npx wrangler secret put TEAM_DOMAIN
# Enter: https://yourteam.cloudflareaccess.com
npx wrangler secret put POLICY_AUD
# Enter the AUD tag from Step 5.2Your account ID is in your Cloudflare dashboard URL:
https://dash.cloudflare.com/ACCOUNT_ID/...
Build and deploy:
npm run build
npx wrangler deployYour app is now live at the Workers URL shown in the output.
To use a custom domain:
- Go to your Worker in the Cloudflare dashboard
- Click Settings → Triggers
- Add a Custom Domain
- Update your Access application domain to match
- Navigate to your deployed URL
- Authenticate via Cloudflare Access
- Click Discover Namespaces to auto-detect your Durable Objects
- If no namespaces appear, you may need to deploy Workers with Durable Objects first
- Admin Hooks — Enable storage management for your DOs
- Features — Learn about all available features
- Troubleshooting — Common issues and solutions