Setup
You need:
- Node.js 24.11.1+ or Bun
- a Daytona account: sign up at app.daytona.io
- for the examples, a Cloudflare account to host the Worker
Use a separate organization for tests: they create and delete sandboxes, snapshots, volumes, secrets, keys and organizations.
Add the provider
Section titled “Add the provider”pnpm add https://pkg.alchemy.run/@alchemy.run/daytona/pr:3743:41147c9bun add https://pkg.alchemy.run/@alchemy.run/daytona/pr:3743:41147c9npm install https://pkg.alchemy.run/@alchemy.run/daytona/pr:3743:41147c9yarn add https://pkg.alchemy.run/@alchemy.run/daytona/pr:3743:41147c9Then add Daytona.providers() next to your cloud’s providers:
import * as Cloudflare from "@alchemy.run/cloudflare";import * as Daytona from "@alchemy.run/daytona";import * as Alchemy from "alchemy";import * as Effect from "effect/Effect";import * as Layer from "effect/Layer";
export default Alchemy.Stack( "App", { providers: Layer.mergeAll(Cloudflare.providers(), Daytona.providers()) }, Effect.void,);Sign in
Section titled “Sign in”alchemy profile edit --add DaytonaPick Sign in. Alchemy opens Daytona’s device login, the same one daytona login uses, and asks which organization to use if you belong to several. The session refreshes itself.
Signing in is what lets Alchemy create a key for each Worker that uses a binding. Daytona only lets a signed-in user create API keys, organizations, roles and invitations.
Paste an API key instead
Section titled “Paste an API key instead”Pick API key and paste a key from Keys in the dashboard. An API key covers sandboxes, snapshots, volumes, secrets and registries.
It can’t create the per-Worker keys bindings need unless Daytona has enabled managed API keys for your organization. Give that key every permission, including manage:api_keys.
Deploy from CI
Section titled “Deploy from CI”With CI=true, Alchemy reads DAYTONA_API_KEY instead of a profile, so set it as a secret in your CI. A Stack with bindings needs a key with manage:api_keys. DAYTONA_ORGANIZATION_ID picks the organization when the key’s own isn’t the one you want, and DAYTONA_API_URL is only for a self-hosted Daytona. See CI.
Organizations and API keys covers where a deploy goes and the key each Worker gets. Then build the tutorial.