Updated: 28 September 2026 · Applies to: Debian 12

Debian 9 and 10 are no longer supported, so this guide now uses Debian 12 (Ubuntu 24.04 works the same way).

Brotli compresses text better than gzip. On current Debian and Ubuntu you do not need to compile it: the command-line tool is packaged.

Install the tool

apt install brotli
brotli -k style.css        # creates style.css.br
brotli -d style.css.br      # decompress

Build from source (if you need the latest version)

apt install git cmake build-essential
git clone https://github.com/google/brotli.git && cd brotli
mkdir out && cd out && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . --config Release --target install

Tip: For websites, enable Brotli in the web server or CDN rather than compressing files by hand.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Linux server management

hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.

Was this answer helpful?

Still stuck? Open a ticket