Skip to content
zgeoffPublic

About

self-hosted microVM sandboxes with all the bells and whistles. inspired by https://fly.io/sprites

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1,048 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

impz gives you small Linux computers that stay yours. Each one, an imp, is a Firecracker microVM with real root, its own kernel and Docker inside. It boots in under a second, and its disk keeps everything you put there.

Imps are heavily inspired by Fly.io's wonderful Sprites. If you want something more polished or out-of-the-box, check them out.

Why imps?

When an imp sits idle, it goes to sleep: its memory goes to disk and its RAM goes back to the host. The next request to its URL wakes it in about a tenth of a second, with every process still running. Checkpoint it before you let an agent loose, roll it back when the agent makes a mess, or fork it and try two things at once.

Install

impz runs on one Linux machine with /dev/kvm: bare metal, or a VM with nested virtualization, with Docker. On a fresh Ubuntu or Debian server, deploy/bootstrap.sh from a release tag sets up the host and starts impd (bootstrap a server), and NixOS has a module. Then install the CLI on your own machine:

curl -fsSL https://raw.githubusercontent.com/zgeoff/imp/main/install.sh | sh   # install the CLI
imp login https://imp.example.ts.net  # point it at your impd and its token
imp new box                           # create and boot an imp
imp console box                       # a shell that outlives the terminal
imp checkpoint box clean              # name a known-good state
imp restore box clean                 # and back

The install guide also covers a dev instance from the repo and the release image.

Features

  • Sleep and wake with every process intact, and an idle imp holds no RAM (sleep and wake).
  • A RAM budget that sleeps the least recently active imps to make room (the RAM governor).
  • Checkpoints, restores and forks as copy-on-write clones on XFS or ZFS (storage).
  • Any OCI image, built in a throwaway imp by default (images).
  • Sessions that survive a closed terminal and a sleep (session logs).
  • SSH, port forwards and copies into any imp (SSH, copying files, reverse forwards).
  • Egress policies and private networks for what an imp may reach (networks, egress).
  • Credential connectors that keep API tokens on the host, never in the guest (connectors).
  • URLs on the tailnet, HTTPS on your own domain, and public imps (Tailscale, HTTPS).
  • Scoped tokens and tailnet identity (tokens).
  • An MCP server for coding agents (MCP), a typed client on npm, and a dashboard.
  • Backups off the host with restic (backups), and moves between hosts (more than one host).

Configuration

impd reads its settings from the environment: the RAM budget, the storage backend, the ports, the domain, backups and the rest. The configuration guide lists every variable for impd, the host container, the dev instance and the CLI.

Documentation

docs/ covers the architecture, the guides and development.

About

self-hosted microVM sandboxes with all the bells and whistles. inspired by https://fly.io/sprites

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages