Skip to main content

Set Up a Decisions Relay

Deploy a Decisions relay into your own Cloudflare account from Daintree or the CLI, check an existing relay, choose its address before pairing, and update or remove it.

Reviewed

Decisions needs a relay: a small Cloudflare Worker that holds encrypted questions and answers until the other side picks them up, and pushes a notification to your phone. It runs in your own Cloudflare account, not ours. You can have Daintree deploy one for you, connect one you already have, or deploy it yourself from the command line. This page covers all three, plus keeping it updated and removing it.

Cloudflare Account and Costs

A relay is three things in your Cloudflare account:

  • A Worker, which serves the relay's API and the phone app. Daintree suggests daintree-decisions- followed by eight random hex characters as its name, and you can change it.
  • A Durable Object (DecisionRoom), which keeps the relay's state: who owns it, which devices are paired, and the encrypted questions and answers.
  • A private R2 bucket, named after the Worker by default, for encrypted screenshots and photos.

As of November 2026, Cloudflare's free plan is enough for one person's questions. Two caveats. R2 has to be enabled on the account, and Cloudflare requires a payment method on file for that even when you stay inside the free allowance. And screenshots are what use storage, so an agent that attaches large images to every question uses more of it. Cloudflare's limits and prices change, so check the current Workers, Durable Objects and R2 pricing rather than taking a number from here, and set a budget alert in Cloudflare if a surprise bill would bother you. Nobody can promise it stays at zero. The relay's operations guide covers what it stores and for how long.

Guided Deploy

The easiest way to get a relay is to let Daintree start the deploy. You need Node.js 22 or later, and a local project or scratch window, because the deploy runs in a terminal there.

  1. Open Settings → Integrations → Decisions with Decisions turned on, and under Connection choose Don't have a relay yet? then Guided deploy.
  2. A terminal titled Deploy Decisions relay opens in the active worktree and runs the Decisions command-line tool's deploy from your home folder, using the latest version published to npm.
  3. Wrangler, Cloudflare's own tool, signs you in to Cloudflare in your browser. Daintree never sees a Cloudflare token; Wrangler keeps its own sign-in.
  4. The tool asks its questions one at a time: which Cloudflare account, the Worker and bucket names, whether to turn on dictation transcription (xAI or OpenAI) and transcript cleanup (Anthropic or OpenAI, and which model), and the API key for each provider you choose.
  5. It shows a summary. Nothing is created in Cloudflare until you confirm it.

If you've set up voice input in Daintree, those settings fill in the dictation answers, and a key Daintree already holds shows as present rather than in the clear. You can change any of them. Keys reach the deploy over a private local channel, never on its command line, in its environment or on screen, and only the keys for the providers you choose are set on the Worker. Dictation is optional and is the one part of Decisions that isn't end-to-end encrypted; see Dictating on Your Phone before you turn it on.

Note
A window on a Remote Host doesn't offer Guided deploy, Update relay or Remove relay…. Its terminals run on the host, which can't reach the local channel the deploy reports back on, and its relay belongs to the host. Start these from a local window.

After the Deploy

When the deploy succeeds, it hands Daintree the Worker's address and a one-time claim secret over that same channel. The terminal never shows the secret. Daintree checks the new relay and claims it straight away, whether or not Settings is open, and Connection moves on to Pair a phone.

  • The claim didn't finish. If the keychain refused, the relay didn't answer or the claim was interrupted, Connection says why and offers Finish the claim. Daintree holds the secret in memory until the relay is claimed, you start another deploy, turn Decisions off or quit. It never writes it to disk.
  • The deploy was canceled or failed. Daintree never claims it on its own. If it got as far as creating the Worker, Use this relay checks it so you can claim it yourself.

Daintree never saves the deploy terminal's screen, so after a restart that pane comes back empty, and a crash never runs the deploy again.

Connect an Existing Relay

If you already have a relay, enter its address in Relay URL, for example https://decisions.example.workers.dev, and press Check. Daintree reads the relay's health and info endpoints and reports what it found:

ResultWhat to do
<host> is ready to claimClaim it with its claim secret. See Claim or Restore.
<host> is claimedIt already has an owner, perhaps your other computer. Restore that identity from a recovery kit.
<host> has no claim secret setThe relay was deployed without one. Set CLAIM_SECRET on the Worker, then check again.
<host> speaks a protocol Daintree doesn'tOne side is too old for the other. The result says which side to update when it can tell.
<host> isn't a Decisions relayThe address answers, but not as a relay. Check the URL.
Couldn't reach <host> or <host> answered with an errorCheck the address and your connection, then try again.

Only https:// addresses are accepted, apart from plain http:// to localhost or 127.0.0.1 for a relay you're running on this computer with wrangler dev. An older relay that still shares a protocol with Daintree keeps working, and is reported as behind Daintree rather than as broken.

Deploy It Yourself

You don't have to start the deploy from Daintree. The relay's self-hosting guide covers three other ways:

MethodHowThe claim secret
Deploy to Cloudflare buttonFrom the repository's README. Cloudflare builds and deploys it for you.You make one up when Cloudflare asks: a long random string of at least 16 characters. Keep it.
Command linenpx @daintreehq/decisions-cli deploy, with --dry-run to see the plan first. Needs Node.js 22 or later; no clone.Printed once at the end. Copy it then, because it isn't saved anywhere.
ManualClone, build, then wrangler r2 bucket create and wrangler deploy.You generate it and set it with wrangler secret put CLAIM_SECRET.

Then connect it with Relay URL and Check as above, and claim it with that secret.

Custom Domains

Tip
Choose the relay's address before you claim it. Browsers tie the installed phone app, its push subscription and its keys to the address it was installed from, so moving the relay to another domain later means pairing every phone again, and a recovery kit only restores against the address it was saved for.

A custom domain on a Worker needs the domain's zone to be active on Cloudflare. The self-hosting guide has the details.

Cloudflare Access

Putting Cloudflare Access in front of the relay is optional. If you do, allow the paths the installed app and its service worker need without an Access login (/api/*, which has its own signatures, /sw.js, /manifest.webmanifest and /assets/*), or push and sync will fail. Test it with the app installed on your phone, not just in a browser tab.

Update the Relay

Nothing updates the relay on its own. Connection offers Update relay for the relay this computer is connected to: prominently when the check finds the relay older than Daintree and sharing no protocol with it, and otherwise as a way to look for a newer release. For a relay this computer isn't connected to, run the update from a terminal instead: npx @daintreehq/decisions-cli@latest update --url https://<your-relay>.

  1. Press Update relay. Settings closes, and a terminal titled Update Decisions relay opens in the active worktree.
  2. Wrangler signs you in to Cloudflare in your browser.
  3. The tool shows the relay's version, the release it would move to and what changed, limited to releases that speak a protocol this Daintree does. It changes nothing until you confirm.

An update keeps the relay's claim, paired devices, questions and answers, bucket, secrets and settings, and it refuses a Worker set up differently from what the release expects rather than overwrite it. When the command ends, Settings checks the relay again and tells you what happened: the version it moved to, that it was left as it was (already current, nothing compatible, or canceled), or that the update failed or was stopped, with the version the relay reports now. The connection doesn't change either way. The pane's Open Decisions settings banner takes you back.

Remove the Relay

Warning
Removing a relay deletes it from your Cloudflare account, with every question, answer and attachment it stores. Every phone paired with it stops working, and it can't be undone.

Remove relay… is in Connection, beside Disconnect relay. It's offered for the relay this computer is connected to, and for a relay a Check just found unclaimed or owned by someone else, so you can clean up a relay whose keys are lost. It needs a local window with a project open, because the removal runs in a terminal you watch, and an https:// address on a real domain name, not a local test relay.

  1. If you want a copy of this computer's history, press Export decision history under Data first. The export needs this computer's Decisions keys, and a successful removal deletes them.
  2. Press Remove relay…. A dialog titled Remove '<host>' from Cloudflare? explains that it deletes the relay's Worker, the questions, answers and attachments it stores, and its R2 bucket.
  3. Press Open guided removal. A terminal titled Remove Decisions relay opens, signs you in to Cloudflare, and lists what it found.
  4. Type the Worker's name to confirm, then answer yes. It deletes the Worker first, which deletes its Durable Object storage with it, then empties and removes the bucket.

If a step fails, the terminal says what's left. Run the removal again to finish; it remembers the bucket's name even once the Worker is gone.

This Computer's Keys and History

For the relay this computer is connected to, the dialog has a checkbox, Also delete this computer's decision history, off by default. Kept history stays tied to the old relay, so a new relay won't connect until it's deleted. Export it before you start the removal if you want a copy.

Daintree forgets the relay and removes this computer's Decisions keys only when the removal finishes successfully. If you cancel it, it fails, or Daintree quits partway through, this computer keeps its keys and its record of the relay.

Two other actions sound similar and do much less. Delete relay data deletes the questions, answers and attachments on the relay but keeps the Worker and your paired phones. Disconnect relay removes this computer's keys and leaves the relay alone. Turning Off and Removing Data compares all of them.