A coding agent that lives inside Cloudflare
It exists to run OpenCode as a persistent, containerized coding agent on Cloudflare, with auth, S3 storage, and tunneling wired in.

What it does
Cloud Code is a deployment template—kindly put, glue code—that drops the OpenCode intelligent coding agent into Cloudflare Containers, using a Cloudflare Worker as the HTTP front door. It handles the plumbing you’d rather not write: HTTP Basic Auth, mounting S3-compatible storage as a local filesystem via TigrisFS, and pre-installing cloudflared for quick tunneling. The container runs a Python-plus-Node base image where the agent operates on a workspace that persists across restarts.
The interesting bit Instead of treating Cloudflare as a stateless edge, the project leans into its newer container platform to host a long-running, stateful agent with actual disk-backed workspace. That’s a different posture than the usual ephemeral serverless function.
Key highlights
- Hybrid Workers/Containers architecture: the Worker routes traffic while the container runs the agent
- S3 or R2 buckets mount as
/root/s3/workspacevia TigrisFS, with OpenCode config persisted at/root/s3/.opencode - Optional HTTP Basic Auth via the
SERVER_PASSWORDenvironment variable cloudflaredpre-installed for exposing container ports to the public internet without public IPs- Auto-seeds the workspace from a preset directory if the S3 bucket (or prefix) is empty
Caveats
- This is largely an integration recipe, not a standalone framework; the heavy lifting is done by OpenCode, TigrisFS, and Cloudflare Containers
- Persistence requires manual S3/R2 configuration; without it, the container falls back to ephemeral local storage
Verdict Worth a look if you want a personal OpenCode instance running on Cloudflare’s stack with minimal wiring. Skip it if you’re not already bought into Cloudflare’s container ecosystem or need a fully local agent.
Frequently asked
- What is miantiao-me/cloud-code?
- It exists to run OpenCode as a persistent, containerized coding agent on Cloudflare, with auth, S3 storage, and tunneling wired in.
- Is cloud-code open source?
- Yes — miantiao-me/cloud-code is open source, released under the MIT license.
- What language is cloud-code written in?
- miantiao-me/cloud-code is primarily written in TypeScript.
- How popular is cloud-code?
- miantiao-me/cloud-code has 555 stars on GitHub.
- Where can I find cloud-code?
- miantiao-me/cloud-code is on GitHub at https://github.com/miantiao-me/cloud-code.