Skip to main content

Install script

The install script is the recommended way to install and upgrade DeaconGuard.

Runs as root

The installer adds a system package and a service, so run it with sudo as shown, or as root without sudo. It never asks for a password itself: started without root, it stops before doing anything and shows the command to use.

Server​

curl -fsSL https://get.deaconguard.io | sudo sh -

The server listens on 8443 for the dashboard (people) and 8444 for agents; no option is needed for that. To give agents another port, or have them share 8443, add --agent-listen:

curl -fsSL https://get.deaconguard.io | sudo sh -s -- --agent-listen 0.0.0.0:9444
curl -fsSL https://get.deaconguard.io | sudo sh -s -- --agent-listen off

See Give agents their own port. Allow 8443 only from your administrators' networks and 8444 from your machines' networks; for machines in another network or data centre, see Reaching the agent port.

The script asks for the first dashboard account at the terminal. Where there is none, as with cloud-init, Ansible or docker exec, pass the account instead; without it the script stops before installing anything and says so:

curl -fsSL https://get.deaconguard.io | sudo sh -s -- --admin-user admin --admin-password-file /root/deaconguard-password

The file holds the password, at least 12 characters, on one line. Once the install finishes, the server scans its own machine with the recommended checks, once.

The packages run as systemd services. On a machine without systemd, such as Alpine, the script stops before installing anything and shows how to run DeaconGuard with Docker Compose instead.

Agent​

Run the command from the dashboard's Enroll a machine dialog. It carries the machine's enrollment token:

curl -fsSL https://get.deaconguard.io | DEACONGUARD_TOKEN=deaconguard1.… sudo -E sh -

sudo -E hands the token to the installer through the environment, so it never appears on a command line other users of the machine can see. If your sudo rules don't allow -E, open a root shell with sudo -i and run the command without sudo -E.

On a Mac​

The same command installs the agent on a Mac, from DeaconGuard 1.8.0, as an administrator in Terminal. On a Mac the script:

  1. downloads the release's macOS archive for the Mac's processor (Apple silicon or Intel), and cosign for macOS, pinned by version and checksum;
  2. checks that checksums.txt was signed by the release workflow and that the archive matches it, as on Linux;
  3. installs deaconguard to /usr/local/bin;
  4. runs deaconguard setup agent, which enrolls the Mac and starts the agent as the launchd daemon io.deaconguard.agent (/Library/LaunchDaemons/io.deaconguard.agent.plist), running as root and logging to /var/log/deaconguard-agent.log.

It installs nothing else: the ClamAV and YARA scans are for Linux. Run it again to upgrade; it restarts the daemon with the new version. A Mac runs the agent only; the server runs on Linux.

What the script does​

  1. Detects the distribution and the processor (amd64 or arm64).

  2. Installs what DeaconGuard's checks use, on servers and agents alike, from the distribution's own signed repositories. Packages that are already installed are left as they are:

    ForDebian, UbuntuRHEL, Rocky, AlmaLinux, Oracle Linux, Fedora, Amazon Linux 2023openSUSE Leap, SUSE Linux Enterprise
    Malware check (ps, find)procps, findutilsprocps-ng, findutilsprocps, findutils
    Security configuration check (ss)iproute2iprouteiproute2
    Pending-reboot check(not needed)needs-restarting(not needed)
    Antivirus scan, Basicclamav, clamav-freshclamclamav and its updater; on RHEL and its rebuilds from EPEL, which the script enables (oracle-epel-release on Oracle Linux)clamav

    It switches on ClamAV's signature updates (clamav-freshclam, or freshclam.timer on SUSE): about 110 MB of signatures download in the background after the install, then stay current.

  3. Installs YARA-X (yr, for the advanced antivirus scan) and cosign (to verify releases) to /usr/local/bin: each a pinned version, checked against a pinned checksum. A yr installed elsewhere, such as by a package, and an existing cosign are left as they are.

  4. Downloads the matching .deb or .rpm package and the release's checksums.txt from GitHub over HTTPS.

  5. Verifies with cosign that checksums.txt was signed by DeaconGuard's release workflow, then checks the package against it. DeaconGuard is not installed when a check fails.

  6. Installs the package, then runs deaconguard setup server or deaconguard setup agent. A server also gets an agent on the same machine, so the server's own machine is scanned as root (--no-agent skips it); see Architecture.

Each release's notes on GitHub list the exact versions it was built with, and its SBOM lists every dependency.

get.deaconguard.io serves install.sh from the deaconguard repository's main branch, and the script installs the latest release unless you choose a version.

Server or agent?​

You runThe script sets up
… | sudo sh - on a new machinea server, with an agent that scans this machine
… | DEACONGUARD_TOKEN=… sudo -E sh -an agent, enrolled with that token
… | sudo sh - on a machine that is already an enrolled agentan upgrade of the agent (it never turns an agent into a server)
… | sudo sh - on a serveran upgrade of the server and its agent
… | sudo sh -s -- --server or --agentthe mode you name

Root and sudo​

Installing a package and a service needs root. Use the commands as shown, with sudo, or run them as root without sudo. As a user without root, the script stops before downloading anything and prints the right command; it never calls sudo or asks for a password itself.

Options​

Options go after sh -s --:

curl -fsSL https://get.deaconguard.io | sudo sh -s -- --listen 0.0.0.0:9443
Option or variableEffect
DEACONGUARD_TOKEN=…Enroll an agent with this token.
DEACONGUARD_NAME=… (with sudo -E) or --name NAMEShow the agent's host by this name instead of its hostname.
DEACONGUARD_VERSION=1.35.0 (with sudo -E) or --version 1.35.0Install that release instead of the latest.
--server, --agentChoose the mode explicitly.
Server: --listen, --agent-listen, --tls-cert/--tls-key, --admin-user/--admin-password-fileSee Server.
Agent: --token-file FILE, --name NAME, --forceSee Agents.

Read the script first​

To read the script before running it:

curl -fsSLO https://github.com/Cloudopsshell/deaconguard/releases/latest/download/install.sh
less install.sh
sudo sh install.sh

Without the script​

To install the package yourself, see Manual install.