Add or change a key after the install
Add the Gemini, Anthropic, Resend, Slack or Google Drive key to your Ledger in the Cloudflare dashboard, without running the installer again.
Updated 2026-10-17
The Ledger reads its keys from its Worker in Cloudflare. A Worker is the program that runs the Ledger. You add or change a key there.
Where
- Sign in at dash.cloudflare.com.
- In the left menu, under Build, open Compute > Workers & Pages and click mtn-open-ledger.
- Open the Settings tab. The first section is Runtime variables and secrets.
- Click Add variable. Type the name under Key and paste the value under Value. For a key, tick Secret. For a plain setting, leave it clear.
- Click Add variable and deploy. The Ledger uses the new value within a minute.
To change a value that is already there, click the pencil on its row, paste the new value and deploy.
Cloudflare then shows a banner: "Update your Wrangler configuration with these changes to keep deployments in sync." It is meant for people who deploy from source code. Close it with the X. The installer keeps your values when you update.
Names are exact, in capital letters.
Which names
- Receipt reading with Gemini: Secret
GEMINI_API_KEYwith the key, and the plain variableAI_PROVIDERwith the valuegemini. - Receipt reading with Anthropic: Secret
ANTHROPIC_API_KEYwith the key, and the plain variableAI_PROVIDERwith the valueanthropic. If the note on an expense says the key is not tied to a workspace, add the plain variableANTHROPIC_WORKSPACE_IDwith the workspace id (wrkspc_...) from console.anthropic.com. - A different reading model: the plain variable
GEMINI_MODELorANTHROPIC_MODELwith the model name. Use it when reading is slow or a model is retired. - Email sending: Secret
MAIL_API_KEYwith the Resend key, and the plain variableMAIL_FROMwith the sender, for exampleAcme Ltd <billing@acme.co.il>. - Slack alerts: Secret
SLACK_WEBHOOK_URL. - Google Drive expenses: Secret
GOOGLE_SERVICE_ACCOUNT_JSONwith the whole content of the JSON key file, from the first{to the last}. For a folder shared by link, the secretGOOGLE_API_KEYwith a Google API key instead. - MCP token: Secret
MCP_TOKEN, see Connect Claude.
Rules
- Never paste a key in an email, a chat or a document. Paste it only into Cloudflare or the installer.
- If a key leaks, make a new one at the provider, delete the old one there, and replace it here.
Still stuck? Write to us from the pricing page.
More help
- Before you install: what you need
- Install Open Ledger IL step by step
- Create the Cloudflare API token
- First sign-in and setup
- Give your accountant or assistant access
- Connect to the Tax Authority for allocation numbers
- From quote to receipt: your first documents
- Digital signatures: what the Tax Authority requires and how the Ledger meets each rule
- Take payments with Grow, Cardcom or another provider
- Get your expenses into the Ledger
- Send documents by email, and keep them out of spam
- Connect Claude or another AI app (MCP)
- API for other apps
- Updates and backups
- Common problems and how to fix them
- The Ledger for accounting firms