Speed up software downloads and upgrades by using the Webdock package repositories

Last updated: August 11th 2025

Introduction

You may know that Ubuntu/Debian host their own APT mirrors across the world. APT on your servers uses on one of those mirrors to download packages from them. However, these mirrors are physically far from your Webdock server, thereby adding up latency and slower package downloads.

Webdock now offers an in-house APT mirror. This guide provides instructions on how to use this mirror instead. This drastically reduces the latency and relatively increases package download speeds.

Let's get started! 

Note: This change is only necessary for servers provisioned before August 11th. New servers already use the in-house APT mirror!

Initial Steps

Switch to root first.

$ sudo su

Now we'll start by removing the default APT mirror configuration.

# rm /etc/apt/sources.list
# rm /etc/apt/sources.list.d/ubuntu.sources

Do not worry if the second command errors out, just continue :D

Next, we'll write a cloud-init config which prevents cloud-init from rewriting the repo settings.

# cat > /etc/cloud/cloud.cfg.d/99_preserve_ubuntu_sources.cfg << EOF
apt_preserve_sources_list: true
EOF 

Mirror Setup

Ubuntu by default uses "archive.ubuntu.com" APT mirror. To change it to Webdock mirror run the below commands on the command line as root user based on the distro you are running.

Ubuntu Noble (Ubuntu 24.04)

The following command will change the repo to Webdock Ubuntu Noble mirror.

# cat > /etc/apt/sources.list << EOF 
deb http://ubuntu.mirror.webdock.tech/ubuntu noble main restricted universe multiverse
deb http://ubuntu.mirror.webdock.tech/ubuntu noble-updates main restricted universe multiverse
deb http://ubuntu.mirror.webdock.tech/ubuntu noble-security main restricted universe multiverse
EOF 

Once you did that, run an APT update and you'll see APT hitting Webdock's mirror. 

You'd see something like this:

philip@newubuntu:~$ sudo apt update
Hit:1 http://ubuntu.mirror.webdock.tech/ubuntu noble InRelease
Hit:2 http://ubuntu.mirror.webdock.tech/ubuntu noble-updates InRelease
Hit:3 http://ubuntu.mirror.webdock.tech/ubuntu noble-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Ubuntu Jammy (Ubuntu 22.04)

The following command will change the repo to Webdock Ubuntu Jammy mirror.

# cat > /etc/apt/sources.list << EOF
deb http://ubuntu.mirror.webdock.tech/ubuntu jammy main restricted universe multiverse
deb http://ubuntu.mirror.webdock.tech/ubuntu jammy-updates main restricted universe multiverse
deb http://ubuntu.mirror.webdock.tech/ubuntu jammy-security main restricted universe multiverse
EOF

Once you did that, run an APT update and you'll see APT hitting Webdock's mirror. 

The output will look something like this:

philip@newubuntu:~$ sudo apt update
Hit:1 http://ubuntu.mirror.webdock.tech/ubuntu jammy InRelease
Hit:2 http://ubuntu.mirror.webdock.tech/ubuntu jammy-updates InRelease
Hit:3 http://ubuntu.mirror.webdock.tech/ubuntu jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Debian Bookworm (Debian 12)

Run:

# cat > /etc/apt/sources.list << EOF 
deb http://debian.mirror.webdock.tech/debian bookworm main contrib
deb http://debian.mirror.webdock.tech/debian bookworm-updates main contrib
deb http://deb.debian.org/debian-security/ bookworm-security main contrib
EOF

We intentionally pull security updates from Debian directly as that is what Debian has recommended.

An APT update result will look something like this:

philip@newubuntu:~$ sudo apt update
Hit:1 http://debian.mirror.webdock.tech/debian bookworm InRelease
Hit:2 http://debian.mirror.webdock.tech/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Conclusion

That's it. With the in-house repo you'll get faster download speeds and hence the update/upgrade time reduces by a significant margin.

If you encounter any issues or need assistance with this, feel free to contact our support.

Related articles

chat box icon
Close
combined chatbox icon

Welcome to our Chatbox

Reach out to our Support Team or chat with our AI Assistant for quick and accurate answers.
webdockThe Webdock AI Assistant is good for...
webdockChatting with Support is good for...