selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
Dormice logo

Self-host Dormice

Self-hosted AI agent sandbox with permanent sandboxes

AlphaOpen SourceApache-2.0
Updated2 weeks ago
LanguageTypescript
Setup difficultyAdvanced
Stars
1 707
CPU
x86_64
RAM
swap required (16 GiB recommended)
Storage
disk space for sandboxes and SQLite ledger
Ports
3676 (daemon API), 3677 (gateway API and web console)
Requires
Docker Engine, gVisor (runsc)
Install with Debian

What is Dormice?

Dormice flips the cloud sandbox model: you host it on your own machine and sandboxes persist indefinitely. They automatically cool down through active, frozen, stopped, and archived states — an idle sandbox drops from 1 GiB to ~5 MiB RAM and wakes in ~50 ms. The stack includes a daemon, gateway, web console, CLI (dor), native TypeScript SDK, and an E2B-compatible API so the official e2b package works with just two URL changes. Isolation uses Docker with gVisor. Optional S3-compatible cold archival ships stopped sandbox disks to object storage. A single install script sets up everything on Ubuntu/Debian x86_64. The project is in early development and not yet production-ready.

Should you self-host Dormice?

Dormice scores 49/100 on selfhost.directory (how scoring works) and ranks #104 of 209 in AI Agents. It has 1 707 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is Apache-2.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is Containarium (49/100, 313 stars). Dormice scores higher overall. See Dormice vs Containarium side by side.

Features

  • CLI (dor)
  • E2B compatibilitySome E2B features deliberately not implemented (Process/StreamInput, xattr file metadata)
  • File watch API
  • Fleet management
  • Idempotent acquireSandbox
  • Idle freezing and fast wake
  • Live command streaming
  • Native TypeScript SDKNot yet on npm, built from source with pnpm build
  • Permanent sandboxes
  • Port proxy with wake-on-traffic
  • PTY support
  • S3 cold archivalOptional, requires S3 configuration
  • Signed file URLs
  • Web Console

Dormice README

How to install Dormice

Install Dormice with Debian

Environment variables
DORMICE_API_TOKEN (for node role), --mirror cn, --swap-gb N, --role node, --gateway URL, --node-id ID, --node-endpoint URL, --registry-addr HOST:PORT

Idempotent installer that sets up Docker, gVisor, Caddy, Node.js, swap, sysctl, firewall, and systemd services. Runs dor doctor to verify.

How to configure Dormice

  • DORMICE_API_TOKENAPI token for authentication (32+ hex chars)

    API token for authentication (32+ hex chars)

  • DORMICE_BASE_IMAGEdormice-base:YYYYMMDDFleet base image for template-less sandboxes

    Fleet base image for template-less sandboxes

  • DORMICE_DATA_DIR/var/lib/dormiceData directory for sandbox disks

    Data directory for sandbox disks

  • DORMICE_DB_PATH/var/lib/dormice/dormice.dbPath to SQLite database file

    Path to SQLite database file

  • DORMICE_EXECUTORdockerExecutor type (docker or fake)

    Executor type (docker or fake)

    values: docker, fake

  • DORMICE_GATEWAY_ENDPOINThttp://127.0.0.1:3677Gateway URL for node machines

    Gateway URL for node machines

  • DORMICE_INGRESS_FILE/etc/caddy/CaddyfileCaddy config file managed by gateway

    Caddy config file managed by gateway

  • DORMICE_INGRESS_RELOAD_CMDcaddy reload --config /etc/caddy/Caddyfile --adapter caddyfileCommand to reload Caddy after config changes

    Command to reload Caddy after config changes

  • DORMICE_NODE_ENDPOINThttp://<node-ip>:80Where gateway reaches this node

    Where gateway reaches this node

  • DORMICE_NODE_IDhostnameNode identifier in the fleet

    Node identifier in the fleet

  • DORMICE_REGISTRY_ADDRESS<host>:5000Fleet image registry address

    Fleet image registry address

  • DORMICE_S3_ACCESS_KEY_IDS3 access key ID

    S3 access key ID

  • DORMICE_S3_BUCKETS3 bucket name for archival

    S3 bucket name for archival

  • DORMICE_S3_ENDPOINTS3 endpoint URL for cold archival

    S3 endpoint URL for cold archival

  • DORMICE_S3_FORCE_PATH_STYLEfalseForce path-style S3 URLs (needed for MinIO)

    Force path-style S3 URLs (needed for MinIO)

    values: true, false

  • DORMICE_S3_REGIONus-east-1S3 region

    S3 region

  • DORMICE_S3_SECRET_ACCESS_KEYS3 secret access key

    S3 secret access key

  • DORMICE_SANDBOX_CPUSDefault sandbox CPU limit

    Default sandbox CPU limit

  • DORMICE_SANDBOX_DISK_GBDefault sandbox disk quota in GB

    Default sandbox disk quota in GB

  • DORMICE_SANDBOX_DOMAINWildcard domain for sandbox port proxy

    Wildcard domain for sandbox port proxy

  • DORMICE_SANDBOX_MEMORY_GBDefault sandbox memory limit in GB

    Default sandbox memory limit in GB

  • DORMICE_SANDBOX_PIDS_LIMITDefault sandbox pids limit

    Default sandbox pids limit

More in AI Agents

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…