Skip to content

Conversation

@doco11
Copy link

@doco11 doco11 commented Feb 3, 2026

E2B Lite

Overview

Idea is to have easily installable version of E2B infrastructure locally, or on bare-metal Linux machine. I'd consider this MVP (recommended kernel 6.8+ (for template building), and apt based distro - like Ubuntu 22.04 or 24.04). This tries to re-use everything that e2b infra repository supports.

Detailed description in E2B-LITE-DESIGN.md.

Mostly co-authored by Claude Opus 4.5.

Ideas to build on and improve later

  • Pre-built binaries - Download binaries instead of compiling (faster install)
  • Pre-built templates - Common templates (Python, Node.js, Go) ready to use
  • GitHub release workflow - Auto-build binaries and templates with each release
  • One-liner install - curl -fsSL https://e2b.dev/install-lite | bash
  • Auto-update - Version check and update mechanism
  • More package managers - Support for dnf (Fedora/RHEL), pacman (Arch), zypper (openSUSE)
  • macOS support - Nested virtualization via Apple Hypervisor Framework
  • Lite mode - Strip unnecessary components, reduce metrics collection overhead
  • Move to cloud - Simple migration tool from local E2B Lite to E2B Cloud/Enterprise

Quick Start

1. Clone from fork and setup

git clone https://github.com/doco11/e2b-infra.git infra
cd infra
./scripts/e2b-lite-setup.sh

2. Start Services

./scripts/services/start-all.sh

3. Test

pip install e2b
python scripts/test-e2b-lite.py

Credentials

Credentials are re-used from packages/local-dev/seed-local-database.go:

Credential Value
API Key e2b_53ae1fed82754c17ad8077fbc8bcdd90
Access Token sk_e2b_89215020937a4c989cde33d7bc647715
Team ID 0b8a3ded-4489-4722-afd1-1d82e64ec2d5
User ID 89215020-937a-4c98-9cde-33d7bc647715

Setup Script Details

scripts/e2b-lite-setup.sh performs these steps:

  1. Install dependencies (Docker, Go, Node.js, build tools)
  2. Check prerequisites (OS, kernel, KVM, Docker, Go)
  3. Setup system (load kernel modules, allocate HugePages, create directories)
  4. Build binaries (envd, API, orchestrator, client-proxy)
  5. Install npm dependencies (in packages/shared/scripts)
  6. Start Docker infrastructure (PostgreSQL, Redis, Loki, etc.)
  7. Configure database (run migrations, seed data)
  8. Build base template (if kernel 6.8+)
  9. Create service scripts (scripts/services/start-*.sh)

Differences from Cloud E2B

Feature Cloud E2B E2B Lite
API URL https://api.e2b.dev http://localhost:80
Sandbox URL Automatic http://localhost:3002
Templates Cloud storage Local filesystem
Scaling Multi-node Single node
Auth Full team/user Seeded credentials

E2B CLI

E2B CLI (npx @e2b/cli) local setup support:

  • CLI uses SDK's ConnectionConfig which supports environment variables
  • Set these environment variables for local E2B Lite:
    export E2B_API_URL="http://localhost:80"
    export E2B_SANDBOX_URL="http://localhost:3002"
    export E2B_ACCESS_TOKEN="sk_e2b_89215020937a4c989cde33d7bc647715"
    export E2B_API_KEY="e2b_53ae1fed82754c17ad8077fbc8bcdd90"
  • Then use CLI normally: npx @e2b/cli template list

doco11 and others added 10 commits February 3, 2026 16:25
- Add --verbose flag for detailed output (apt, build logs, etc.)
- Add --check-req flag to check requirements without installing
- Add clean progress UI with spinners in non-verbose mode
- Consolidate output to 1-2 lines per step (8 steps total)
- Fix spinner race condition leaving artifacts on screen
- Change start-all.sh to run in background by default (--fg for foreground)
- Update summary with copy-paste export commands and CLI usage
- Add "Coming Soon" section to E2B-LITE-DESIGN.md
- Update documentation to reflect new options

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The workflow for pre-building E2B Lite binaries is not yet tested.
The --prebuilt flag in the setup script will gracefully fall back
to building from source when releases don't exist.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31a552beeb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@sitole sitole self-requested a review February 3, 2026 19:03
Comment on lines +29 to +37
// For local mode, cluster nodes have empty IPAddress, so use localhost
orchestratorIP := node.IPAddress
if orchestratorIP == "" && env.IsLocal() {
orchestratorIP = "localhost"
}

info := e2bcatalog.SandboxInfo{
OrchestratorID: node.Metadata().ServiceInstanceID,
OrchestratorIP: node.IPAddress,
OrchestratorIP: orchestratorIP,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we maybe solve this when we are adding a node instead?

@sitole
Copy link
Member

sitole commented Feb 3, 2026

@doco11 thank you for contributing! We will check it as soon as possible.
I think the changes to the routing catalog are pretty straightforward,
so feel free to open a separate PR, and we can merge it directly.

@jakubno
Copy link
Member

jakubno commented Feb 3, 2026

@doco11, have you tried to use packages/local-dev? You can find more info in DEV-LOCAL.md. Was there anything you were missing there?

@doco11
Copy link
Author

doco11 commented Feb 5, 2026

@doco11 thank you for contributing! We will check it as soon as possible. I think the changes to the routing catalog are pretty straightforward, so feel free to open a separate PR, and we can merge it directly.

Thanks @sitole, so should I keep the change as proposed, or should I split it to separate PR and rework? 👀 just that so I understand both your comments

@doco11, have you tried to use packages/local-dev? You can find more info in DEV-LOCAL.md. Was there anything you were missing there?

@jakubno yes, the DEV-LOCAL.md was used as a blueprint/baseline, but in some ways it is uncecessarily complex, or assumed some prerequirements (packages) and knowlege of how to put it together. But plenty of those recommended commands are still used in the "e2b-lite" setup script, while I believe it lowers the barrier for a new user that just wants to start using E2B locally (and hopefully become a paying cloud user later on)

@jakubno
Copy link
Member

jakubno commented Feb 6, 2026

@doco11, have you tried to use packages/local-dev? You can find more info in DEV-LOCAL.md. Was there anything you were missing there?

@jakubno yes, the DEV-LOCAL.md was used as a blueprint/baseline, but in some ways it is uncecessarily complex, or assumed some prerequirements (packages) and knowlege of how to put it together. But plenty of those recommended commands are still used in the "e2b-lite" setup script, while I believe it lowers the barrier for a new user that just wants to start using E2B locally (and hopefully become a paying cloud user later on)

If you would be able to run just one command, would that work for you?

@doco11
Copy link
Author

doco11 commented Feb 6, 2026

If you would be able to run just one command, would that work for you?

Yes, that was the idea behind this - to run e2b-infra with single command on a local machine (for now Linux, potentially in the future Mac with some nested virtualization as well).

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.

3 participants