Ubuntu Mirror¶
A local mirror of the Ubuntu package archive inside the TUKE network. Faster updates without pulling data from Canada or Germany.
-
Faster
apt updateandapt upgradepull data from TUKE, not from across the world. -
Identical to upstream
An exact copy of the official archive including signatures. Packages are verified the same way.
-
Available anywhere
Works from the TUKE network and from home, without VPN.
-
Over HTTPS
The transfer is encrypted.
Address¶
| Repository | URL |
|---|---|
| Ubuntu archive | https://mirror.tuke.sk/ubuntu/ |
| Security updates | https://mirror.tuke.sk/ubuntu/ |
Security lives on the same mirror
Unlike the Ubuntu default, where security.ubuntu.com is a separate server, here the main archive and -security share one address. A single URL is enough in your configuration.
Supported releases¶
| Codename | Version | Status |
|---|---|---|
resolute |
26.04 LTS | Current LTS |
noble |
24.04 LTS | LTS |
jammy |
22.04 LTS | LTS |
focal |
20.04 LTS | Nearing end of support |
questing |
25.10 | Interim release |
The mirror also carries older releases (bionic, xenial, trusty), but those no longer receive security patches.
Do not enable -proposed
The mirror also carries -proposed branches. They contain untested packages and can break your installation on a normal system. Use only -updates, -security and optionally -backports.
Configuration¶
Ubuntu 24.04 changed the source list format. Pick the one matching your release. If you are not sure, check it with:
These releases use the deb822 format in /etc/apt/sources.list.d/ubuntu.sources.
Back up the original file¶
Rewrite the addresses to the mirror¶
sudo sed -i -E 's#https?://([a-z]{2}\.)?(archive|security)\.ubuntu\.com/ubuntu/?#https://mirror.tuke.sk/ubuntu/#g' \
/etc/apt/sources.list.d/ubuntu.sources
Refresh the package lists¶
Alternative: write the file from scratch
If you want to be certain what the file looks like, replace it entirely. The codename is filled in automatically from the installed release:
. /etc/os-release
sudo tee /etc/apt/sources.list.d/ubuntu.sources > /dev/null <<EOF
Types: deb
URIs: https://mirror.tuke.sk/ubuntu/
Suites: ${UBUNTU_CODENAME} ${UBUNTU_CODENAME}-updates ${UBUNTU_CODENAME}-backports ${UBUNTU_CODENAME}-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
EOF
Careful: this discards any custom edits in the file. Back it up first.
Older releases use the classic /etc/apt/sources.list.
Back up and rewrite the addresses¶
sudo sed -i.bak -E 's#https?://([a-z]{2}\.)?(archive|security)\.ubuntu\.com/ubuntu/?#https://mirror.tuke.sk/ubuntu/#g' \
/etc/apt/sources.list
The -i.bak switch saves the original as /etc/apt/sources.list.bak.
Refresh the package lists¶
Third-party repositories are left alone
The command only changes *.ubuntu.com addresses. Lines such as archive.canonical.com, PPAs or the Docker APT repository stay unchanged, because they are not on the mirror.
If you would rather avoid the terminal:
Open Software & Updates¶
Press Super, type Software & Updates and open the application.
Change the download source¶
On the Ubuntu Software tab, open Download from and pick Other…
Enter a custom server¶
Click Custom Server… and enter:
Confirm with Choose Server, close the window and let Reload finish.
Check the security updates too
The graphical tool usually changes only the main archive. The -security suite may stay on security.ubuntu.com. Verify with:
If anything shows up, fix it using the procedure for your release on the tabs above.
Verification¶
Check that the mirror is in use and no original address is left behind:
grep -rE 'mirror\.tuke\.sk|(archive|security)\.ubuntu\.com' \
/etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null
Then confirm that apt really downloads from the mirror:
What success looks like
The output shows lines starting with Hit: or Get: pointing at https://mirror.tuke.sk/ubuntu, ending with Reading package lists... Done and no errors.
Reverting to the original settings¶
Common problems¶
Certificate verification failed
The system has outdated CA certificates, or the clock is wrong.
If the time is significantly off: sudo timedatectl set-ntp true
The repository ... does not have a Release file
Usually a typo in the address, or a codename the mirror does not carry.
Check that the address is exactly https://mirror.tuke.sk/ubuntu/ and that the codename is in the list of supported releases.
apt update works, but installs still download from the internet
You changed only one of the files. Search all of them:
Do PPAs and third-party repositories work?
No. The mirror carries only the official Ubuntu archive. PPAs, archive.canonical.com, Docker and similar repositories keep downloading from their own servers. That is expected and nothing needs changing.
Does it work on ARM (arm64) machines?
The mirror carries the main archive, not ubuntu-ports. On architectures served by ports.ubuntu.com, keep the original configuration. Virtual servers in TUKE Cloud are x86-64, so this does not apply to them.