Skip to content

Images and setup

An image is what a new Computer's disk starts from: its distribution, software and files. Computers use heaven-ubuntu unless you choose a template or a container image, and a setup script can install the rest on first boot.

Default image

#

heaven-ubuntu is Ubuntu 24.04 with tools for building software and running agents.

SoftwareNotes
DockerWith Buildx and Compose. Off until you run sudo systemctl enable --now docker. The heaven user can run docker without sudo.
nginxOff until you run sudo systemctl enable --now nginx. Listens on ports 80 and 8000.
ChromeIn the browser desktop, and headless-shell for automation without one.
tmuxKeeps sessions running after you disconnect.
Coding agentsClaude Code (claude), Codex (codex), OpenCode (opencode) and Pi (pi). Sign in to each with its provider.
Development toolsGit, GitHub CLI, Go, Node.js LTS, Python 3 and uv.

Image versions

#

A Computer keeps the image version it was created from, and new Computers get the newest heaven-ubuntu. To pin a version, pass it to --image. A container image's tag is fixed to one digest when Heaven prepares it.

heaven view my-site shows a Computer's image. To move it to the newest default, reset it with --image heaven-ubuntu, which replaces its disk.

Templates

#

A template is a ready-made image for one purpose. heaven template view lists them and the servers that have them. Choose one with --template instead of --image.

heaven template view --organization acme
heaven create my-site --pool web --template quake

Reference: List templates, Create a Computer.

Container images

#

A Computer can start from any linux/amd64 container image. Pass its reference to --image. Heaven supplies the kernel and runs the image's entrypoint at boot, so the image can run one application or its own init system. Shells open as root unless the image sets the label heaven.dev/login-user to another user in /etc/passwd.

The image's layers can be up to 8 GiB compressed and 16 GiB unpacked, and must fit on the Computer's disk. For a private image, pass the registry login as USERNAME:PASSWORD on standard input.

printf '%s' "$REGISTRY_USER:$REGISTRY_TOKEN" | heaven create my-site --pool web --image ghcr.io/acme/website:1.0 --registry-auth -

To pull images from inside a running Computer, use a registry integration.

Reference: Create a Computer.

Setup scripts

#

A setup script runs once, on a Computer's first boot, as the login user in their home directory. Use it to install packages and start services. The pool's script runs first, if it has one. Then a requested repository is cloned, and the Computer's own script, or your saved default, runs last.

Pass the script on standard input, and variables with --env KEY=VALUE. The variables are removed when setup ends.

setup.sh
#!/bin/sh
set -eu
sudo systemctl enable --now nginx
heaven create my-site --pool web --setup-script - < setup.sh

The output is in /heaven/setup.log inside the Computer. If the script fails, the Computer's state message says so, even though the Computer is running. Setup runs again after a reset.

Reference: Create a Computer.

Defaults

#

Save a setup script to run on every Computer you create. A script given at creation replaces it for that Computer.

heaven defaults view
heaven defaults set --setup-script - < setup.sh
heaven defaults clear

A pool's defaults apply to new Computers in that pool.

Reference: Read your default setup script, Set your default setup script, Clear your default setup script.

Clone a repository

#

A new Computer can start with a repository cloned into the login user's home, before its setup script runs. You need a GitHub integration that can read the repository, and the image needs Git. In the New Computer form, enter it under Repository.

heaven create my-site --pool web --github acme/website

A clone failure appears as a setup failure.

Reference: Create a Computer.