Run your app on your own Cloudflare account
In shortConnect a Cloudflare API token in Backend → Cloud and your app can run on your own Cloudflare account — your Worker, your D1 database, your domain and your bill — instead of MonstarX's. Its code can also use Cloudflare services such as KV, R2, Queues, Vectorize and Workers AI, which MonstarX creates on your account.
MonstarX publishes every app on its own cloud, with nothing for you to manage. If your business already uses Cloudflare — or you want the app, its data and its bill in your own name — connect your Cloudflare account. Two things change:
- Hosting. When you publish, the app goes to your Cloudflare account: your Worker (the program that serves the app), your D1 database (Cloudflare’s SQL database), your domain and your bill.
- Cloudflare services. Your app’s code can use Cloudflare’s other services — storage, queues, AI and more — which MonstarX sets up on your account for you.
Before you start
Section titled “Before you start”You need a Cloudflare API token. In Cloudflare, go to Manage Account → API Tokens, create a token from the Edit Cloudflare Workers template, and add D1: Edit. Add the permission for each extra service you want the app to use:
| Service | What it is for | Permission to add |
|---|---|---|
| KV | A fast key-value store for settings, caches, feature flags and short-lived tokens | Workers KV Storage: Edit |
| R2 | File storage with no fees for downloads: uploads, images, exports, backups | Workers R2 Storage: Edit |
| Queues | Background jobs: hand work over in a request and finish it later, with retries | Queues: Edit |
| Vectorize | A vector index for search by meaning | Vectorize: Edit |
| Workers AI | Open AI models for text, embeddings and images, billed to you | Workers AI: Edit |
| Browser Rendering | A real browser for screenshots, PDFs and the readable text of any page | Browser Rendering: Edit |
| Images | Store and resize images, with variants and a delivery address | Cloudflare Images: Edit |
| Analytics Engine | Record your own events at any volume and query them with SQL | Account Analytics: Read |
How do I connect my Cloudflare account?
Section titled “How do I connect my Cloudflare account?”-
Open your project and click Backend in the top bar, then Cloud.
-
Under Connectors, click Connect beside Cloudflare. (Create a token opens Cloudflare’s token page if you have not made one yet.)
-
Paste the token into API token and click Connect Cloudflare.
-
If the token reaches more than one account, choose the one the app should run on and click Use this account. If MonstarX cannot list your accounts with the token, it asks for the Account id (32 characters, shown in the Cloudflare dashboard).
MonstarX then checks what the token is allowed to do. It will not connect without Workers and D1, and tells you exactly which permission to add. If an extra service is missing, it says so — “This token cannot reach …” — and the rest still works.
How do I publish to my own account?
Section titled “How do I publish to my own account?”Once connected, the Cloudflare card in BackendCloud shows your account and a switch, Run this app on my Cloudflare. With it on, Publish says it will deploy “to your own Cloudflare account” and names the account and address.
When you publish:
- MonstarX creates a D1 database named after the project on your account (or reuses one with that name) and sets up every table the app needs.
- It builds the app and uploads it as a Worker named after your app.
- The app answers at
your-app.your-subdomain.workers.dev, or on your own domain.
To use one of your own domains, click Use my domain in the Cloudflare card. MonstarX lists the domains on your Cloudflare account; pick one, type the Address (the domain itself, or anything under it) and click Use this address. Cloudflare adds the DNS record and the HTTPS certificate. The change takes effect the next time you publish. Use workers.dev switches back.
How does my app use Cloudflare services?
Section titled “How does my app use Cloudflare services?”Ask for what you want: “store uploaded photos in R2”, “cache the menu in KV”, “summarise reviews with Workers AI”. MonstarX creates the service on your account (named after the project, or reusing one with the same name), connects it to the app, and writes the code. It works in the preview straight away, too.
You can also manage them yourself in the Cloudflare services list in the Cloudflare card: Add a service, give it a short name (like uploads or sessions) and click Create. Stop using it disconnects a service from the app — nothing is deleted on Cloudflare, and the data stays on your account.
Good to know
Section titled “Good to know”- Your limits, your bill. Cloudflare charges your account for what the app uses. Cloudflare’s request limits are per account, so a busy app on your account never slows down anyone else’s — and theirs never slow yours.
- Unpublish deletes the Worker from your account. Your D1 database and other services stay.
- Changing or disconnecting the account is refused while the app is live there. Unpublish, or switch Run this app on my Cloudflare off and publish, first. Moving the app on or off your account removes the Worker from where it used to live.
- Data in Supabase or Railway? The app keeps using that database, and no D1 database is created for it.
- Imported apps publish to your account as the static files their own build makes. They get no database and cannot use the Cloudflare services helper.
- Exports include the same Cloudflare setup, so
wrangler deployfrom the downloaded code connects the same services. See Export your code.
Frequently asked questions
Section titled “Frequently asked questions”What permissions does my token need?
Start from Cloudflare's Edit Cloudflare Workers template and add D1: Edit. Add a permission for each extra service, such as Workers R2 Storage: Edit for R2.
Why is my live app's data different from the preview?
On your own Cloudflare account the live app has its own D1 database, which starts empty. The preview keeps MonstarX's practice data, so you can test without touching real customers' records.
Can I use my own domain?
Yes, if the domain is on your Cloudflare account. Click Use my domain in the Cloudflare card, pick the domain, type the address and publish again.
Does MonstarX delete anything on my Cloudflare account?
Only the app's Worker, when you unpublish or move the app off the account. Databases and services are never deleted by Stop using it.
Can I go back to MonstarX's hosting?
Yes. Switch Run this app on my Cloudflare off and publish again. The Worker on your account is removed once the app lives on MonstarX.