Prerequisites
Before you begin, ensure you have:Linux with KVM
A Linux machine with KVM virtualization enabled
Docker Compose
For running Postgres and MinIO dependencies
Go 1.21+
Required to build and run hatchd
Root Access
Needed for network configuration and Firecracker
Check if KVM is enabled:
Quick Setup
Install dependencies
Run the provided script to install Firecracker, kernel, rootfs, and system tools:This script will:
- Install dnsmasq, e2fsprogs, iproute2, iptables, and other system packages
- Download and install the latest Firecracker binary
- Download a compatible Linux kernel
- Download Ubuntu Noble cloud image (with cloud-init support)
- Enable IP forwarding
- Print environment variables to add to your
.envfile
Configure environment
Copy the example environment file and update with the paths from the install script:The install script will output variables like:Add these to your
.env file.Start services
Launch Postgres and MinIO with Docker Compose:This starts:
- Postgres on
localhost:5432(database for VM metadata) - MinIO on
localhost:9000(S3-compatible storage for snapshots) - MinIO Console on
localhost:9001
Create Your First VM
Now that Hatch is running, let’s create a VM with network access and SSH enabled.Response
The API will return VM details including:The VM boots with cloud-init, so it may take 10-20 seconds for the SSH server to be ready.
Connect via SSH
Using thessh_port from the response, connect to your VM:
What’s Next?
Installation Guide
Learn about all configuration options and advanced setup
API Reference
Explore all available API endpoints
Networking
Understand how Hatch networking works
Snapshots
Learn about snapshot/restore and wake-on-request
Common Commands
List all VMs
Get VM details
Stop a VM
Snapshot a VM
Delete a VM
For full API documentation, see the API Reference section.