EmDash Store Template: Deploy to Cloudflare in One Click
Deploy an EmDash store template to Cloudflare Workers with one button. What it creates, the one secret it asks for, and how to claim your store.
Updated 2026-11-21 · Tested with the Otta 0.2.0 store template on Workers Free. How it was tested is at the end of the post.
How do you deploy an EmDash store to Cloudflare?
Click the Deploy to Cloudflare button for the otta-store-template. It copies the template into your GitHub account and deploys one Worker with D1, R2, KV and an Images binding. Enter one secret, EMDASH_ENCRYPTION_KEY. Then claim the store with its private setup link, choose sample content, and price your products.
Otta is an open-source commerce plugin for EmDash that runs products, cart, checkout, orders and inventory inside the CMS on Cloudflare Workers, with no separate backend, database server or Redis.
Want to look before you connect GitHub? The Otta playground gives you a disposable demo store for about an hour.
Otta is built to be set up and run with an AI agent. After you claim the store, you can hand daily admin to an agent such as Claude Code: install the opt-in @urumi.ai/otta-mcp package, set mcp: true, turn Otta’s tools on in the admin and create an API token for the agent. The token needs mcp:tools:otta for Otta’s tools, plus content:read and content:write for EmDash’s content tools (and media:write if the agent uploads images). EmDash’s tools then create and edit product content, Otta’s tools set price and stock and manage orders, coupons, shipping, tax, reports and settings, and Otta logs every call to its tools. You still create the Cloudflare account, claim the admin with your own passkey, connect Stripe to take cards, and approve what ships.
The flow in one line: deploy → visit /_emdash/admin → find [otta-setup] in your Worker’s logs → finish the EmDash wizard with a passkey → price products → turn on payments.
To be clear about "one click": the button covers the deploy. Claiming the store, pricing and payments are seven more short steps in the Cloudflare dashboard and the store admin, listed below.
Why claim at all? A button deploy lands on a guessable workers.dev address, and EmDash makes whoever finishes its setup wizard first the administrator. So the template keeps the admin locked until you open a private setup link only you can read.
Step by step: deploy, then claim your store
Before you click, you need a Cloudflare account with a payment method on file (R2 requires one; its free allowance still applies), a GitHub account, and an encryption key. Make the key locally:
npx emdash secrets generateKeep a copy in your password manager. The key encrypts the payment keys you save in the admin; if you lose it, you have to enter those payment keys again.
- Click the button and connect your accounts. Click Deploy to Cloudflare, sign in to Cloudflare and connect GitHub. Optionally rename the repository, the Worker and the resources on the deploy page. If this is a second store in the same account, give every resource its own name.
- Paste your encryption key. When the deploy page asks for
EMDASH_ENCRYPTION_KEY, paste the key you generated. It is the only secret the button asks for. - Wait for the first build. Workers Builds runs
npm run build, thennpm run deploy. The deploy script applies every pending database migration before it runswrangler deploy, so the store never goes live on an unmigrated database. - Turn off preview builds. Do this before you merge anything. On Workers connected to Builds before Cloudflare’s Worker Previews, a build of a non-production branch uses production settings, which here include the live database (Cloudflare "Build branches", checked 2026-11-21). Open your Worker → Settings → Build → Branch control and clear Enable Preview Builds.
- Optional: set your own setup token before your first visit. Add a Worker secret named
OTTA_SETUP_TOKEN(Worker → Settings → Variables and Secrets). It needs 32 or more characters ofA-Z a-z 0-9 - _, andopenssl rand -hex 32makes one. With this secret set, no setup link is written to the logs. - Claim the store. Visit
https://<your-worker>.<your-subdomain>.workers.dev/_emdash/adminonce. You will see "This store hasn’t been set up yet". That first visit writes the setup link to the logs. Open your Worker → Logs and search for[otta-setup], then open the link in the browser where you will finish the wizard. If you did step 5, open/_emdash/admin/setup?setup_token=<your token>instead. - Finish the EmDash setup wizard. Choose Sample content for three demo products, create your account, then register a passkey. After this the setup link stops working, and you sign in with the passkey.
- Go live if your admin says Staging. If your admin shows a Staging badge, select Go live in Settings → General → Site Status.
- Price the products. Open each product and fill in its Pricing & stock cards. If a sample product’s card says "Product not found", make a small edit (for example, to the description; you can change it back), save, click Publish changes and confirm. That creates the product’s commerce record at once.
- Turn on payments. For cards, add a webhook endpoint in the Stripe Dashboard for
https://<your-site>/webhooks/stripe, subscribed to exactlypayment_intent.succeededandpayment_intent.payment_failed. Then enter the publishable key, the secret key and the endpoint’s signing secret in Store settings. Or turn on cash on delivery, which needs no payment provider.
Once the products are priced, the shop looks like this:

Store running? Star the Otta repo and the template repo to hear about releases, and open an issue if a step did not match what you saw. For payment setup in more depth, see how to add a store to EmDash.
What the claim and pricing steps look like
These screenshots come from a local copy of the template, not from a Cloudflare deploy, except the Cloudflare documentation capture for step 4.

![The page an unclaimed Otta store shows at /_emdash/admin: "This store hasn't been set up yet", with steps to find the [otta-setup] link in Workers Logs or to use OTTA_SETUP_TOKEN.](/wp-content/uploads/2026/11/otta-otta-locked-store-page.png)




If the build fails
A failed build deploys nothing: a new store stays offline, and a running store keeps the version it had. The build log ends with Deploy stopped. and says what to do. Migrations the build already applied stay applied. The template README’s section "If the deploy or the first visit fails" lists each message and its fix.
Only trying it out? How to remove it
Delete the Worker, its D1 database, both R2 buckets, the KV namespace and the GitHub repository the button created.
Manual EmDash deploy vs the store template button
A manual EmDash deploy means creating each Cloudflare resource and running migrations yourself; the Otta store template’s button creates the resources and runs the migrations in its first build. The manual column follows Vendwick’s Deploy to Cloudflare Workers doc (version 0.2.0, updated 2026-11-15; checked 2026-11-21), which assumes an EmDash site with Vendwick already installed.
| Task | Manual deploy (Vendwick’s documented path) | Otta store template button |
|---|---|---|
| Create the D1 database | You, in the dashboard or CLI | The button |
| Create the R2 bucket(s) | You (one private bucket) | The button (a public media bucket and a private downloads bucket) |
Set EMDASH_ENCRYPTION_KEY | You, as a Worker secret | Pasted into the deploy page |
| Run database migrations | You: npx emdash migrate against the remote D1 with a D1-edit API token, before any traffic | The build’s deploy script, before the Worker goes live |
| Deploy the Worker | You | The button, then every push to your production branch |
| Commands you run | At least npx emdash secrets generate, npx emdash migrate, and a deploy | One: npx emdash secrets generate |
We did not time either path. Other EmDash commerce plugins exist; Best EmDash Plugins (2026) compares them, including how each is installed.
What the Deploy to Cloudflare button creates
The Deploy to Cloudflare button for the Otta store template clones the template into your GitHub account as a copy, not a fork. It creates the Cloudflare resources the template’s wrangler.jsonc declares and connects Workers Builds, so every push to your production branch builds and deploys the store. Commerce runs inside that one Worker.
| Binding | Cloudflare product | Used for |
|---|---|---|
DB | D1 database | CMS content plus every order, cart and customer |
MEDIA | R2 bucket (public) | Product images |
DOWNLOADS | R2 bucket (private) | Files buyers pay for. Never make it public |
SESSION | KV namespace | Admin sign-in sessions |
IMAGES | Cloudflare Images binding | Resizing product photos |
RATE_LIMIT_AUTH | Rate limiting | 10 sign-in requests per visitor per 60 seconds |
RATE_LIMIT_WRITES | Rate limiting | 60 cart and checkout writes per visitor per 60 seconds; cash on delivery is offered only with this binding |
Cron * * * * * | Cron Triggers | Every minute: scheduled publishing, expiring stock holds, the order-email queue |
Workers Logs are on, because the setup link is written there before you claim the store. Invocation logs are off, so request URLs that can carry payment secrets are not stored. You can read everything before you click: the template repository is MIT-licensed and holds configuration only, and the store itself is the @urumi.ai/otta-store npm package, whose source is in the Otta repository.

How does the Otta template differ from EmDash’s starter templates?
EmDash has no official store template. Cloudflare’s EmDash guide offers four templates when you run npm create emdash: Starter, Blog, Marketing and Portfolio. The EmDash README describes three of them (Blog, Marketing, Portfolio) as starter templates and puts a Deploy button on Blog. The Otta store template is a separate, third-party template that adds a catalog, cart, checkout and orders.
| Aspect | Stock EmDash (npm create emdash or the blog-cloudflare button) | Otta store template button |
|---|---|---|
| Templates | Starter, Blog, Marketing, Portfolio | Store (catalog, cart, checkout, orders) |
| Commerce included | No | Yes |
| First-admin protection | The first person to finish the wizard becomes admin; Cloudflare’s guide says "Complete setup right after you deploy." | Admin locked until you claim it with a private setup token |
| Cloudflare plan | Workers Free¹ | Workers Free |
¹ EmDash’s sandboxed plugins need Workers Paid, so the blog-cloudflare template ships with its worker_loaders binding commented out (wrangler.jsonc, checked 2026-11-21). The Otta plugin runs trusted inside the Worker and needs no such binding. Sandboxed Plugins: Why a Store Plugin Shouldn’t Have Full Database Access covers that trade-off.
Sources, checked 2026-11-21: Cloudflare’s EmDash framework guide and the EmDash README.
Why the Otta store is locked until you claim it
Cloudflare’s EmDash guide (checked 2026-11-21) says: "The first person to finish the setup wizard becomes the administrator. Complete setup right after you deploy." A button deploy sits on a predictable workers.dev address, so in that window a stranger could reach the wizard first.
Otta closes the window. Until the first admin exists, every /_emdash route shows "This store hasn’t been set up yet" unless the request carries the store’s private setup token, from your OTTA_SETUP_TOKEN secret or generated and written to the Worker’s logs once. Opening the link sets a one-hour, HttpOnly, SameSite=Strict cookie and opens the wizard; once the first admin exists, the lock switches itself off for good.
The trade-off: until you use the generated link, anyone who can read your Worker’s logs can use it too, and it does not expire. That includes exported logs (Logpush, tail Workers). If your account exports Worker logs, set OTTA_SETUP_TOKEN before the first visit. The design is in ADR-0042.
Limits and trade-offs to know
- Pre-1.0. Otta is production-ready today, but APIs, settings and admin screens can still change, so pin your versions and review each update. The template pins EmDash 1.5.0 in its
package.json. - Workers Free limits. 100,000 requests per day, 10 ms of CPU per request and 5 Cron Triggers per account (Cloudflare Workers limits, checked 2026-11-21). Past the daily cap, Cloudflare returns error 1027 until midnight UTC. Each store uses one Cron Trigger, so one Free account runs at most five stores. Free also allows 50 D1 queries per Worker invocation (D1 limits, checked 2026-11-21); Otta’s background work budgets itself to fit, so expired holds and queued emails clear more slowly on Free. Cloudflare Images on Free includes 5,000 unique transformations per month (Images pricing, checked 2026-11-21). Costs in more depth: The Cheapest Way to Run an Online Store in 2026.
- Email needs setup. Cloudflare Email Sending needs Workers Paid. Until you add an email provider, order emails wait up to 72 hours and are then skipped, and sign-in links are not sent (Otta email providers guide).
- No delayed-notification payments yet. Methods that confirm days later (SEPA, ACH, Bacs, bank transfer) end in an expired order and an automatic refund (issue #606, open as of 2026-11-21).
Deploy a new store with the button or npm run deploy, never plain wrangler deploy: a new database needed 90 migrations when counted at EmDash 1.3.1 (per the template README), and on Workers Free a store that migrated itself on its first request was cut off partway.
How updates reach your store
Once a week, Dependabot opens a pull request in your repository for Otta’s packages, and merging it deploys the update; if the build fails, the store keeps running the previous version. Releases that move EmDash, Astro or React need a manual version change, described in UPGRADING.md.
FAQ
Is there an official EmDash store template?
No. Cloudflare’s EmDash guide lists Starter, Blog, Marketing and Portfolio (checked 2026-11-21). The Otta store template is a third-party, MIT-licensed template, not an official Cloudflare or EmDash template, and Cloudflare does not endorse it.
Does an EmDash store run on the Cloudflare Workers free plan?
Yes. The Otta template runs on Workers Free, with three conditions. R2 needs a payment method on file. Free limits apply: 100,000 requests per day, 10 ms of CPU per request and 5 Cron Triggers per account (Cloudflare Workers limits, checked 2026-11-21). Cloudflare’s email service needs Workers Paid. Card checkout on Free is not yet tested.
I can’t find the setup link in the logs. What now?
The link is written only after your first visit to /_emdash/admin, and Workers Logs can lag for a short time. If you cannot find the line, add an OTTA_SETUP_TOKEN secret and open /_emdash/admin/setup?setup_token=<token>. A token you set later replaces the generated one (template README).
Can I use my own domain?
Yes. In the Cloudflare dashboard, select your Worker, then Settings → Domains & Routes → Add → Custom Domain. The domain needs an active Cloudflare zone (Cloudflare Custom Domains docs, checked 2026-11-21). Passkeys work only on the hostname where they were created, so Cloudflare’s EmDash guide says to run setup on that domain, or set EMDASH_SITE_URL to it before setup.
How do I update the store after deploying?
Merge the weekly Dependabot pull request, and the store deploys the update. Releases that move EmDash, Astro or React need a manual version change, described in UPGRADING.md.
Do I need Stripe?
No. Cash on delivery works without a payment provider and is offered for physical products (template README). Add Stripe when you want card payments.
Background
Urumi builds Otta. In its EmDash 1.0 announcement on 2026-09-28, Cloudflare wrote: "Urumi is using their WooCommerce expertise to release EmDash’s first eCommerce plugin." (Cloudflare blog). That sentence is about the plugin, not this template.
Next steps
- Deploy your store.
- Star the Otta repo and the template repo to follow releases.
Next, read how to run an online store on Cloudflare Workers.
How this was tested
The template README says the Otta team ran the button flow end to end on Workers Free on 2026-11-10, on the template’s earlier release (EmDash 1.3.1, Otta 0.2.0): deploy, storefront, and the claim through the [otta-setup] link in the logs and a passkey. That run did not cover pricing, payments or orders. Steps 3 and 4 and the Workers Logs search in step 6 follow the template README and Cloudflare’s documentation; we did not repeat them on a Cloudflare account for this post. The claim page, the wizard and the pricing steps (6 to 9) were re-run on a local copy of the template on 2026-11-21, and the priced storefront was captured from the public playground the same day. We did not time the deploy.
Otta is production-ready today and pre-1.0, so pin your versions, and tell us what breaks.
About the author: Vedanshu Jain is a former WooCommerce core engineer and tech lead, and builds Otta at Urumi. GitHub · WordPress.org
Last updated Nov 23, 2026