Skip to content

Add Cloudflare sandboxes with Tailscale SSH - #67

Merged
czpython merged 1 commit into
mainfrom
codex/cloudflare-sandbox
Oct 18, 2026
Merged

czpython merged 1 commit into
mainfrom
codex/cloudflare-sandbox

Conversation

@czpython

@czpython czpython commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Requested by Paulo · project thread

Before: Drukbox could not create hosts on Cloudflare.

After: POST /hosts with provider: cloudflare starts a Cloudflare container. The container joins the tailnet and serves Tailscale SSH as root. Deleting the host, or the janitor at lease expiry, deletes the container.

How: Cloudflare starts containers only from a Durable Object, so the operator deploys deploy/cloudflare/worker.js with Wrangler, with no npm tooling. CloudflareAPI calls the Worker with a bearer token. As in Cloudflare's Linux sandbox guide, the Worker starts the container from an image alias, runs bootstrap once per host name, and keeps the container awake with an alarm. The image has no SSH host keys, so Tailscale SSH makes its own for each box. CI runs a Wrangler dry run, which builds the image.

Not verified live: container create and delete, the tailscaled start, and SSH over the tailnet. These need a Cloudflare account with Containers enabled.

🤖 Generated with Claude Code

https://claude.ai/code/session_017378pkgrKkDT9egx2xjwoE

@czpython
czpython force-pushed the codex/cloudflare-sandbox branch from 5ed1b71 to 0fbd0c0 Compare October 18, 2026 11:37
Starts Cloudflare containers from a Worker in the operator's account.
They join the tailnet and serve Tailscale SSH.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017378pkgrKkDT9egx2xjwoE
@czpython
czpython force-pushed the codex/cloudflare-sandbox branch from fa6c942 to 2ecb1eb Compare October 18, 2026 12:35
@czpython
czpython merged commit adde42a into main Oct 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant