Skip to content

Inside a Computer

Programs in a Computer see an ordinary Linux machine: its own kernel, a writable root disk, a private network address and a few Heaven services at fixed addresses.

Operating system

#

Heaven supplies the kernel, and the image supplies the distribution and software. The default image is Ubuntu with systemd. Shells open as heaven in /home/heaven, and sudo works without a password. Other images can choose their login user.

Processors and memory

#

nproc and free -h show the processors and memory available. Both can change while the Computer runs, for example after a resize, so a program that sizes itself at startup may need to check again.

Disk

#

The root disk is /dev/vda, an ext4 filesystem mounted at /. df -h / shows the space left on it, and the pool's storage limit applies as well. Everything on the disk stays across stops and restarts, and you can snapshot, copy or restore it.

Network

#

A Computer has a private IPv4 address, DNS and outbound internet access. Its hostname is its name, and after a rename it changes on the next boot. Computers can't reach each other's private addresses: use a peer integration instead.

To serve the Computer's website, listen on 0.0.0.0. An app that listens only on 127.0.0.1 can't be reached from outside the Computer.

Heaven's services

#

Programs in the Computer can call these addresses.

AddressUse
http://169.254.169.254/gateway/email/sendSend email as the Computer.
https://self.int.heaven.dev/Read the Computer's name, addresses, tags and integrations.
https://NAME.int.heaven.devUse an attached integration, such as https://models.int.heaven.dev.

Power

#

sudo reboot restarts the Computer, which shows as starting until it's back. sudo shutdown -P now stops it, and it stays stopped until you start it.

Virtualization

#

A Computer can run its own virtual machines when its processor shows the svm feature. On the default image, this checks for it and loads the driver.

grep -qw svm /proc/cpuinfo && sudo modprobe kvm_amd && test -c /dev/kvm