mod_pagespeed
Install from packages.modpagespeed.com
A signed apt and yum repository for the mod_pagespeed Apache and nginx modules. One line detects the distro, installs the GPG signing key, writes the source file, and pulls the package. The nginx module ships prebuilt for Debian 12/13 and Ubuntu 22.04/24.04 (amd64 and arm64), and for RHEL/AlmaLinux/Rocky 9 (x86_64, aarch64) and 10 (x86_64), each pinned to that distro's stock nginx.
Install
curl -fsSL https://packages.modpagespeed.com/install.sh | sudo sh
Then install the module for your server. Apache:
# Debian 12/13, Ubuntu 22.04/24.04
sudo apt-get install mod-pagespeed
# AlmaLinux / RHEL / Rocky 9 and 10
sudo dnf install mod-pagespeed
nginx:
# Debian 12/13, Ubuntu 22.04/24.04: the worker first, then the module
sudo apt-get install pagespeed-optimizer
sudo apt-get install nginx-module-pagespeed
# AlmaLinux / RHEL / Rocky 9 and 10
sudo dnf install pagespeed-optimizer
sudo dnf install nginx-module-pagespeed
Install the pagespeed-optimizer worker before the native
nginx module, as two separate commands: the module package adds the nginx user to the
worker's group only when that group already exists, and in one transaction dnf runs the
module's script first. If the module went in first or alongside, run
sudo usermod -a -G pagespeed www-data on Debian and Ubuntu or
sudo usermod -a -G pagespeed nginx on Enterprise Linux, and
restart nginx. Then
configure nginx
to hand optimization to the worker and to serve the admin console, which nginx does not
serve until you set its path. Without the worker, the module runs on its own filters only.
Installing nginx-module-pagespeed drops a modules-enabled
auto-include snippet — there is nothing to copy by hand. Each
.so is pinned to its distro's exact stock nginx version
(nginx's --with-compat does not relax that check), so
upgrading nginx past the stock version needs a matching rebuild —
contact us
for a pinned build. This is also the prebuilt fix
if your ngx_pagespeed build is failing
on a modern nginx in the first place.
Supported today
nginx (nginx-module-pagespeed)
- • Debian 12 (bookworm), amd64 + arm64, stock nginx 1.22.1
- • Debian 13 (trixie), amd64 + arm64, stock nginx 1.26.3
- • Ubuntu 22.04 (jammy), amd64 + arm64, stock nginx 1.18.0
- • Ubuntu 24.04 (noble), amd64 + arm64, stock nginx 1.24.0
- • AlmaLinux 9 / RHEL 9 / Rocky 9 (el9), x86_64 + aarch64, stock nginx 1.20.1
- • AlmaLinux 10 / RHEL 10 / Rocky 10 (el10), x86_64
Apache (mod-pagespeed)
- • Debian 12 (bookworm), amd64 + arm64
- • Debian 13 (trixie), amd64 + arm64
- • Ubuntu 22.04 (jammy), amd64 + arm64
- • Ubuntu 24.04 (noble), amd64 + arm64
- • AlmaLinux 9 / RHEL 9 / Rocky 9 (el9), x86_64 + aarch64
- • AlmaLinux 10 / RHEL 10 / Rocky 10 (el10), x86_64
Debian 11 (bullseye): the repository's bullseye suite carries the 1.15.0 module packages. The mod_pagespeed packages need Debian 12 or newer.
EL8 is no longer in the generic yum repo. Contact us if you run an nginx version we don't yet package and need a pinned build.
cPanel / EasyApache 4: the ea-apache24-mod_pagespeed package
covers EL8 and EL9 (x86_64) and auto-enables on cPanel hosts. See the
cPanel guide.
Running ngx_pagespeed? See ngxpagespeed.com.
How it works
The install script detects the distribution, fetches the repository signing key (fingerprint
DF00 E296 BE91 41CE A541 1346 F50D 6054 F107 12A0),
and writes a single source file:
/etc/apt/sources.list.d/modpagespeed.list on apt,
or
/etc/yum.repos.d/modpagespeed.repo on yum.
Credentials and URLs stay out of the source file itself — apt credentials live in
/etc/apt/auth.conf.d/; the yum file is mode 0600.
Subsequent apt-get upgrade /
dnf upgrade picks up new releases automatically.
License
The package is the same mod_pagespeed build as the direct download links. Install it and it optimizes right away, including automatic WebP image optimization via the nginx module. mod_pagespeed is open source under the Apache License 2.0 — free in development and in production; what We-Amp sells is support; Priority and Enterprise add a private package repository (being set up). First-time setup is covered in the getting-started guide; see /download/ for the full integration matrix (Apache, nginx, IIS, ASP.NET Core).