# Deploy to your Cloudflare account

Deploy native Workers from your repository into your team's own Cloudflare account, beside a project's hosted services.

A service can deploy its Workers into your team's own Cloudflare account instead of Arkor's. They go
up as ordinary Workers, named by their Wrangler `name` and configured by their Wrangler
configuration, in the account an owner or admin chose for the project. Arkor still builds them from
the repository, shows what each release changes, applies their D1 migrations and triggers, and
deploys the project's other services as before.

Arkor makes every call to Cloudflare itself, through your team's Cloudflare connection. No
Cloudflare token reaches your build.

## When to use it [#when-to-use-it]

Use it for native Workers that should keep what their Wrangler configuration declares: bindings to
resources already in your account, routes and custom domains, cron schedules, queue consumers,
Workflows and Durable Objects. A Worker you deploy with `wrangler deploy` today is the typical case.

- **Native Workers only.** The service's root directory holds a Wrangler configuration, or its build
  writes `.wrangler/deploy/config.json` there. Next.js, SvelteKit and the
  [SSR frameworks](/docs/getting-started/ssr-framework-support) stay on Arkor's hosting.
- **Beside a hosted primary.** A project's primary service is always hosted by Arkor; the services
  you deploy to your account sit beside it, in the same [release](/docs/projects/services).
- **Production only.** Branch previews leave these services out.

## Before you start [#before-you-start]

Direct deployment is available only where this Arkor deployment offers it. Where it does not, the
project's **Settings** › **Services** shows no **Cloudflare account** card, and a production release
that includes such a service fails with
`backend_unsupported: Deploying services to your own Cloudflare account is not available yet`.

1. **Connect Cloudflare with the deployment permissions.** An owner or admin opens **Domains** in the
   sidebar and chooses **Connect Cloudflare**, or **Reconnect**, as in
   [Domains](/docs/account/domains). On Cloudflare's consent screen, share the account to deploy to
   and keep the deployment permissions. They are optional there: declining them keeps DNS connected,
   with nothing to deploy with.
2. **Choose the account.** On the project's **Settings** › **Services**, an owner or admin picks it in
   **Cloudflare account** with **Choose an account**, then **Save**. The repository never names the
   account. **Clear the choice** stops the project's direct deployments.

Arkor acts in Cloudflare as the user who connected, and keeps a release's calls within a share of
its own for that user and for your team: a release waits while a share is spent, for half an hour
at most. Cloudflare itself
[limits API calls per user](https://developers.cloudflare.com/fundamentals/api/reference/limits/).

## Send a service to your account [#send-a-service-to-your-account]

Set `destination: "cloudflare"` on the service in the
[configuration file](/docs/projects/services#configure-services-in-a-file), or choose **Your
Cloudflare account** for **Deploy to** in the service's settings; the dashboard's setting wins over
the file. `services.workerOrder` sets the order the Workers deploy in:

```jsonc title="arkor.jsonc"
{
  "services": {
    "members": [
      { "slug": "main", "rootDirectory": "apps/web" },
      { "slug": "api", "rootDirectory": "workers/api", "destination": "cloudflare" },
      { "slug": "jobs", "rootDirectory": "workers/jobs", "destination": "cloudflare" },
    ],
    "workerOrder": ["acme-jobs", "acme-api"],
  },
}
```

Each Worker is the `name` its Wrangler configuration gives it: here `workers/api/wrangler.jsonc`
names `acme-api`, and `workers/jobs/wrangler.jsonc` names `acme-jobs`. A service can build several
Workers, which its build lists in `.wrangler/deploy/config.json`.

- **`services.workerOrder`** names the Workers of every service deployed to your account, each once,
  in the order they deploy. Where it is given it is strict: every Worker the services build is
  listed, and every Worker listed is built. Without it, they deploy service by service, each
  service's Workers in the order its build lists them. Put a Worker after the Workers it names — in
  a service binding, as a Durable Object's or Workflow's `script_name`, or as a tail consumer —
  unless they are in the account already.
- **Names** are lowercase letters, digits and dashes, neither first nor last a dash, at most 255
  characters, and at most 63 for a Worker on `workers.dev`
  ([Wrangler's `name`](https://developers.cloudflare.com/workers/wrangler/configuration/)). A name is
  one Worker of the account: two services cannot build it, and a Worker another Arkor project deploys
  there is refused.
- **`account_id`**, where a configuration sets it, has to be the account chosen for the project.
- **At most 50 Workers** go out in one release.
- **Nothing of Arkor's graph.** Such a service has no public routes, private service connections or
  resource assignments in Arkor, is not a Container service, and is never the default public
  service; no other service connects to it. Its Workers use the routes and bindings in their
  Wrangler configuration.
- **Wrangler environments.** Set `CLOUDFLARE_ENV` in the project's environment variables to deploy
  one, as `wrangler deploy --env` does.

The service is built as a hosted Worker service is, with the same install, build command,
[environment](/docs/deployments/builds#build-environment) and time limits. Then Wrangler 4.161.0, the
version Arkor's builder carries, packages each Worker with `wrangler deploy --dry-run` of its own
configuration, so a release uploads what Wrangler would. A configuration's `build.command` runs once,
inside that dry run.

## What a release does [#what-a-release-does]

A production release that includes such a service:

1. **Builds it**, and packages each Worker.
2. **Plans each Worker against your account**, before the project's other services are built:
   **Unchanged** where its upload is what Arkor deployed last, which makes no call to Cloudflare;
   **Create** where the account has no Worker of the name; and otherwise a new version over the
   Worker in the account. Each KV namespace, D1 database, R2 bucket, queue, Hyperdrive
   configuration, Vectorize index, Secrets Store secret, dispatch namespace, mTLS certificate and
   Worker a binding names has to be in the account, or, for a Worker, deploy earlier in the release.
3. **Builds the project's hosted services**, as every release does.
4. **Waits for an approval** where a Worker needs one ([below](#take-over-an-existing-worker)).
   Nothing is written to your account before it.
5. **Applies the Workers' [D1 migrations](#d1-migrations).**
6. **Deploys each Worker that changed**, in order, once the project's
   [GitHub checks](/docs/deployments/git#wait-for-github-checks) have passed where it waits for
   them, and applies its [triggers](#routes-schedules-and-other-triggers) after its upload.
7. **Publishes the hosted services**: the release goes live.

A Worker whose upload is unchanged is not deployed again, and a trigger is written only where its
declaration changed since Arkor last applied it. The release's page shows **Workers in your
Cloudflare account**: the builds, the Workers in deploy order, what the release does with each, and
why it waits. A release that waits reads **Awaiting approval**.

- **A failure stops the release where it is.** Workers deployed before it stay deployed, nothing
  after it is deployed, and the hosted services do not go live. The next release goes on from the
  first Worker that is not up to date.
- **Restoring a release** puts back its hosted services only: your Workers keep serving what was
  deployed last. To go back, revert the commit and release it.
- **A deployment uploaded over the API** never deploys or removes a Worker in your account.
- **A Worker the repository no longer builds** stays in your account as it is, with its routes,
  schedules and other triggers: Arkor never deletes a Worker. Once a push to the production branch
  releases without it, Arkor stops managing it, and deploying the name again later is a takeover
  again.

## Take over an existing Worker [#take-over-an-existing-worker]

Some deploys wait for an owner or admin before anything is written to your account. The release's
page says which, and why:

| The release's page says                                                                                          | When                                                                                                                                                                                                |
| ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Arkor has not deployed this Worker before: once it is deployed, its secrets become readable by the new code.** | The first release that deploys a name the account already has, always, even where nothing else differs.                                                                                             |
| **Changed outside Arkor since its last deploy.**                                                                 | Another version serves, or was uploaded, since Arkor's last deploy: a deploy from the Cloudflare dashboard or Wrangler, a gradual deployment, a rollback there.                                     |
| **A Durable Object class in the account is about to be deleted, renamed or transferred.**                        | The deploy sends such a change. Deleting a class deletes its stored data ([Durable Object class exports](https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/)). |
| **This deploy starts sending a route or custom domain to this Worker that it does not receive now.**             | See [routes](#routes-schedules-and-other-triggers).                                                                                                                                                 |

An owner or admin reviews each Worker under **Show changes**, then approves with **Approve plan and
resume…**; the public API and Remote MCP do not approve a plan. Only owners and admins see the
changes: each binding the deploy removes (**Removed by
this deploy: the account has it and the upload does not**), adds, changes the type of or binds to
another resource, and each value that changes, which is never shown; the secrets the Worker keeps,
by name; each setting the deploy sets, resets to its default, or may reset — compatibility date and
flags, limits, placement, observability, Logpush and tail consumers; the Durable Object classes; the
resources checked; and the routes, schedules, queues and Workflows the deploy changes.

- **Secrets are kept, never sent.** Every deploy keeps the Worker's secrets, and the new code can
  read them. A secret the configuration's `secrets.required` lists that the Worker lacks stops its
  deploy: put it there first with `wrangler secret put`. A release cannot create a Worker that
  requires secrets: create the Worker and put its secrets first.
- **Variables are the configuration's.** A plain variable set on the Worker in the Cloudflare
  dashboard and missing from its Wrangler configuration is removed by the deploy; `keep_vars` is not
  supported. Put it in the configuration, or make it a secret.
- **Durable Object classes.** Legacy `migrations` are sent from the Worker's live tag on, as Wrangler
  sends them, and a live tag the configuration does not list is refused. Declarative `exports` are
  sent whole.
- **An approval holds for what was shown.** The release resumes, reads your account again, and goes
  on only where it prepares the same plan; if anything changed, it waits again. Right before each
  write the Worker is read again, and a change since fails the release with nothing of it written.
- **Cannot be deployed as it is.** A Worker marked so stops the release once the plan is approved,
  with the message shown. Fix the repository's configuration or the Worker in Cloudflare, then
  release again.

A Worker taken over is Arkor's to deploy from then on: later releases ask nothing more of it unless
it changes outside Arkor again. A deploy by hand afterwards — `wrangler deploy` in an emergency, say
— is such a change, and the next release waits for an approval.

## D1 migrations [#d1-migrations]

Each D1 binding's migrations, read as Wrangler reads them (`migrations_dir`, `migrations_pattern`,
`migrations_table`), are applied to the database its `database_id` names, before any Worker of the
release deploys, and for every Worker of the release, whether its code changed or not: a new SQL
file changes no upload.

- **Wrangler's history is the history.** The binding's `migrations_table`, `d1_migrations` unless it
  names another, is read and written as `wrangler d1 migrations apply` writes it
  ([D1 migrations](https://developers.cloudflare.com/d1/reference/migrations/)). You can go on
  listing and applying migrations with Wrangler, and a file Wrangler applied is not run again.
- **Three tables of Arkor's.** The database gains `_arkor_migration_receipts`,
  `_arkor_migration_fence` and `_arkor_migration_assertion`, where Arkor keeps its own record of the
  migrations it applies. Wrangler never reads them; leave them in place.
- **Adopting the history, once.** The first release that migrates a database Wrangler has migrated
  waits for an owner or admin to approve its history table: **An existing table, which these
  migrations did not create, becomes this database's migration history. Approve only if it records
  the migrations already applied.** The releases after it are not asked. The table must have
  Wrangler's columns and no others.
- **What waits for an approval.** A file that drops a table, sets `foreign_keys`, inserts data, adds
  a column that sets a value on existing rows, creates a unique, partial or expression index on an
  existing table, adds a foreign key whose parent table is not named as one table name, or needs a
  manual review waits for **Approve migrations and resume…**, its SQL shown with **Review SQL**.
- **Migrations come first.** They run while the code deployed before still serves, and one applied
  stays applied if a later step fails. A migration the new code must be live for goes in a later
  release.
- **One database, one declaration.** Workers that migrate the same database declare the same history
  table and files.

## Routes, schedules and other triggers [#routes-schedules-and-other-triggers]

After each Worker's upload, the release applies what `wrangler deploy` applies after it: workers.dev
and Preview URLs, cron schedules, routes and custom domains, queue consumers and Workflows. Only a
family whose declaration changed since Arkor last applied it is written.

- **workers.dev** is as `workers_dev` says; left out, it is on only where the Worker has no routes,
  as Wrangler decides. **Preview URLs** are as `preview_urls` says; left out, they follow
  workers.dev, which Arkor sends explicitly where `wrangler deploy` would leave the setting as it
  is. Cloudflare now calls them
  [Version URLs](https://developers.cloudflare.com/workers/versions-and-deployments/version-urls/).
- **Cron schedules**: `triggers.crons` is the Worker's whole set, `[]` removing every schedule. Left
  out, the schedules stay as they are.
- **Routes and custom domains** in `routes` are the Worker's whole set: a route taken out of the
  configuration is removed from the Worker, and `routes: []` removes every one. Left out
  altogether, they are left alone. This differs from `wrangler deploy`, which writes routes only
  where the configuration lists at least one, and so never removes the last.
- **A new route waits once.** A route or custom domain the Worker does not receive yet waits for an
  owner or admin's approval; once applied, later releases ask nothing of it. Removing one waits for
  nobody.
- **Nothing is taken from another Worker.** A route pattern the zone already has, for another Worker
  or for none, a hostname that is another Worker's custom domain, or one with DNS records of its own
  stops the release: Arkor sends no override. Other Workers' routes and custom domains that match
  the same hostname are listed with the change, since a route
  [takes precedence](https://developers.cloudflare.com/workers/configuration/routing/routes/) over a
  custom domain on the same hostname.
- **One release at a time in an account.** Two projects that deploy into one Cloudflare account
  write its routes and custom domains, queue consumers and Workflows one release at a time, so a
  release can wait briefly for another project's. It then reads the account again, and a name the
  other release took meanwhile is another Worker's.
- **Queue consumers** are created or updated as `queues.consumers` declares them. Arkor removes only
  a consumer it attached, once the configuration stops declaring its queue; one attached by hand to
  a queue the configuration does not declare is never removed, and `wrangler deploy` removes none.
  A consumer the Worker already has on a declared queue is managed from then on, as Arkor's own.
  Arkor creates no queue: a declared queue or dead-letter queue the account lacks stops the release,
  and so does a queue another consumer holds, since
  [a queue has one active consumer](https://developers.cloudflare.com/queues/reference/how-queues-works/).
- **Workflows** a Worker owns are put as its configuration declares them, whenever they change. One
  the configuration stops declaring stays in your account: deleting a Workflow
  [deletes its instances](https://developers.cloudflare.com/workflows/reference/data-location/), so
  remove it by hand once you no longer need it. A Workflow of the name another Worker runs stops the
  release. Workflows need the account's workers.dev subdomain: register it in the Cloudflare
  dashboard if the account has none.
- **Bounds.** For one Worker, a release makes at most 100 route and custom domain changes, and
  manages at most 15 queues, dead-letter queues included, and 15 Workflows. Past them, apply the
  changes in parts, or once by hand with Wrangler. The lookups a Worker's triggers need in the
  account are bounded too: naming each route's `zone_name` or `zone_id` saves them.
- **Renaming a Worker that has routes** gives the new name routes the old Worker still holds, which
  stops the release. Remove them from the old Worker in the Cloudflare dashboard first: a
  `wrangler deploy` with no routes leaves them.

## Not supported [#not-supported]

- Static assets (`assets`), Workers Sites (`site`) and Pages projects.
- Containers, and Durable Objects that attach one.
- Rolling a Worker back: restoring a release puts back its hosted services only. Revert the commit
  instead.
- Previews of these services, and Next.js, SvelteKit or SSR framework apps.
- A binding without its resource, which Wrangler would provision: bind an existing resource by its
  identifier. A KV namespace's or Hyperdrive configuration's is 32 hexadecimal characters, a D1
  database's a UUID.
- `keep_vars`, `unsafe`, service-worker format Workers, first-party Workers and `logfwdr`.
- Artifacts event triggers (`triggers.events`) and Email Routing addresses (`addresses`).
- The FedRAMP High compliance region.
- A Workflow binding that configures another Worker's Workflow.
- More than 50 Workers in a release.
- Skipping the first deploy of a takeover: the first release deploys each Worker it takes over once,
  even where its code is the same.

Bindings Arkor cannot look up are deployed without the check, shown as **Not checked: Arkor cannot
look this up**: AI Search, Agent Memory, Artifacts, Flagship, VPC, Pipelines and k2 bindings, and
service bindings to Workers in other accounts.

## When a release fails [#when-a-release-fails]

A failed release names the failure in a line such as `cloudflare_account_required: …`, as
[other failures](/docs/deployments/troubleshooting#read-the-failure) do.

| The line says                                                                                                                                                                                | What to do                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `backend_unsupported: Deploying services to your own Cloudflare account is not available yet (…)`, or `backend_unsupported: this deployment does not offer direct deployments to Cloudflare` | This Arkor deployment does not offer it. Set **Deploy to** back to **Arkor**, or take the services out of the configuration.                                                                                                      |
| `cloudflare_account_required: … choose the Cloudflare account this project deploys to in Settings › Services`                                                                                | Choose the account in **Cloudflare account**, then release again.                                                                                                                                                                 |
| `cloudflare_not_connected: connect Cloudflare for your team on its Domains page, …`                                                                                                          | Connect Cloudflare on **Domains** with the deployment permissions, then release again.                                                                                                                                            |
| `cloudflare_reconnect: …`                                                                                                                                                                    | Reconnect Cloudflare — **Reconnect Cloudflare** on the **Cloudflare account** card, or **Reconnect** on **Domains** — keeping the deployment permissions, D1's among them, then release again.                                    |
| `cloudflare_account_changed: …`                                                                                                                                                              | The project's account changed while the release ran: release again.                                                                                                                                                               |
| `bundle_invalid: arkor.jsonc: api: a service deployed to your Cloudflare account cannot have public routes`, and the file's other lines about such a service                                 | See [Send a service to your account](#send-a-service-to-your-account): such a service has no public routes, connections, resource assignments or Container settings in Arkor, and is neither the primary nor the default service. |
| `bundle_invalid: workerOrder: …`                                                                                                                                                             | List every Worker the services build, once each, and nothing else.                                                                                                                                                                |
| `build_failed: these Workers cannot be deployed directly: …`                                                                                                                                 | Each line after it names a Worker's configuration and what it declares that direct deployment does not take; see [Not supported](#not-supported).                                                                                 |
| `unsupported_framework: … direct deployment builds native Workers only …`                                                                                                                    | Keep the app on Arkor's hosting: set **Deploy to** back to **Arkor**.                                                                                                                                                             |
| `binding_unavailable: the Worker … which your Cloudflare account does not have; …`                                                                                                           | Create the resource in the account — for a Worker the binding names, deploy that Worker there first — or change the binding in the Worker's Wrangler configuration.                                                               |
| `binding_unavailable: the Worker … which your Cloudflare account cannot have: …`                                                                                                             | Bind the identifier of a resource the account has: a KV namespace's or Hyperdrive configuration's is 32 hexadecimal characters, a D1 database's a UUID.                                                                           |
| `binding_unavailable: the Worker … names the Worker …, which deploys after it …`                                                                                                             | Put that Worker before it in `services.workerOrder`, or deploy it first.                                                                                                                                                          |
| `binding_unavailable: the Worker … requires the secrets …`                                                                                                                                   | Put the secrets on the Worker with `wrangler secret put`, creating the Worker first where it is new.                                                                                                                              |
| `binding_unavailable: your Cloudflare account has no queues …`                                                                                                                               | Create the queues, dead-letter queues included: Arkor creates none.                                                                                                                                                               |
| `direct_worker_owned: …`                                                                                                                                                                     | Another project deploys the name in that account: rename the Worker, or deploy it from that project.                                                                                                                              |
| `direct_worker_changed: the Worker … changed in your Cloudflare account …`, or a line saying a Worker's triggers did                                                                         | The Worker changed in Cloudflare after the release was prepared: release again, and approve again where it asks.                                                                                                                  |
| `direct_worker_changed: the Worker … is not in your Cloudflare account, though its upload is what Arkor deployed there last; …`                                                              | It was deleted in Cloudflare: change its code or configuration so that the release uploads it again, then release.                                                                                                                |
| `direct_trigger_conflict: …`                                                                                                                                                                 | A route, custom domain, queue or Workflow is another Worker's, or a hostname has DNS records of its own: remove it there, or change the configuration.                                                                            |
| `bundle_invalid: …` saying a Worker has more routes, custom domains, queues, Workflows or lookups than a release reads or applies                                                            | Apply the changes in parts, or once by hand with Wrangler. Where the line is about lookups, name each route's `zone_name` or `zone_id`.                                                                                           |
| `cloudflare_unavailable: …` or `rate_limited: …`                                                                                                                                             | Cloudflare did not answer, or the limits stayed spent for half an hour: release again later.                                                                                                                                      |
| `cloudflare_refused: …`                                                                                                                                                                      | Cloudflare refused a call; the line gives its status and Cloudflare's codes.                                                                                                                                                      |

---

Text on this page: Creative Commons Attribution 4.0 International (https://creativecommons.org/licenses/by/4.0/) by Arkor, 2026.

Code samples on this page: MIT License (https://opensource.org/license/mit) by Arkor, 2026.

Scope and exceptions: https://www.arkor.dev/license
