# Images and setup

URL: https://heaven.dev/docs/images
Updated: 2026-11-22

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.

| Software | Notes |
| --- | --- |
| Docker | With Buildx and Compose. Off until you run `sudo systemctl enable --now docker`. The `heaven` user can run `docker` without `sudo`. |
| nginx | Off until you run `sudo systemctl enable --now nginx`. Listens on ports 80 and 8000. |
| Chrome | In the [browser desktop](https://heaven.dev/docs/connecting#desktop), and `headless-shell` for automation without one. |
| tmux | [Keeps sessions running](https://heaven.dev/docs/connecting#sessions) after you disconnect. |
| Coding agents | Claude Code (`claude`), Codex (`codex`), OpenCode (`opencode`) and Pi (`pi`). Sign in to each with its provider. |
| Development tools | Git, 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](https://heaven.dev/docs/managing-computers#reset) 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`.

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

Reference: [List templates](https://heaven.dev/docs/reference/templates/view), [Create a Computer](https://heaven.dev/docs/reference/computers/create).

## 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.

```sh
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](https://heaven.dev/docs/integrations#container-registries).

Reference: [Create a Computer](https://heaven.dev/docs/reference/computers/create).

## 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](#clone-a-repository) is cloned, and the Computer's own script, or your [saved default](#defaults), runs last.

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

```sh title="setup.sh"
#!/bin/sh
set -eu
sudo systemctl enable --now nginx
```

```sh
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](https://heaven.dev/docs/managing-computers#reset).

Reference: [Create a Computer](https://heaven.dev/docs/reference/computers/create).

## Defaults

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

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

A [pool's defaults](https://heaven.dev/docs/pools#defaults) apply to new Computers in that pool.

Reference: [Read your default setup script](https://heaven.dev/docs/reference/account/defaults-view), [Set your default setup script](https://heaven.dev/docs/reference/account/defaults-set), [Clear your default setup script](https://heaven.dev/docs/reference/account/defaults-clear).

## 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](https://heaven.dev/docs/integrations#github) that can read the repository, and the image needs Git. In the **New Computer** form, enter it under **Repository**.

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

A clone failure appears as a [setup failure](#setup-scripts).

Reference: [Create a Computer](https://heaven.dev/docs/reference/computers/create).
