This host mirrors repo.almalinux.org — BaseOS,
AppStream, extras, and CRB — across the currently supported AlmaLinux
major releases. Point dnf/yum here to speed up
installs and cut outbound bandwidth. The examples below use
mirror.sepehrsabz.ir/almalinux.
Edit AlmaLinux's .repo files in
/etc/yum.repos.d/ — comment out mirrorlist=
and set baseurl= to the mirror instead.
[baseos]
name = AlmaLinux $releasever - BaseOS
#mirrorlist = https://mirrors.almalinux.org/mirrorlist/$releasever/baseos
baseurl = https://mirror.sepehrsabz.ir/almalinux/$releasever/BaseOS/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
[appstream]
name = AlmaLinux $releasever - AppStream
#mirrorlist = https://mirrors.almalinux.org/mirrorlist/$releasever/appstream
baseurl = https://mirror.sepehrsabz.ir/almalinux/$releasever/AppStream/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
[crb]
name = AlmaLinux $releasever - CRB
#mirrorlist = https://mirrors.almalinux.org/mirrorlist/$releasever/crb
baseurl = https://mirror.sepehrsabz.ir/almalinux/$releasever/CRB/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
CRB (CodeReady Builder, formerly PowerTools on
AlmaLinux 8) is disabled by default — enable it with
dnf config-manager --set-enabled crb if you need
development headers or static libs from it.
| Version | Upstream base | Notes |
|---|---|---|
10 | RHEL 10 | Current major release |
9 | RHEL 9 | Long-term maintained |
8 | RHEL 8 | Maintained until EOL, check upstream |
AlmaLinux tracks RHEL's own support lifecycle 1:1 — check wiki.almalinux.org/release-notes for exact end-of-life dates for each major version, since they follow Red Hat's published schedule rather than AlmaLinux's own cadence.
FROM almalinux:9
RUN sed -i 's|^mirrorlist|#mirrorlist|; s|^#baseurl=https://repo.almalinux.org|baseurl=https://mirror.sepehrsabz.ir|' \
/etc/yum.repos.d/almalinux*.repo && \
dnf makecache
The official AlmaLinux images already ship a
commented-out baseurl= template pointing at
repo.almalinux.org — uncomment and repoint that line rather
than adding a new one, to avoid duplicate repo IDs.
dnf repolist -v | grep -i baseurl
curl -s https://mirror.sepehrsabz.ir/almalinux/9/BaseOS/x86_64/os/repodata/repomd.xml -o /dev/null -w "%{http_code}\n"
# install something and time it
time sudo dnf install -y htop
| Check | Expected result |
|---|---|
dnf repolist -v | Shows mirror.sepehrsabz.ir as the baseurl |
GET /repodata/repomd.xml | 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 |
gpgcheck=1 still
validates every package against the AlmaLinux signing key regardless
of which mirror served the bytes — switching baseurl
doesn't touch that chain.
AlmaLinux is a 1:1 binary-compatible rebuild of RHEL, governed by the AlmaLinux OS Foundation — package versions and update timing track Red Hat's upstream releases closely. This mirror doesn't publish packages, only reads. If it's served over plain HTTP internally, that's fine for dnf — package signatures, not transport TLS, are what dnf actually trusts by default.