This host mirrors download.fedoraproject.org
— Everything, Updates, and Updates-Testing — across the currently
maintained Fedora releases plus Rawhide. Point dnf here to
speed up installs and cut outbound bandwidth. Replace
mirror.example.com below with this server's actual
hostname.
Edit Fedora's .repo files in
/etc/yum.repos.d/ — comment out
metalink=/mirrorlist= and set
baseurl= to the mirror instead.
[fedora]
name = Fedora $releasever - $basearch
#metalink = https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
baseurl = https://mirror.example.com/fedora/linux/releases/$releasever/Everything/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
[updates]
name = Fedora $releasever - $basearch - Updates
#metalink = https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
baseurl = https://mirror.example.com/fedora/linux/updates/$releasever/Everything/$basearch/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
Same pattern applies to
fedora-updates-testing.repo and the modular repos if
you're on a release that ships them.
Fedora ships a new release roughly every 6 months and maintains the two most recent, plus Rawhide (the rolling development branch).
| Release | Status |
|---|---|
Rawhide | Rolling development — always current |
| Latest stable | Maintained — ~13 months of updates |
| Previous stable | Maintained — until ~1 month after the next-next release ships |
| Older releases | EOL — no further updates from upstream |
Check the current version numbers at fedoraproject.org/wiki/Releases since the exact numbers roll forward every six months.
FROM fedora:latest
RUN sed -i 's|^metalink|#metalink|; s|^#baseurl=http://download.example|baseurl=https://mirror.example.com|' \
/etc/yum.repos.d/fedora*.repo && \
dnf makecache
Fedora's stock repo files already ship a commented-out
baseurl= line as a template — uncomment it and repoint it
rather than adding a new one, to avoid duplicate repo IDs.
dnf repolist -v | grep -i baseurl
curl -s https://mirror.example.com/fedora/linux/releases/40/Everything/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.example.com 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 Fedora signing key regardless of
which mirror served the bytes — switching baseurl
doesn't touch that chain.
Fedora's release cadence is faster than RHEL-family distros, so this mirror needs pruning of EOL release trees more often to stay useful — Rawhide and the two latest stable releases cover the vast majority of real traffic. 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.