microvm

module
v0.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2026 License: MIT

README

AerolVM

Tests Release Publish SDKs

AerolVM is a self-hosted platform for creating isolated Docker-backed sandboxes on a single Linux host. This repository contains the server, installer, SDKs, and documentation you use to provision a host, create containers, expose preview URLs, and manage sandboxes over an API.

Start Here

Guide Description
Quick Start Spin up a sandbox and run a command in under five minutes.
Server Setup Install and configure AerolVM on a Linux host.
SDK Setup Connect an SDK to your AerolVM server.

Install a Server

Local Setup :

curl -fsSL https://github.com/aerol-ai/microvm/releases/latest/download/install.sh | sudo bash -s -- \
    --local \
    --pat-token your-secret-pat

Production (DNS-01 wildcard TLS via Cloudflare):

curl -fsSL https://github.com/aerol-ai/microvm/releases/latest/download/install.sh | sudo bash -s -- \
    --domain sandbox.example.com \
    --pat-token your-secret-pat \
    --dns-provider cloudflare \
    --dns-api-token your-cloudflare-api-token

--domain requires --dns-provider. The installer hard-fails otherwise. Caddy issues exactly two certificates — <domain> and *.<domain> — once at startup via DNS-01, then renews them on a schedule. Use --local for the only no-DNS path (binds to 127.0.0.1, no TLS).

Running 10+ ingress nodes? Opt into S3-backed shared Caddy cert storage so one node issues the wildcard and the rest read it from S3 — see setup/multi-node-cert-sharing.md. Off by default.

If you omit --pat-token, the installer generates a token and prints it once at the end.

What AerolVM Does

  • Creates isolated sandboxes backed by Docker on your own infrastructure.
  • Exposes sandbox URLs as https://<sandbox-id>.<domain> and port URLs as https://<sandbox-id>-<port>.<domain>.
  • Provides a PAT-authenticated REST API and SDKs for TypeScript, Python, Go, Java, and Rust.
  • Supports Docker by default and gVisor as an opt-in runtime for untrusted code.
  • Uses Caddy for TLS termination and public routing on a single Linux host.

SDK Example

import { MicroVM } from '@aerol-ai/aerolvm-sdk'

const client = new MicroVM({
  apiUrl: process.env.SB_API_URL,
  patToken: process.env.SB_PAT_TOKEN,
})

const sandbox = await client.create({ image: 'ubuntu:22.04' })
console.log(sandbox.publicUrl)
await sandbox.destroy()

Runtime Options

Runtime Status Notes
Docker Available Default runtime with the lowest overhead.
gVisor Available Install with --with-gvisor for stronger isolation.
Kata Containers Planned Create requests return runtime not yet implemented.

Install with gVisor support:

curl -fsSL https://github.com/aerol-ai/microvm/releases/latest/download/install.sh | sudo bash -s -- \
    --domain sandbox.example.com \
    --pat-token your-secret-pat \
    --with-gvisor

Develop and Test

make build
make test
make docs-install
make docs-dev

License

MIT

Directories

Path Synopsis
cmd
sandboxd command
toolboxd command
toolboxd/sessions
Package sessions implements long-running command sessions inside a sandbox container: PTY or pipes, in-memory replay buffer, fan-out to multiple attached clients, and asciinema recording.
Package sessions implements long-running command sessions inside a sandbox container: PTY or pipes, in-memory replay buffer, fan-out to multiple attached clients, and asciinema recording.
internal
cluster
Package cluster implements Phase-1 cluster mode for sandboxd.
Package cluster implements Phase-1 cluster mode for sandboxd.
runtime
Package runtime defines the abstraction the service layer uses to drive a sandbox container, regardless of which OCI runtime executes it.
Package runtime defines the abstraction the service layer uses to drive a sandbox container, regardless of which OCI runtime executes it.
pkg
api
Package api wires the top-level HTTP server.
Package api wires the top-level HTTP server.
api/apihttp
Package apihttp holds HTTP helpers shared by every version of the public API (pkg/api/v1, ...).
Package apihttp holds HTTP helpers shared by every version of the public API (pkg/api/v1, ...).
api/v1
Package v1 implements the v1 HTTP API for the sandbox daemon.
Package v1 implements the v1 HTTP API for the sandbox daemon.
capacity
Package capacity implements admission control for sandbox creation.
Package capacity implements admission control for sandbox creation.
docker/netstats
Package netstats reads per-sandbox network byte counters from /proc/<pid>/net/dev.
Package netstats reads per-sandbox network byte counters from /proc/<pid>/net/dev.
mounts
Package mounts owns the host-side lifecycle of per-sandbox external-storage mounts.
Package mounts owns the host-side lifecycle of per-sandbox external-storage mounts.
mounts/adapters
Package adapters describes how to invoke external mount tools on the host for each supported storage protocol.
Package adapters describes how to invoke external mount tools on the host for each supported storage protocol.
scripts
load command
ingress_churn is a release-gate load harness for the AerolVM cluster data-plane ingress.
ingress_churn is a release-gate load harness for the AerolVM cluster data-plane ingress.
sdk
go/internal/apiclient/v1
Package v1 holds wire-version-1 constants for the Go SDK.
Package v1 holds wire-version-1 constants for the Go SDK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL