Quickstart
This page is the short version. The deploy guide explains every step, including how to back up the root key; read it before you store real secrets.
You need a Cloudflare account on the Workers Paid plan (password hashing needs more CPU per
login than the Free plan allows) and openssl.
1. Deploy the Worker
Section titled “1. Deploy the Worker”With the button
Section titled “With the button”Cloudflare copies the repository to your account, creates the database and the queues, and asks for one secret, the root key. Generate it first, and back it up offline before you paste it:
umask 077 && openssl rand -base64 32 > anchor-root.key # ANCHOR_ROOT_KEY: back this file up offlineLeave the build and deploy commands as they are: the deploy command applies the migrations, then deploys.
By hand
Section titled “By hand”Needs Node.js 22+ and pnpm. Every command runs from the repository root:
git clone https://github.com/sotarak/anchor.git && cd anchorpnpm installpnpm exec wrangler loginpnpm exec wrangler d1 create anchor # add the printed database_id to wrangler.jsoncpnpm exec wrangler queues create anchor-reencryptpnpm exec wrangler queues create anchor-reencrypt-dlq
umask 077 && openssl rand -base64 32 > anchor-root.key # back this file up offline firstpnpm exec wrangler secret put ANCHOR_ROOT_KEY < anchor-root.keyrm anchor-root.key
pnpm deploy:worker # builds, applies migrations, deploysLosing the root key makes every stored secret unreadable, permanently. Back it up before the rm,
somewhere other than this machine.
2. Create the first owner
Section titled “2. Create the first owner”Open https://<your-worker>/setup as soon as the deploy finishes and create the owner account: the
first account created there owns the instance. Then create a project and its environments in the
dashboard.
3. Use the CLI
Section titled “3. Use the CLI”npm install -g @anchor-secrets/cli # Node.js 22.19+brew install sotarak/tap/anchor # macOS and Linuxcurl -fsSL https://sotarak.github.io/anchor/install.sh | sh # standalone binaryPick one. The CLI guide also covers release binaries.
anchor login --api-url https://<your-worker> # approve the code in the browsercd my-appanchor init # pick the project and default environmentanchor secrets set DATABASE_URL # hidden promptanchor run -- npm start # npm start sees DATABASE_URLanchor login opens the dashboard in your browser and shows a code; check that the code on the
page matches your terminal, then Approve. Over SSH or in a container, open the printed URL on
any device. anchor login --with-password keeps the email and password prompt.
Next steps: the CLI guide, using Anchor in CI, and rate-limiting the auth endpoints.