Setup
Everything you need before deploying to Cloudflare: the alchemy package, a Cloudflare account, and stored credentials.
Install
Section titled “Install”Install alchemy@next and effect@>=4.0.0-beta.93|| >=4.0.0
in your project:
bun add "alchemy@next" "effect@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-bun@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-node@>=4.0.0-beta.93|| >=4.0.0"npm install "alchemy@next" "effect@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-bun@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-node@>=4.0.0-beta.93|| >=4.0.0"pnpm add "alchemy@next" "effect@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-bun@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-node@>=4.0.0-beta.93|| >=4.0.0"yarn add "alchemy@next" "effect@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-bun@>=4.0.0-beta.93|| >=4.0.0" "@effect/platform-node@>=4.0.0-beta.93|| >=4.0.0"Create a Cloudflare account
Section titled “Create a Cloudflare account”If you don’t have one yet, sign up for Cloudflare — the free plan is enough for everything in the tutorial.
Connect alchemy to Cloudflare
Section titled “Connect alchemy to Cloudflare”There is no separate credentials step. The first time you run
alchemy deploy (or plan, dev, destroy), alchemy walks each
provider registered in your stack through an interactive login. For
Cloudflare you can:
- Sign in with OAuth — opens the browser, no tokens to manage.
- Paste an API token — if you prefer explicit, scoped tokens.
The OAuth flow asks whether you want to customize scopes — answer yes to pick exactly which ones to grant at a multiselect prompt (the default set covers typical use).
Either way the result is saved to your default
profile at ~/.alchemy/profiles.json — no
environment variables and no wrangler login required.
To run the flow explicitly, or re-run it later:
# Refresh credentials for the current profilealchemy login
# Re-run the interactive setup (e.g. switch from OAuth → API token)alchemy login --configurelogin imports your stack file to discover which providers are
needed, so the prompts match the providers you actually use.
Profiles
Section titled “Profiles”A profile is a named bundle of credentials. Every command uses the
profile named default unless you pass --profile <name> or set
$ALCHEMY_PROFILE — handy for separating work and personal
accounts, or staging and prod credentials:
# Log into a separate profilealchemy login --profile prod --configure
# Deploy with italchemy deploy --stage prod --profile prodInspect what’s stored (credentials are redacted) with:
alchemy profile showSee Profiles for the full picture.
Where next
Section titled “Where next”- Tutorial part 1 — create a Stack, deploy your first resource.
- Cloudflare overview — the map of resources and guides.
- Secrets & env — wire
.envvalues and secrets into your Workers (deploy credentials live in your profile; app secrets are bindings).