This host mirrors archive.ubuntu.com and
security.ubuntu.com — main, universe, restricted, and
multiverse — across every currently supported Ubuntu release, from
18.04 LTS through 26.04 LTS. Point apt here to speed up
apt update/apt install and cut outbound
bandwidth. The copy-ready examples below use
mirror.sepehrsabz.ir/ubuntu.
Works on any release still using the classic
/etc/apt/sources.list file — swaps both the main archive
and security hosts in place.
# back up first
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's|archive.ubuntu.com|mirror.sepehrsabz.ir|g; s|security.ubuntu.com|mirror.sepehrsabz.ir|g' /etc/apt/sources.list
sudo apt update
Substitute your release's codename (jammy,
focal, bionic, etc.) in place of
<codename> below.
deb https://mirror.sepehrsabz.ir/ubuntu <codename> main restricted universe multiverse
deb https://mirror.sepehrsabz.ir/ubuntu <codename>-updates main restricted universe multiverse
deb https://mirror.sepehrsabz.ir/ubuntu <codename>-backports main restricted universe multiverse
deb https://mirror.sepehrsabz.ir/ubuntu <codename>-security main restricted universe multiverse
Ubuntu 24.04 (Noble) and later ship the newer Deb822
/etc/apt/sources.list.d/ubuntu.sources format by default.
Types: deb
URIs: https://mirror.sepehrsabz.ir/ubuntu
Suites: <codename> <codename>-updates <codename>-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: https://mirror.sepehrsabz.ir/ubuntu
Suites: <codename>-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
The existing ubuntu-archive-keyring.gpg
package signature is unaffected by the source change — packages are
still cryptographically verified the same way.
| Version | Codename | Type | Status |
|---|---|---|---|
26.04 | Resolute Raccoon | LTS | Current — supported to 2031 |
25.10 | Questing Quokka | Interim | EOL ~Jul 2026 (9-month window) |
24.04 | Noble Numbat | LTS | Supported to 2029 |
22.04 | Jammy Jellyfish | LTS | Supported to 2027 |
20.04 | Focal Fossa | LTS | Standard support ended — ESM via Ubuntu Pro |
18.04 | Bionic Beaver | LTS | EOL — ESM via Ubuntu Pro only |
EOL suites are still mirrored under
old-releases pathing for archival/reproducibility purposes,
but no longer receive new security patches from upstream regardless of
which mirror you use — upgrade if you're on one of them.
FROM ubuntu:24.04
RUN sed -i 's|http://archive.ubuntu.com|https://mirror.sepehrsabz.ir|g; s|http://security.ubuntu.com|https://mirror.sepehrsabz.ir|g' \
/etc/apt/sources.list.d/ubuntu.sources && \
apt-get update
FROM ubuntu:22.04
RUN sed -i 's|archive.ubuntu.com|mirror.sepehrsabz.ir|g; s|security.ubuntu.com|mirror.sepehrsabz.ir|g' \
/etc/apt/sources.list && \
apt-get update
apt-cache policy | head -5
curl -s https://mirror.sepehrsabz.ir/ubuntu/dists/jammy/Release -o /dev/null -w "%{http_code}\n"
# install something and time it
time sudo apt install -y curl
| Check | Expected result |
|---|---|
apt-cache policy | Lists mirror.sepehrsabz.ir as a source |
GET /dists/<codename>/Release | 200 — mirror is reachable |
| First install of a package | Slower — cache miss, fetched from upstream and stored |
| Repeat install elsewhere on the network | Fast — served from local cache |
.deb and
its Release/Packages index is still verified
against Canonical's archive signing keys regardless of which mirror
served the bytes — switching the source URL doesn't weaken that chain.
This mirror doesn't publish packages — there's no upload path here,
only reads. If you're running Ubuntu Pro / ESM for an older LTS,
those entitlement-gated repos (esm.ubuntu.com) are
separate from this archive mirror and still need to be configured
against Canonical directly. If it's served over plain HTTP
internally, that's fine for apt — package signatures, not transport
TLS, are what apt actually trusts.