General Questions
What is BoxLite?
What is BoxLite?
What's the difference between BoxLite and Docker?
What's the difference between BoxLite and Docker?
| Feature | BoxLite | Docker |
|---|---|---|
| Isolation | Hardware VM (KVM/Hypervisor.framework) | Container (namespaces/cgroups) |
| Daemon | No daemon required | Requires Docker daemon |
| Root | No root required | Typically needs root/sudo |
| Architecture | Embeddable library | Client-server architecture |
| Use Case | Embedded sandboxing, AI agents | Application deployment, CI/CD |
| Startup | ~1-2 seconds | ~100-500ms |
| Isolation Level | Separate kernel, hardware isolation | Shared kernel |
- AI agents that need full execution freedom
- Untrusted code execution
- Hardware-level isolation required
- Embedded in applications (no daemon)
- Application deployment
- Development environments
- CI/CD pipelines
- Established Docker workflows
Do I need root or sudo?
Do I need root or sudo?
/dev/kvm, which can be granted through group membership:Can I use BoxLite on Windows?
Can I use BoxLite on Windows?
- Windows 10 version 2004+ or Windows 11
- WSL2 with a Linux distribution (Ubuntu recommended)
- KVM support enabled in WSL2
/dev/kvm. This happens when:/dev/kvmis owned byroot:kvmwith mode660- Your user is not in the
kvmgroup
sudo usermod -aG kvm $USER and restart WSL with wsl.exe --shutdown.What Python versions are supported?
What Python versions are supported?
Is BoxLite production-ready?
Is BoxLite production-ready?
- Stable API (v0.4.x series)
- Hardware-level isolation
- Resource limits enforced
- Error handling robust
- Monitor resource usage
- Test at expected scale
- Configure appropriate limits
What's the license?
What's the license?
Technical Questions
What hypervisor does BoxLite use?
What hypervisor does BoxLite use?
- BoxLite uses libkrun as the hypervisor abstraction
- libkrun provides a unified API over Hypervisor.framework (macOS) and KVM (Linux)
- Each box runs as a separate microVM with its own kernel
How much memory does each box use?
How much memory does each box use?
memory_mib)Default: 512 MiBRange: 128 MiB to 64 GiB (65536 MiB)Overhead:- VM overhead: ~50-100 MB per box
- Guest kernel: ~20-40 MB
- Container: Depends on image
What's the box startup time?
What's the box startup time?
- Image size (cached vs first pull)
- Disk I/O speed
- Available resources
- Pre-pull images:
runtime.create(boxlite.BoxOptions(image="...")) - Reuse boxes instead of creating new ones
- Use smaller base images (
alpine:latestvsubuntu:latest)
Can I persist data between boxes?
Can I persist data between boxes?
- Use volume mounts for host-box data sharing
- Read-write volumes persist changes to host filesystem
How do I debug BoxLite issues?
How do I debug BoxLite issues?
Networking
Does BoxLite support internet access?
Does BoxLite support internet access?
- HTTP/HTTPS requests
- DNS resolution
- Any protocol (TCP/UDP)
How do I expose ports from a box?
How do I expose ports from a box?
ports parameter for port forwarding:Can boxes communicate with each other?
Can boxes communicate with each other?
-
Share data via volumes:
-
Use host network:
Box A exposes a port, and Box B connects to
host.docker.internal:port(or localhost on Linux). - External service: Both boxes connect to Redis/database on host or network.
Performance
Why is my box slow?
Why is my box slow?
-
Insufficient resources:
-
Disk I/O:
- Use ephemeral storage (faster than QCOW2)
- Check host disk speed:
dd if=/dev/zero of=test bs=1M count=1024
-
Too many boxes:
-
Image size:
- Use smaller images:
alpine:latest(5 MB) vsubuntu:latest(77 MB) - Check image size:
docker images
- Use smaller images:
Can I run 100 boxes concurrently?
Can I run 100 boxes concurrently?
- Start small (10 boxes) and scale up
- Monitor metrics:
runtime.metrics().active_boxes - Use resource pooling (reuse boxes)
- Test at expected load
What's the maximum box size?
What's the maximum box size?
- Range: 128 MiB to 64 GiB (65536 MiB)
- Limited by host RAM
- Range: 1 GB to 1 TB
- Limited by host storage
- Range: 1 to host CPU count
- Can oversubscribe (shares-based)
- 64 GiB memory
- 1 TB disk
- 16 CPUs
Troubleshooting
Image pull failed
Image pull failed
- Network connectivity issues
- Invalid image name/tag
- Private image requires authentication
- Registry not reachable
Box fails to start
Box fails to start
-
Check disk space:
-
Verify hypervisor:
-
Check image:
-
Enable debug logging:
-
Check permissions:
Ubuntu 24.04: Timeout waiting for guest ready / Box only starts with sudo
Ubuntu 24.04: Timeout waiting for guest ready / Box only starts with sudo
sudo or on Ubuntu 25.04+.Root Cause: Ubuntu 24.04 restricts unprivileged user namespaces via AppArmor (kernel.apparmor_restrict_unprivileged_userns=1) but does not ship the bwrap-userns-restrict profile that Ubuntu 25.04+ includes. bwrap (bubblewrap) needs user namespaces for sandbox isolation.Diagnosis:/etc/apparmor.d/bwrap-userns-restrict with the following content, then reload:Command hangs or execution timeout
Command hangs or execution timeout
- Command is waiting for input
- Long-running operation
- Deadlock or infinite loop
Port forward not working
Port forward not working
-
Check port is not in use:
-
Verify configuration:
-
Test from inside box:
-
Check gvproxy:
Permission denied errors
Permission denied errors
Out of memory / Box killed
Out of memory / Box killed
-
Increase memory limit:
-
Check actual usage:
-
Optimize code:
- Reduce memory footprint of executed code
- Process data in chunks instead of loading all at once
- Clear variables when no longer needed
KVM not available (Linux)
KVM not available (Linux)
-
Load KVM module:
-
Check CPU support:
-
Enable in BIOS:
- Reboot and enter BIOS/UEFI
- Enable “Intel VT-x” or “AMD-V”
- Save and reboot
-
Add user to kvm group:
Hypervisor.framework not available (macOS)
Hypervisor.framework not available (macOS)
-
Check macOS version:
-
Check architecture:
-
Upgrade if needed:
- BoxLite requires macOS 12+ (Monterey or later)
- Apple Silicon (M1, M2, M3, M4) only
- Intel Macs are not supported
Getting Help
Where can I get help?
Where can I get help?
- Getting Started — Quick onboarding
- How-to Guides — Practical guides
- SDK Reference — API and configuration reference
- Architecture — How BoxLite works
- GitHub Issues — Bug reports and feature requests
- GitHub Discussions — Questions and community support
- Check this FAQ
- Search existing issues/discussions
- Enable debug logging:
RUST_LOG=debug - Include BoxLite version, platform, and minimal reproduction
How do I report a bug?
How do I report a bug?
- BoxLite version:
python -c "import boxlite; print(boxlite.__version__)" - Platform:
uname -a - Python version:
python --version - Error message and stack trace
- Use bug report template
- Include all gathered information
- Attach debug logs if relevant
- Be specific and clear
How do I request a feature?
How do I request a feature?
- Check roadmap: Review GitHub Issues with the
enhancementlabel - Search for similar requests: May already be planned or discussed
- Create feature request: Use the feature request template, describe your use case, provide examples of desired API/behavior, and explain benefits to other users
- Participate in discussion: Respond to questions, refine the proposal based on feedback, and consider implementing it yourself
How do I contribute?
How do I contribute?
- Bug fixes
- Documentation improvements
- New examples
- SDK improvements (Python, Node.js, C)
- Performance optimizations