Your CompanyPlatform Engineering
mirror online

fedora-mirror / dnf pull-through cache

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.

01 — REPO FILES

Point baseurl at the mirror, disable metalink

Edit Fedora's .repo files in /etc/yum.repos.d/ — comment out metalink=/mirrorlist= and set baseurl= to the mirror instead.

/etc/yum.repos.d/fedora.repo
[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
/etc/yum.repos.d/fedora-updates.repo
[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.

02 — SUPPORTED RELEASES

What this mirror carries

Fedora ships a new release roughly every 6 months and maintains the two most recent, plus Rawhide (the rolling development branch).

ReleaseStatus
RawhideRolling development — always current
Latest stableMaintained — ~13 months of updates
Previous stableMaintained — until ~1 month after the next-next release ships
Older releasesEOL — no further updates from upstream

Check the current version numbers at fedoraproject.org/wiki/Releases since the exact numbers roll forward every six months.

03 — DOCKER / CI

Repoint inside a build

Dockerfile
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.

04 — VERIFY

Confirm dnf is pulling through the mirror

shell
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
CheckExpected result
dnf repolist -vShows mirror.example.com as the baseurl
GET /repodata/repomd.xml200 — mirror is reachable
First install of a packageSlower — cache miss, fetched from upstream and stored
Repeat install elsewhere on the networkFast — served from local cache
05 — NOTES
Package integrity is unaffected. 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.