ZRS
On this page

Manual install

These are the steps the installer runs. Package names and service names may be different based on distro, so this page names what packages have to be installed rather than the commands to install them.

What the host needs #

  • An x86-64 or arm64 Linux.
  • systemd.
  • sudo
  • libvirt client library
  • libvirt daemon with QEMU
  • Samba
  • Docker
  • Optionally ZFS

ZRS looks for system tools in /usr/sbin, /usr/bin, /sbin, and /bin.

Download a release #

A release is four files: the zrs and zrs-adminbinaries and a minisign signature for each. The channel's manifest file containers the SHA-256 checksums.

ARCH=linux-amd64   # or linux-arm64
curl -fsSL "https://get.zrs.dev/channels/alpha/latest-$ARCH" -o latest
while read -r sha path; do
  curl -fSL --compressed "https://get.zrs.dev/$path" -o "$(basename "$path")"
done < latest
sed 's|  .*/|  |' latest | sha256sum -c -
VERSION=$(sed -n '1s|.*releases/v\([^/]*\)/.*|\1|p' latest)

Optionally, verify the signatures with minisign:

minisign -Vm zrs -P RWSdX9HMyMq7IYGRozaJFBoUsipIvde/isnbE5EQOaWZaNqqmWXD1Cdi
minisign -Vm zrs-admin -P RWSdX9HMyMq7IYGRozaJFBoUsipIvde/isnbE5EQOaWZaNqqmWXD1Cdi

Create the accounts #

ZRS runs as the zrs system user and zrs-managed shares read and write files as zrs-share user. Neither user needs a home directory or a login shell. The zrs user should be added to the docker and libvirt groups.

sudo useradd -r -U -d /nonexistent -s /usr/sbin/nologin zrs
sudo useradd -r -U -d /nonexistent -s /usr/sbin/nologin zrs-share
sudo usermod -aG docker,libvirt zrs

Install the binaries #

Each release is downloaded into a directory under /opt/zrs/versions, and /opt/zrs/current is a symlink currently running version.

sudo install -d -m 755 -o root -g root /opt/zrs /opt/zrs/versions "/opt/zrs/versions/$VERSION"
sudo install -m 755 -o root -g root zrs zrs-admin "/opt/zrs/versions/$VERSION/"
sudo install -m 644 -o root -g root zrs.minisig zrs-admin.minisig "/opt/zrs/versions/$VERSION/"
sudo ln -sfn "versions/$VERSION" /opt/zrs/current

Add the systemd unit #

Add a server for zrs /usr/lib/systemd/system/zrs.service.

[Unit]
Description=ZRS - Home Server Mgmt Service
After=network.target
StartLimitIntervalSec=30
StartLimitBurst=3

[Service]
Type=notify
NotifyAccess=main
ExecStart=/opt/zrs/current/zrs run
TimeoutStartSec=300
Restart=always
SuccessExitStatus=75
RestartForceExitStatus=75
FileDescriptorStoreMax=1
User=zrs
Group=zrs
StateDirectory=zrs
StateDirectoryMode=0750
Environment=MALLOC_ARENA_MAX=8

[Install]
WantedBy=multi-user.target

Add the sudoers rule #

The service runs unprivileged and calls zrs-admin through sudo for anything that needs root.

echo 'zrs ALL=(root) NOPASSWD: /opt/zrs/current/zrs-admin' | sudo tee /etc/sudoers.d/zrs
sudo chmod 440 /etc/sudoers.d/zrs
sudo visudo -c -f /etc/sudoers.d/zrs

Open the firewall port #

If a firewall is running, allow traffic on the configured port (default 9779):

# replace 192.168.0.0/16 with your internal subnet
sudo ufw allow from 192.168.0.0/16 to any port 9779
# replace 192.168.0.0/16 with your internal subnet
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.0.0/16" port port=9779 protocol=tcp accept'
sudo firewall-cmd --reload

Start ZRS #

Start the service, create the admin account as the zrs user, and link the server to your account for its license.

sudo systemctl daemon-reload
sudo systemctl enable --now zrs
sudo -u zrs /opt/zrs/current/zrs setup
sudo /opt/zrs/current/zrs link

Then open https://<Server IP or DNS>:9779. Updating and uninstalling work the same as on a scripted install.

On this page