Installation
Dicer runs on one Linux host, as a daemon, dicerd, managed by systemd, with
the dicer command line beside it. On Debian, Ubuntu, Fedora, RHEL and its
rebuilds, and openSUSE, install the dicer package, which has both and the
service; elsewhere, the install script builds them from source and sets the
daemon up.
Requirements
The host
- Linux on x86_64 or aarch64, with systemd.
- KVM:
/dev/kvmmust exist. On a cloud virtual machine, that means one with nested virtualisation enabled. erofs-utils, formkfs.erofs, ande2fsprogs, formkfs.ext4andmke2fs.iptables.
The package brings the last three with it.
To build, for the install script
- Go 1.25 or later,
git,makeandcurl.
To install them with the distribution’s package manager:
$ sudo apt install erofs-utils e2fsprogs iptables git make curl
and Go from go.dev/dl, as distributions often carry an older one.
Check that KVM is there:
$ ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Sep 24 09:12 /dev/kvm
Install from packages
Releases are published to an apt and a dnf repository at pkg.dicer.sh,
signed with Dicer’s key. Add it, then install dicer:
$ sudo install -d -m 0755 /etc/apt/keyrings
$ curl -fsSL https://pkg.dicer.sh/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/dicer.gpg
$ echo "deb [signed-by=/etc/apt/keyrings/dicer.gpg] https://pkg.dicer.sh/deb stable main" \
| sudo tee /etc/apt/sources.list.d/dicer.list
$ sudo apt update
$ sudo apt install dicer
The daemon is enabled and started.
The package installs dicer and dicerd to /usr/bin, the service,
/etc/dicerd/config.yaml, and a sysctl setting that turns IPv4 forwarding
on, and creates the dicer group. The package files are also attached to
each release.
Install from source
$ curl -fsSL https://raw.githubusercontent.com/konradasb/dicer/main/scripts/install.sh | bash
The script asks for sudo when it needs it, then:
- checks the requirements above;
- builds
diceranddicerd, with the hypervisors and guest binariesdicerdcarries, from themainbranch; - installs both to
/usr/local/bin; - writes a configuration,
/etc/dicerd/config.yaml, unless there is one; - turns on IPv4 forwarding, now and at every boot;
- creates the
dicergroup, whose members can use the daemon withoutsudo; - installs
dicerd.service, enables it and starts it.
--ref builds a branch, tag or commit instead of main:
$ curl -fsSL https://raw.githubusercontent.com/konradasb/dicer/main/scripts/install.sh | bash -s -- --ref v0.2.0
Use Dicer without sudo
The daemon’s socket belongs to root and the dicer group. Join the group,
then start a new login shell, or run newgrp dicer in this one:
$ sudo usermod -aG dicer $USER
$ newgrp dicer
The docs’ commands assume you have: without it, run each dicer command
with sudo.
dicer group can do anything with the daemon, which is as
much as root on the host. Add only whom you would give root.Verify
$ systemctl status dicerd
$ dicer version
$ dicer info
dicer info shows the daemon, the hypervisors it carries, and how much of
the host’s CPU, memory and disk it may give instances. To manage the host
from another machine, see Remote access.
Upgrade and remove
Upgrading the package, or running the install script again, upgrades Dicer without stopping the instances that are running. See Operating the daemon for both.