This repository provides a small installer based on the official AdGuard CLI
installation script. It downloads the release archive from the official
AdGuard CLI GitHub repository, installs the program under
/usr/lib/adguard-cli, and creates a systemd service.
This is an unofficial installation wrapper. It is not an official AdGuard package or installer.
- Debian or another systemd-based Linux distribution.
amd64oraarch64architecture.curl,tar, andsudowhen the script is not run as root.- Root access.
Download the installer and run:
chmod +x install.sh
sudo ./install.shThe installer downloads the official release archive and installs the files under:
/usr/lib/adguard-cli/
It also creates:
/usr/bin/adguard-cli -> /usr/lib/adguard-cli/adguard-cli
/usr/lib/adguard-cli/adguard-cli.service
/etc/systemd/system/adguard-cli.service -> /usr/lib/adguard-cli/adguard-cli.service
The installer does not create or modify a service user or group. It identifies
the current user running the installer (or SUDO_USER when invoked with
sudo) and replaces the SERVICE_USER and SERVICE_GROUP placeholders in
the generated service unit with that user's name and primary group.
The service is not started automatically before AdGuard CLI has been configured. This avoids a restart loop on a fresh installation.
Configure AdGuard CLI as the user that will run the service:
sudo env \
HOME="$HOME" \
XDG_DATA_HOME="$HOME/.local/share" \
/usr/bin/adguard-cli configActivate a license when required:
sudo env \
HOME="$HOME" \
XDG_DATA_HOME="$HOME/.local/share" \
/usr/bin/adguard-cli activate YOUR-ACTIVATION-CODEThen enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable --now adguard-cli.serviceCheck its status and logs:
systemctl status adguard-cli.service
sudo journalctl -u adguard-cli.service -fThe installed unit is intentionally kept at:
/usr/lib/adguard-cli/adguard-cli.service
The system-wide link is:
/etc/systemd/system/adguard-cli.service
The service unit uses the installer user's account and primary group and runs:
/usr/bin/adguard-cli start
The installer retains the official script options:
Usage: install.sh [-o output_dir] [-v] [-h] [-u] [-V version] [-l]
Examples:
sudo ./install.sh -v
sudo ./install.sh -V 1.4.13
sudo ./install.sh -uBy default, the current script version is used. The -l option is intended
for installing a local archive with the same naming expected by the official
script.
Stop and remove the installed service and program with:
sudo ./install.sh -uThe service link, service file, /usr/bin/adguard-cli link, and installed
program files are removed. The service account and its data are preserved so
that an accidental reinstall does not delete configuration.
For a visual status indicator for the global systemd service, run the setup script as the desktop user:
./setup-adguard-tray.shThe script installs the required packages, creates green and red status icons,
installs the tray application under ~/.local/bin/, and enables automatic
startup with the graphical session. The tray application controls the global
adguard-cli.service through PolicyKit and checks its status every five
seconds.
Start it immediately with:
~/.local/bin/adguard-cli-trayRun the setup script as the regular desktop user, not with sudo.
The installer changes and repository documentation are distributed under the GNU General Public License v3.0. AdGuard CLI and its bundled components remain subject to their respective upstream licenses.