Run OctaFuse on Cloudflare without managing a server
Published
Independent developers and small teams often combine coding plans, token plans, official APIs, aggregators, and self-hosted models. Every upstream adds another Base URL, key, quota, and price to maintain.
A self-hosted gateway turns those scattered resources into one client-facing URL and user key. OctaFuse can run on Cloudflare Workers + D1, so small deployments do not need a continuously managed server.
Deployment shape
Section titled “Deployment shape”AI Client │ user API key ▼Proxy Worker ───┐ ├── shared D1 databaseAdmin Worker ───┘ ▲ │ browser login / MASTER_KEYOperatorProxy serves model and Tools traffic. Admin provides the configuration and operations control plane. Both Workers must bind to the same D1 database.
From an empty database to the first request
Section titled “From an empty database to the first request”The main path is:
- Prepare a Cloudflare account, Git, Node.js, and npm.
- Clone the repository and authenticate Wrangler.
- Run the bootstrap flow to create D1, Proxy, and Admin.
- Sign in to Admin and rotate the development Master Key immediately.
- Configure a Provider, Model, and Route.
- Create a user and issue a user API key.
- Verify
/v1/modelsor send a Chat Completions request.
An empty /catalog/models response immediately after deployment is expected: the database does not yet contain your Providers or active Routes.
Keep ADMIN_PASSWORD, the Admin API MASTER_KEY, and user API keys separate. They authenticate different surfaces and should never be substituted for one another.
Learn more about OctaFuse or explore the source:
If OctaFuse is useful to your project, consider giving the repository a Star. Your interest and feedback help us keep improving deployment and the self-hosted experience.