Cloudflare Setup
Cloud Relay runs on Cloudflare Workers. This guide walks through creating a free account and installing the wrangler CLI — the tool used to deploy and manage Workers.
Create a Cloudflare Account
Section titled “Create a Cloudflare Account”- Go to cloudflare.com/sign-up
- Enter your email and create a password
- Verify your email address
No credit card is required. The Workers free tier includes everything Cloud Relay needs.
Install Wrangler
Section titled “Install Wrangler”Wrangler is Cloudflare’s CLI for managing Workers. You can use it via npx (no global install) or install it globally:
# Option 1: Use via npx (recommended — no global install needed)npx wrangler --version
# Option 2: Global installnpm install -g wranglerwrangler --versionAuthenticate Wrangler
Section titled “Authenticate Wrangler”Wrangler needs access to your Cloudflare account to deploy Workers:
npx wrangler loginThis opens your browser for an OAuth flow. Grant the requested permissions and return to the terminal. Wrangler stores credentials locally in ~/.wrangler/.
Verify authentication:
npx wrangler whoamiYou should see your account name and ID displayed.
Permissions Granted
Section titled “Permissions Granted”The wrangler login OAuth flow grants these permissions:
- Workers Scripts — Deploy and manage Worker code
- Workers KV — Read/write KV namespaces (not used by Cloud Relay, but part of the default scope)
- Durable Objects — Create and manage Durable Objects (used by Cloud Relay for WebSocket state)
- Account Settings — Read account metadata
These permissions are scoped to the Wrangler CLI on your machine. You can revoke them at any time from the Cloudflare dashboard under My Profile > API Tokens.
Workers.dev Subdomain
Section titled “Workers.dev Subdomain”Every Cloudflare account gets a free *.workers.dev subdomain. Your deployed Workers are accessible at:
https://<worker-name>.<your-subdomain>.workers.devFor example, if your subdomain is alice and you name your Worker oak-relay, the URL would be:
https://oak-relay.alice.workers.devYou can find or change your subdomain in the Cloudflare dashboard under Workers & Pages > Overview.
Custom Domains (Optional)
Section titled “Custom Domains (Optional)”If you have a domain on Cloudflare, you can route a custom domain to your Worker instead of using the workers.dev subdomain. This is entirely optional — the workers.dev URL works for all Cloud Relay functionality.
Free Tier Limits
Section titled “Free Tier Limits”The Cloudflare Workers free tier provides generous limits for Cloud Relay:
| Resource | Free Limit | What It Means |
|---|---|---|
| Worker requests | 100,000/day | Each MCP tool call from a cloud agent is one request. Typical usage is 500-2,000/day. |
| Worker CPU time | 10ms/request | Cloud Relay uses ~2-5ms per request (routing only, no heavy computation). |
| Durable Object requests | 100,000/day | Each WebSocket message and HTTP relay is one DO request. Matches Worker request count. |
| Durable Object storage | 1 GB | Cloud Relay stores < 1 KB (connection state only). |
| WebSocket messages | Unlimited | All relay communication between daemon and Worker. |
| Egress bandwidth | Free | All outbound data transfer from Workers is free. |
For a typical developer workflow, free tier usage stays well under 5% of the daily limits.
Verify Setup
Section titled “Verify Setup”You can verify your setup from the terminal or the dashboard.
Terminal:
# Check Node.js version (v18+ required)node --version
# Check wrangler is availablenpx wrangler --version
# Check authenticationnpx wrangler whoamiAll three commands should succeed without errors.
Dashboard:
Open the Oak CI dashboard and navigate to the Cloud page. The Prerequisites card at the bottom shows live checks for npm, wrangler, and authentication status — including your Cloudflare account name when authenticated.
Next Steps
Section titled “Next Steps”With your Cloudflare account and wrangler ready, proceed to Getting Started to deploy your first Cloud Relay.