Skip to content

Add E2B sandboxes with Tailscale SSH - #69

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

czpython merged 1 commit into
mainfrom
codex/e2b-sandbox

Conversation

@czpython

@czpython czpython commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Requested by Paulo · project thread

Before: drukbox could not make hosts on E2B.

After: {"provider": "e2b"} starts an E2B sandbox that joins the tailnet and serves Tailscale SSH as root. E2B kills a sandbox after E2B_MAX_LIFETIME_SECONDS, so the provider sets max_lifetime and no lease ends later.

How: the provider uses the E2B SDK (optional e2b extra) to create the sandbox, run the bootstrap as root, and kill it by its host name and SERVICE_LABEL metadata. E2B runs commands only over its in-sandbox RPC, so the SDK takes the place of a REST client. E2B gives eth0 only a link-local address, so the bootstrap first adds a private address on dummy0; without it tailscale up never returns. images/e2b/build.py builds the template without E2B's openssh-server, so Tailscale SSH makes its own host keys in each sandbox, and with tailscaled disabled, so each sandbox starts a fresh one.

Verified live on E2B with the PR's E2BAPI, without the drukbox service: two sandboxes were created, bootstrapped in 2.5 to 4.6 s, joined the tailnet with their own Tailscale SSH host keys (checked with ssh-keyscan), and were deleted. Not verified live: a Tailscale SSH session as root (the tailnet policy refused the probing identities) and a create through the drukbox service.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JWeJyDmCJYS6etbwXsb3vw

@czpython
czpython force-pushed the codex/vercel-sandbox branch 2 times, most recently from 97a8628 to 237355d Compare October 18, 2026 13:53
Base automatically changed from codex/vercel-sandbox to main October 18, 2026 14:16
@czpython czpython changed the title Add E2B sandbox provider with Tailscale SSH Add E2B sandboxes with Tailscale SSH Oct 18, 2026
@czpython
czpython force-pushed the codex/e2b-sandbox branch 3 times, most recently from d61d1ee to c970982 Compare October 18, 2026 15:36
E2B kills each sandbox after E2B_MAX_LIFETIME_SECONDS, so the provider
sets max_lifetime and no lease ends later.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JWeJyDmCJYS6etbwXsb3vw
@czpython
czpython merged commit 6ead7ec into main Oct 18, 2026
6 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