Skip to content

Requirements

What you need on your machine and your Cloudflare account before you run ochost init.

Updated

ochost init checks these items and stops with a fix line if one is missing.

Your machine

Need Detail
Node Version 22.18 or later. Check with node -v. Install from nodejs.org.
Docker Running, because wrangler builds the container image on this machine. init and deploy need it. Check with docker info. Install from docs.docker.com.
wrangler login Run npx wrangler login, and select Allow in the browser that opens. On a machine with no browser, wrangler prints a URL that you open on another machine.
OS Linux amd64 is tested. macOS and Windows are not.
The CLI npm install -g oc-workers. The package holds the Worker and image sources that it deploys.

Your Cloudflare account

Need Detail
Workers Paid $5 a month. Containers need it. Without it, init stops with “account is not on Workers Paid”.
R2 Enabled on the account. Interactive init prints a dashboard link and waits until you enable R2. Non-interactive init stops with “R2 is not enabled on this account”.
workers.dev subdomain If the account has none, interactive init asks you for a name. Non-interactive init needs --subdomain <name>.

No AI token

init needs no Cloudflare API token. Model calls run on the Worker’s Workers AI binding, which acts as your account, so Workers AI usage is billed to the account.

Two items are optional:

  • An AI Gateway. The Worker uses default, which Cloudflare makes on its first request. To use another gateway, make it in the dashboard first. See Models.
  • A token. Pass --ai-token-file <file> only if you want init to list or create gateways, or you want to call the gateway directly from your machine. The token needs AI Gateway Read, Edit and Run. The CLI uses it and then drops it: it does not store the token or send it to the Worker.

Next

Go to Quickstart.

Type to search…

↑↓ navigate↵ selectEsc close