How to install AdGuard Home on linux:

AdGuard Home is a network-wide software for blocking ads & tracking. After you set it up, it’ll cover ALL your home devices, and you don’t need any client-side software for that. With the rise of Internet-Of-Things and connected devices, it becomes more and more important to be able to control your whole network.

The official installation method of Adguard Home doesn’t work on Alpine Linux, due to absence of Systemd. However, it’s pretty simple to run it with OpenRC:

1- wget the Adguard archive (from Github), extract to /opt/AdGuardHome

2- nano /etc/init.d/adguardhome and add the following


#!/sbin/openrc-run
#
# openrc service-script for AdGuardHome
#
# place in /etc/init.d/
# start on boot: "rc-update add adguardhome"
# control service: "service adguardhome <start|stop|restart|status|checkconfig>"
#

#description="AdGuard Home: Network-level blocker"

pidfile="/run/$RC_SVCNAME.pid"
command="/opt/AdGuardHome/AdGuardHome"
command_args="-s run"
command_background=true

extra_commands="checkconfig"

depend() {
need net
provide dns
after firewall
}

checkconfig() {
"$command" --check-config || return 1
}

stop() {
if [ "${RC_CMD}" = "restart" ] ; then
checkconfig || return 1
fi

ebegin "Stopping $RC_SVCNAME"
start-stop-daemon --stop --exec "$command" \
--pidfile "$pidfile" --quiet
eend $?
}


Start the service and enable at boot

rc-update add adguardhome