> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hoista.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare

> Connect a Cloudflare account to deploy Workers and manage its storage and zones.

Hoista finds the Workers, Pages projects, D1 databases, KV namespaces, R2 buckets and zones in a Cloudflare account. It deploys Workers, rolls them back, and sets their variables, secrets and custom domains.

## Connect

In Desktop, open **Accounts**, choose Cloudflare, and paste an API token:

1. Open [API Tokens](https://dash.cloudflare.com/profile/api-tokens): **My Profile → API Tokens → Create Token → Start from scratch**. Name it Hoista.

2. Add these permissions.

   | Scope | Permission | Access | Needed for |
   | - | - | - | - |
   | Account | Workers Scripts | Edit | Always |
   | Account | Workers R2 Storage | Edit | Always |
   | Account | Account Settings | Read | Always |
   | Account | Account Analytics | Read | Always |
   | Account | Workers Tail | Read | Always |
   | Account | Workers Observability | Edit | Log history |
   | Account | Billing | Read | Always |
   | Account | D1 | Edit | D1 databases |
   | Account | Workers KV Storage | Edit | KV namespaces |
   | Account | Cloudflare Pages | Edit | Pages projects |
   | Account | Workers Builds Configuration | Edit | Builds from Git |
   | Account | Containers | Edit | Containers |
   | Account | Queues | Edit | Queues |
   | Account | Basin Pipelines | Edit | Pipelines |
   | Account | Vectorize | Edit | Vectorize indexes |
   | Account | Workers AI | Edit | Workers AI |
   | Account | Secrets Store | Edit | Secrets Store |
   | Account | Browser Run | Edit | Browser Rendering |
   | Account | Hyperdrive | Edit | Hyperdrive |
   | Account | Email Routing Addresses | Edit | Email Routing |
   | Zone | Zone | Edit | Your own domain |
   | Zone | DNS | Edit | Your own domain |
   | Zone | Workers Routes | Edit | Your own domain |
   | Zone | SSL and Certificates | Edit | Your own domain |
   | Zone | Cache Purge | Purge | Your own domain |
   | Zone | Email Routing Rules | Edit | Email Routing |

3. Paste the token into Hoista and pick the account.

![Cloudflare’s User API Tokens page](https://mintcdn.com/mirt-lab/bTbgaR1vteaGCpS-/assets/tokens/cloudflare-token.webp?fit=max\&auto=format\&n=bTbgaR1vteaGCpS-\&q=85\&s=e81217c7595bb82b1f8d05322461f07a)

Cloudflare’s User API Tokens page, captured November 2026. Personal details are blurred. If yours looks different, the names in the steps still match.

From the CLI:

```bash theme={null}
hoist accounts add cloudflare
```

It asks for the token in a hidden prompt and finds the account from it. In scripts, use `hoist accounts add cloudflare --name NAME --token-stdin`, and add `--account <account-id>` if the token reaches more than one account. The account ID is the long ID in your dashboard address.

## What you can do

* Deploy a Worker from a folder with `hoist deploy`, and roll back with `hoist rollback`.
* Create a D1 database or an R2 bucket.
* Set variables and secrets on the **Variables** tab or with `hoist env`.
* Add custom domains on your zones with `hoist domains add`.
* Follow a Worker's live logs on the **Logs** tab or with `hoist logs --follow`.
* See metrics, and daily usage with `hoist usage`.
* Use the **Cloudflare** tab for Cloudflare's own settings and actions, such as Cron Triggers, DNS records and D1 Time Travel.
* See what Cloudflare has billed the account on **Billing**.

## Bring in existing resources

Hoista looks for resources when you connect. In Desktop, add them as described in [Bring in an existing project](https://docs.hoista.dev/guides/import-apps.md). From the CLI:

```bash theme={null}
hoist import --list
hoist import <resource-id> --new my-app
```

Projects start in **watching** mode. Run `hoist projects manage my-app` when you want Hoista to make changes. If something is missing, check the token's permissions and run `hoist accounts refresh <account>` with the name or ID from `hoist accounts`.

## Related

> [card] [Providers](https://docs.hoista.dev/providers/overview.md)
>
> What Hoista supports on each provider.

> [card] [Connect hosting accounts](https://docs.hoista.dev/guides/accounts.md)
>
> Connect, check and rotate accounts.

> [card] [Bring in a project](https://docs.hoista.dev/guides/import-apps.md)
>
> Add what an account already runs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.