Free Astro tutorials for complete beginners.

Beginner's Guide to Astro

How to Put an EmDash Site Online With Cloudflare

We deployed EmDash to Cloudflare with one command in 27 seconds. Wrangler made the database, media storage and session store for us. Here are the exact steps.

Tested on Astro 7.4

Cover image for How to Put an EmDash Site Online With Cloudflare
In this guide
  1. What gets created
  2. Step 1: Sign in to Cloudflare from your terminal
  3. Step 2: Deploy
  4. Step 3: Finish setup on the live site
  5. Step 4: Check scheduled posts will work
  6. Step 5: Use your own domain
  7. Updating your site later
  8. If you picked Node.js instead
  9. Where to go next
  10. Frequently asked questions

EmDash was made by Cloudflare, and Cloudflare is the easiest place to put it online. You sign in once, then run one command. Cloudflare makes the database and the place your images live, all by itself.

What gets created

Your project has a file called wrangler.jsonc. It lists what your site needs from Cloudflare. When we deployed, Wrangler set up these:

Name in your project What Cloudflare gives it What it’s for
DB A D1 database Your posts, pages, users and settings
MEDIA An R2 bucket Your uploaded images and files
SESSION A KV store Keeping you signed in
IMAGES Cloudflare Images Resizing pictures
ASSETS Static files Your site’s CSS, fonts and scripts

You don’t make any of these by hand. Wrangler, Cloudflare’s command-line tool, created the database, the bucket and the session store on our first deploy, and reuses them after that.

Step 1: Sign in to Cloudflare from your terminal

In your project folder, run:

npx wrangler login

Your browser opens and asks you to let Wrangler use your Cloudflare account. Click Allow. Then go back to your terminal.

Step 2: Deploy

npm run deploy

That one command builds your site, then uploads it. The first time, Wrangler also creates everything your site needs. Here’s the end of what we saw:

Terminal
$ npm run deploy
Provisioning SESSION (KV Namespace)…
✨ SESSION provisioned 🎉
Provisioning DB (D1 Database)…
✨ DB provisioned 🎉
Provisioning MEDIA (R2 Bucket)…
✨ MEDIA provisioned 🎉
Uploaded astrobeginner-emdash-test (19.12 sec)
Deployed astrobeginner-emdash-test triggers (0.70 sec)
https://astrobeginner-emdash-test.ryan-9dc.workers.dev
schedule: * * * * *

The whole thing took 27 seconds. The last lines are your site’s address, ending in workers.dev, and the every-minute timer for scheduled posts.

Step 3: Finish setup on the live site

Open your new address and add /_emdash/admin to the end. You’ll see the same three-step setup wizard you saw on your computer:

The EmDash setup wizard, step 1 of 3, with boxes for Site Title and Tagline, and three choices: Sample content, Empty site, or Import an existing EmDash site.

  1. Site. Type your site’s name and tagline. Choose Empty site if you’re starting for real, or Sample content to look around first.
  2. Account. Your email and your name.
  3. Sign in. Create a passkey.

Step 3 of the setup wizard, Secure your account, explaining that a passkey is unlocked with your fingerprint, face or PIN and saved in a credential manager such as iCloud Keychain, with a Create passkey button.

A passkey replaces a password. Your device asks for your fingerprint, face or PIN, and saves the key. There’s nothing to remember and nothing to steal.

Step 4: Check scheduled posts will work

EmDash publishes scheduled posts with a timer Cloudflare runs every minute. The template already has it switched on. To check, run:

npx emdash doctor

It looks at your project and tells you if the timer or its handler is missing.

Step 5: Use your own domain

In the Cloudflare dashboard, open Workers & Pages, pick your site, then Settings, Domains & Routes, and add your domain. If your domain’s DNS is already on Cloudflare, it works within minutes. How to register a domain covers the rest.

Updating your site later

Writing posts doesn’t need a deploy. You write in the dashboard and publish, and it’s live.

You only deploy again when you change the code, like the design or the templates. Run npm run deploy again. Your posts and images stay where they are.

If you picked Node.js instead

A Node.js EmDash site keeps its database in a SQLite file and its images in a folder. It runs on any server that runs Node.js, with npm run build then npm start. EmDash’s Node.js guide covers it. You can’t move a Node.js project to Cloudflare just by deploying it. Start a new project with the Cloudflare platform instead, and move your content across.

Where to go next

Frequently asked questions

Is it free to host EmDash on Cloudflare?

For most small sites, yes. EmDash's Cloudflare templates are set up to run on the Workers free plan. You need the $5 a month Workers Paid plan only for sandboxed plugins, or if your site outgrows the free limits.

Do I need to make the database myself?

No. When we deployed, Wrangler created the database, the media bucket and a session store by itself, using the names in wrangler.jsonc. Later deploys reuse them.

How long does it take?

Our first deploy took 27 seconds. The first visit to the new site then took 30 seconds while EmDash set up its database. After that, pages loaded in about a second.

Can I host EmDash somewhere other than Cloudflare?

Yes. Pick the Node.js platform when you create the project, and it runs on any server that runs Node.js, with SQLite for the database.

Stuck on a step?

Check the common errors guide, look up a word in the glossary, or ask the friendly people in the official Astro and EmDash Discords. How to ask so people can help.

Keep reading

  1. How to Write and Publish Your First Post in EmDash

    Write a post in EmDash's editor, save it as a draft, and publish it. We did it on EmDash 1.4, and these are the real screens, including the one step people miss.

    EmDash, 6 minute read, November 8, 2026

  2. A Tour of the EmDash Dashboard: Every Menu Explained

    What every item in the EmDash admin menu does, from Posts and Media to Redirects, Bylines and Import, with screenshots from EmDash 1.4.

    EmDash, 7 minute read, November 8, 2026

  3. EmDash's 4 Templates Compared: Blog, Marketing, Portfolio and Starter

    We installed all four EmDash templates and set each one up with its sample content. Here's what each looks like, what it's built for, and which to pick.

    EmDash, 6 minute read, November 8, 2026

Try "blog", "deploy" or "EmDash".