Deploy Cloudflare Workers Without an Account Using wrangler --temporary
Deploy a Worker live, no account, via wrangler --temporary.
Written by Neura Market from the official Hermes Agent documentation for Cloudflare Temporary Deploy. Commands, paths, and version numbers are reproduced from the source unchanged.
Read the official documentationThis skill lets you deploy a Cloudflare Worker to a live workers.dev URL without creating an account, logging in, or handling OAuth tokens. It uses wrangler deploy --temporary, which provisions a throwaway Cloudflare account, deploys your code, and prints a claim URL valid for 60 minutes. Unclaimed accounts auto-delete. This is useful for agents that need a tight write-deploy-verify loop without any signup friction.
What it does
When you run wrangler deploy --temporary, Cloudflare creates a temporary account on your behalf, deploys your Worker to a workers.dev subdomain, and gives you a live URL and a claim URL. The claim URL lets a human take ownership of the account within 60 minutes. If nobody claims it, everything disappears. This means you can ship agent-written code to a live endpoint in seconds, iterate by redeploying, and hand off the result without ever touching a browser.
Before you start
- Wrangler 4.102.0 or later. This is the version that introduced
--temporary. Verify withnpx wrangler@latest --version. Earlier versions do not have the flag. - Node 18+ / npm (or
npx,yarn,pnpm). No global install needed;npx wrangler@latestworks. - No Cloudflare credentials present. The
--temporaryflag only works when Wrangler is unauthenticated. That means no OAuth login, noCLOUDFLARE_API_TOKENorCLOUDFLARE_API_KEYenvironment variable, and no cached OAuth in~/.wrangleror~/.config/.wrangler. Use the terminal tool's environment as-is; do not set those variables. - Network egress to
cloudflare.comandworkers.dev. - Accepting Cloudflare's Terms of Service and Privacy Policy by using
--temporary.
How to run
Use the terminal tool for every step. Always pin the version (wrangler@latest or wrangler@4.102.0 or newer) so you don't accidentally run an old global wrangler that lacks the flag.
1. Scaffold a minimal Worker
Skip this if the project already exists. A Worker needs a wrangler.toml (or wrangler.jsonc) and an entry script. Minimal TypeScript example: write these with write_file.
wrangler.jsonc:
{
"name": "hello-agent",
"main": "src/index.ts",
"compatibility_date": "2025-01-01"
}
src/index.ts:
export default {
async fetch(): Promise<Response> {
return new Response("hello cloudflare");
},
};
2. Deploy with --temporary
From the project directory, run:
npx wrangler@latest deploy --temporary
The proof-of-work check adds a short automatic delay. On success, Wrangler prints an Account: (created) (or (reused)) line, a Claim URL, and the live https://..workers.dev URL.
3. Parse the URLs
Instead of eyeballing the output, run the helper to extract them reliably:
npx wrangler@latest deploy --temporary 2>&1 | python3 scripts/parse_deploy_output.py
(Resolve scripts/parse_deploy_output.py to this skill's absolute path.) It prints JSON: {"live_url", "claim_url", "account", "account_state", "expires_minutes", "deployed"}.
4. Verify the deploy is live
Do not trust the deploy log alone. curl the live URL and confirm the body matches what the code returns:
curl -sS <live_url>
5. Iterate
Edit the code, then redeploy with the same npx wrangler@latest deploy --temporary. Within the 60-minute window, Wrangler reuses the cached temporary account (Account: (reused)), so the URL stays stable. curl again to confirm the change.
6. Hand the claim URL to the user
Tell them: open it within 60 minutes to keep the deployment and any resources; if they don't claim it, everything auto-deletes. Treat the claim URL as a secret: it grants ownership of the account.
Quick Reference
| Step | Command |
|---|---|
| Check version (need 4.102.0+) | npx wrangler@latest --version |
| Deploy (no account) | npx wrangler@latest deploy --temporary |
| Deploy + parse URLs | `npx wrangler@latest deploy --temporary 2>&1 |
| Verify live | curl -sS |
| Clear cached temp account | npx wrangler@latest logout |
Temporary account product limits
| Product | Limit on a temporary account |
|---|---|
| Workers | Deploys to workers.dev |
| Static Assets | Up to 1,000 files, 5 MiB each |
| KV | Allowed |
| D1 | 1 database, 100 MB per DB / 100 MB total |
| Durable Objects | Allowed |
| Hyperdrive | 2 configs, 10 connections |
| Queues | Up to 10 |
| SSL/TLS certs | Allowed |
When not to use it
- Production or CI/CD, use a permanent account (
wrangler loginorCLOUDFLARE_API_TOKEN).--temporaryerrors out if any credential is present. - Wrangler is already authenticated,
--temporaryreturns an error by design. Runwrangler logoutfirst only if the user explicitly wants a throwaway deploy. - Long-lived hosting, temporary deployments are deleted after 60 minutes unless claimed.
Limits and gotchas
--temporaryis not inwrangler deploy --helpand is not a global flag. It is intentionally hidden and surfaced dynamically: when an unauthenticatedwrangler deployfails, Wrangler prints "rerun with--temporary". Don't conclude the flag is missing just because--helpomits it: check the version instead.- Old global wrangler. A stale globally-installed
wrangler(=4.102.0) so you control the version. - Auth present → hard error. If
wrangler loginwas ever run, orCLOUDFLARE_API_TOKEN/CLOUDFLARE_API_KEYis set,--temporaryerrors. Either unset the var for this shell orwrangler logout. Never strip a user's real credentials without telling them. - Rate limiting. Creating temporary accounts too fast fails. Reuse the cached account (just redeploy) within the 60-minute window instead of forcing a new one; if rate-limited, wait or use a permanent account.
- 60-minute hard expiry, not extendable. If the deploy must outlive an hour, the user must claim it. Surface this clearly.
curlmay briefly serve the old body after a redeploy.workers.devhas a short edge cache; the(reused)line plus a newCurrent Version IDconfirm the deploy succeeded even ifcurlshows stale content for a few seconds. Re-curl, or add a cache-busting query string, before concluding a redeploy failed.- Don't log the claim URL into shared transcripts as "just a link." It is credential-equivalent.
Verification
npx wrangler@latest --versionreturns>= 4.102.0.npx wrangler@latest deploy --temporaryprints aworkers.devlive URL and aclaim-preview?claimToken=claim URL.curl -sSreturns the exact body the Worker code produces.- A second deploy reports
Account: (reused)and the live URL is unchanged. - The parser script's self-test passes:
python3 scripts/parse_deploy_output.py --selftest.