Skip to content

Installation

MateusBMP edited this page Nov 16, 2026 · 3 revisions

Installation

Packages are built from the source tree; there are no published releases or repositories yet. Every package installs everything and enables nothing: see Turning protection on.

Supported systems

x86_64 systems with systemd, iptables 1.8.9 or later (nft or legacy backend) and Python 3.11 or later.

Distribution Python Tested in CI
Debian 12 (bookworm) 3.11 unit + firewall suites in containers, system suite in a qemu VM
Debian 13 (trixie) 3.13 same
Ubuntu 24.04 LTS 3.12 containers, system suite natively on a GitHub runner
Ubuntu 26.04 LTS distro same
Fedora 44 3.14 containers, qemu VM
Arch Linux rolling containers, qemu VM

Derivatives (Manjaro, Linux Mint, Pop!_OS, ...) are expected to work but are not tested in CI. Ubuntu 22.04 is not supported: its polkit 0.105 has no JavaScript rules.

Dependencies

Debian / Ubuntu Fedora Arch
Daemon and CLI python3-dnspython python3-httpx python3-h2 python3-jeepney iptables python3-dns python3-httpx python3-h2 python3-jeepney iptables-nft python-dnspython python-httpx python-h2 python-jeepney iptables
GUI python3-pyqt6 python3-pyqt6 python-pyqt6
Building translations qt6-l10n-tools qt6-linguist qt6-tools

Arch Linux / Manjaro

git clone https://github.com/MateusBMP/blockads-linux.git
cd blockads-linux
make arch-pkg                     # make dist (a tarball of the tree) + makepkg
sudo pacman -U packaging/arch/blockads-linux-*.pkg.tar.zst

The PKGBUILD packages a source tarball of the checkout; for a release it would point at the tagged GitHub archive instead. A pacman hook restarts a running daemon after the package or one of its Python libraries is upgraded. Removing the package (pacman -R blockads-linux) stops the service and removes the firewall rules first.

Debian 12/13, Ubuntu 24.04/26.04

git clone https://github.com/MateusBMP/blockads-linux.git
cd blockads-linux
cp -r packaging/debian debian
sudo apt build-dep ./
dpkg-buildpackage -us -uc -b
sudo apt install ../blockads-linux_*_all.deb

apt remove blockads-linux stops the service and removes the firewall rules; apt purge also deletes the settings, lists and logs in /var/lib/blockads-linux. Python byte code is compiled at install time and again after a Python upgrade (dh-python).

Other distributions: make install

make                 # builds the translations; needs lrelease (see Dependencies)
sudo make install
sudo make uninstall  # later
  • Every installed path is recorded in /var/lib/blockads-linux-install.manifest; running make install again upgrades.
  • It refuses to overwrite a file it did not install (for example one from a package) and changes nothing in that case.
  • If a copy or a system step fails, the files are put back as they were.
  • A changed /etc/blockads-linux/firewall.conf is kept; the new default is written next to it as firewall.conf.new.
  • On SELinux systems (Fedora) the executables get the bin_t label (semanage fcontext), which a systemd service needs for its TCP connections.
  • make uninstall stops the units, removes the firewall rules and exactly the recorded files. Settings and logs in /var/lib/blockads-linux and the blockads user are kept.

Turning protection on

sudo systemctl enable --now blockadsd.service blockads-update.timer blockads-update.path
blockadsctl status

Then open BlockAds from the application menu. The GUI can start the service without a password, but only an administrator can enable it at boot.

Test installs in VMs

tests/vm/install.sh install|uninstall installs the tree the same way for the disposable test VMs and CI runners.

Installed layout

Path Contents
/usr/lib/blockads-linux/ private Python code, launchers, blockads-fw, blockads-fw-emergency.sh
/usr/bin/blockadsctl, /usr/bin/blockads CLI and GUI
/etc/blockads-linux/firewall.conf firewall options (root-owned)
/var/lib/blockads-linux/ settings, compiled lists, query log and statistics
/run/blockads-fw/ helper state and lock (gone after a reboot)
systemd units blockadsd.socket, blockadsd-ipv6.socket, blockadsd-bridge.socket (opt-in), blockadsd.service, blockads-update.{service,timer,path}, blockads-failsafe.service

Clone this wiki locally