Install script
The install script is the recommended way to install and upgrade DeaconGuard.
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:
- downloads the release's macOS archive for the Mac's processor (Apple silicon or Intel), and cosign for macOS, pinned by version and checksum;
- checks that
checksums.txtwas signed by the release workflow and that the archive matches it, as on Linux; - installs
deaconguardto/usr/local/bin; - runs
deaconguard setup agent, which enrolls the Mac and starts the agent as the launchd daemonio.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
-
Detects the distribution and the processor (amd64 or arm64).
-
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:
For Debian, Ubuntu RHEL, Rocky, AlmaLinux, Oracle Linux, Fedora, Amazon Linux 2023 openSUSE Leap, SUSE Linux Enterprise Malware check ( ps,find)procps,findutilsprocps-ng,findutilsprocps,findutilsSecurity configuration check ( ss)iproute2iprouteiproute2Pending-reboot check (not needed) needs-restarting(not needed) Antivirus scan, Basic clamav,clamav-freshclamclamavand its updater; on RHEL and its rebuilds from EPEL, which the script enables (oracle-epel-releaseon Oracle Linux)clamavIt switches on ClamAV's signature updates (
clamav-freshclam, orfreshclam.timeron SUSE): about 110 MB of signatures download in the background after the install, then stay current. -
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. Ayrinstalled elsewhere, such as by a package, and an existing cosign are left as they are. -
Downloads the matching
.debor.rpmpackage and the release'schecksums.txtfrom GitHub over HTTPS. -
Verifies with cosign that
checksums.txtwas signed by DeaconGuard's release workflow, then checks the package against it. DeaconGuard is not installed when a check fails. -
Installs the package, then runs
deaconguard setup serverordeaconguard setup agent. A server also gets an agent on the same machine, so the server's own machine is scanned as root (--no-agentskips 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 run | The script sets up |
|---|---|
… | sudo sh - on a new machine | a 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 agent | an upgrade of the agent (it never turns an agent into a server) |
… | sudo sh - on a server | an upgrade of the server and its agent |
… | sudo sh -s -- --server or --agent | the 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 variable | Effect |
|---|---|
DEACONGUARD_TOKEN=… | Enroll an agent with this token. |
DEACONGUARD_NAME=… (with sudo -E) or --name NAME | Show the agent's host by this name instead of its hostname. |
DEACONGUARD_VERSION=1.35.0 (with sudo -E) or --version 1.35.0 | Install that release instead of the latest. |
--server, --agent | Choose the mode explicitly. |
Server: --listen, --agent-listen, --tls-cert/--tls-key, --admin-user/--admin-password-file | See Server. |
Agent: --token-file FILE, --name NAME, --force | See 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.