Deploy to Cloudflare
Connect your Cloudflare account to AI Website Creator, deploy your project as a fast Astro site on a free workers.dev address, and update, unpublish, or disconnect it.
Cloudflare puts your design online as a fast Astro site in your own Cloudflare account. You sign in to Cloudflare once, click Publish, and UiChemy builds the site and deploys it to a free workers.dev address. The site is yours: it lives in your account, not ours.
At a Glance
| Item | Details |
|---|---|
| Where | Publish › Astro › Cloudflare (badge Recommended) › Start |
| You need | A Cloudflare account (the free plan works) |
| Address | https://<site-name>.<your-subdomain>.workers.dev/ |
| What to publish | Astro + EmDash (with a CMS) or Astro frontend (static pages only) |
| Time | Astro frontend: usually under a minute. Astro + EmDash: about a minute, a few minutes the first time. |
| Custom domain | Coming soon in the panel |
| Who | Every signed-in user |
Why It Matters
- Your account, your site: the site, its files and any CMS data live in your Cloudflare account.
- Free and fast: Cloudflare serves your pages from its global network on a free workers.dev address.
- One click to update: change your design in UiChemy, then click Resync.
Use Cases
- Agencies who want each client's site in the client's own Cloudflare account.
- Marketing sites that need to be fast and cheap to run.
- Sites a client edits themselves, using the EmDash CMS. See Astro + EmDash CMS.
Cloudflare publishing requires UiChemy's server-side connection setup. If the screen says Coming soon and "Publishing to Cloudflare isn't available on this server yet", use Manual download instead. Cloudflare's account limits and any usage charges still apply. A free workers.dev address is not a promise of unlimited hosting.
Connect Your Cloudflare Account
Open Cloudflare
In the Design Editor, click Publish, select Astro, then click Start on Cloudflare. The screen reads "Live on a free workers.dev address in your own Cloudflare account."
Connect
You'll see Connect your Cloudflare account: "You'll sign in on Cloudflare, then come straight back here." Click Connect Cloudflare.
Approve on Cloudflare
Sign in to Cloudflare and approve the access UiChemy asks for. Approve every permission on the consent screen, or deploys can fail later.
Come back to UiChemy
Cloudflare sends you back to your project with the Publish panel open on Cloudflare. You'll see "Cloudflare connected" and the row turns into Cloudflare connected with your account name.
UiChemy asks Cloudflare for permission to create and update Workers, read your account settings, and create a D1 database and KV storage for CMS sites. UiChemy stores the Cloudflare access credentials encrypted. Disconnect removes its saved connection and attempts to revoke the authorization.
| After sign-in you see | Meaning |
|---|---|
| "Cloudflare connected" | Ready to publish. |
| "Cloudflare wasn't connected" | You didn't grant access. Click Connect Cloudflare to try again. |
| "Couldn't connect Cloudflare" | The sign-in didn't finish. Try again. |
More than one Cloudflare account?
If your login has several Cloudflare accounts, an Account menu appears ("Choose an account"). Pick the one to publish to. Once a site is published, the project keeps using that account, so the menu goes away.
Publish Your Site
Choose what to publish
Under What to publish, choose:
- Astro + EmDash (Recommended): "Your site with a CMS: you or your client edit every page, section, image and blog post."
- Astro frontend: "Static pages only, no CMS. Edit content in UiChemy and publish again."
Publish
Click Publish and keep the window open. The button reads Publishing… while it works.
Open your site
When it's done, a card shows your live address with a Live badge, the account name, and when it was last published. Click Open site.
Your site has a blog? Then Astro frontend is unavailable: "Your site has a blog, which needs EmDash. Remove the blog pages to publish the frontend only." The full rule is on Astro + EmDash CMS.
Progress
| Publishing | Steps you'll see |
|---|---|
| Astro frontend | Uploading files, Going live |
| Astro + EmDash | Preparing your pages, Building the site, Setting up the database and storage, Uploading files, Going live |
Every generated page is published. There's no page picker for Cloudflare.
Your site's address
The site name comes from your project name, for example bakery.your-subdomain.workers.dev. UiChemy never takes over a Worker you already have: if the name is taken, it adds -2, -3 and so on. CMS sites get -cms at the end, so an Astro frontend site and an Astro + EmDash site of the same project can live side by side.
Update Your Site (Resync)
After you change your design in UiChemy, open Publish › Astro. The Cloudflare card now shows Live and a Manage button. Click Manage, keep the same option selected, and click Resync. The button reads Resyncing… while it works.
For Astro + EmDash sites, a Resync is careful with content edited in the CMS. See Resync and your CMS edits.
Custom Domain
The site card shows Custom domain with a Coming soon badge. For now your site uses its workers.dev address.
Unpublish
Click Unpublish on your site's card.
- Astro frontend: "Unpublish this site? The address stops working. Your design stays in UiChemy, so you can publish again any time." Click Unpublish to confirm, or Cancel.
- Astro + EmDash: you choose to keep the CMS content or delete it. See Unpublish a CMS site.
Only the person who published a Cloudflare site can unpublish it, from their own Cloudflare connection.
Disconnect Cloudflare
Click Disconnect on the Cloudflare connected row. UiChemy removes its saved connection and attempts to revoke its Cloudflare authorization.
Disconnecting doesn't take your sites down. They stay in your Cloudflare account. To unpublish or resync them later from UiChemy, connect again with the same Cloudflare account.
When Something Goes Wrong
Errors show what happened, what to do, and sometimes a button that fixes it.
| Message | What to do | Button |
|---|---|---|
| Cloudflare is not connected | Connect your Cloudflare account again, then publish. | Reconnect Cloudflare |
| Cloudflare didn't allow this | Reconnect and approve every permission on the consent screen. | Reconnect Cloudflare |
| Choose a Cloudflare account | Pick the account to publish to, then try again. | none |
| Your Cloudflare account has no workers.dev address yet | Open Workers & Pages in Cloudflare once (it asks you to pick a subdomain), then publish again. | Open Cloudflare Workers |
| Cloudflare sign-in didn't finish | Connect Cloudflare again. | Reconnect Cloudflare |
| Cloudflare returned an error | Try again in a minute. If it keeps failing, send support the detail shown. | Try again |
| We couldn't build your site | Try again. If it keeps failing, send support the detail shown. | Try again |
| This site is being published right now | Wait for it to finish, then try again. | Try again |
| This site isn't on Cloudflare any more | Publish it again to put it back online. | none |
| Only the person who published this site can unpublish it | Ask them to unpublish it from their account. | none |
| Cloudflare publishing is not available yet | Use Manual download for now. | none |
New to Cloudflare? If you see the "no workers.dev address yet" error, In the Cloudflare dashboard, open Workers & Pages once and pick a subdomain, then come back and click Publish again.