Introduction
We maintain a local mirror of Debian/Ubuntu packages to conserve internet bandwidth and to speed up software updates and installations. The mirror is preconfigured as package source in the standard images for both cloud and dedicated servers. When installing manually, you can configure it using the directives below.
IPv6
If your server is IPv6 capable, you can also access the mirror directly with IPv6. There are no necessary changes.
Debian 12 (bookworm)
The mirror can be added by creating a /etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
#Packages and Security Updates from the Hetzner Debian Mirror
deb https://mirror.hetzner.com/debian/packages bookworm main contrib non-free non-free-firmware
deb https://mirror.hetzner.com/debian/packages bookworm-updates main contrib non-free non-free-firmware
deb https://mirror.hetzner.com/debian/packages bookworm-backports main contrib non-free non-free-firmware
deb https://mirror.hetzner.com/debian/security bookworm-security main contrib non-free non-free-firmware
Debian 11 (bullseye)
The mirror can be added by creating a /etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
#Packages and Security Updates from the Hetzner Debian Mirror
deb https://mirror.hetzner.com/debian/packages bullseye main contrib non-free
deb https://mirror.hetzner.com/debian/packages bullseye-updates main contrib non-free
deb https://mirror.hetzner.com/debian/packages bullseye-backports main contrib non-free
deb https://mirror.hetzner.com/debian/security bullseye-security main contrib non-free
Ubuntu 24.04 Noble Numbat
for arm64-based servers
Using the Deb822-style format, the mirror can be added by creating a
/etc/apt/sources.list.d/hetzner-mirror.sources
file with the following content:
Types: deb
URIs: https://mirror.hetzner.com/ubuntu-ports/packages
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
## Ubuntu security updates
Types: deb
URIs: https://mirror.hetzner.com/ubuntu-ports/security
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Using the One-Line-Style format, the mirror can be added by creating a
/etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
# Packages and Updates from the Hetzner Ubuntu Mirror
deb https://mirror.hetzner.com/ubuntu-ports/packages noble main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu-ports/packages noble-updates main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu-ports/packages noble-backports main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu-ports/packages noble-security main restricted universe multiverse
for x86-based servers
Using the Deb822-style format, the mirror can be added by creating a
/etc/apt/sources.list.d/hetzner-mirror.sources
file with the following content:
Types: deb
URIs: https://mirror.hetzner.com/ubuntu/packages
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
## Ubuntu security updates
Types: deb
URIs: https://mirror.hetzner.com/ubuntu/security
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Using the One-Line-Style format, the mirror can be added by creating a
/etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
# Packages and Updates from the Hetzner Ubuntu Mirror
deb https://mirror.hetzner.com/ubuntu/packages noble main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu/packages noble-updates main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu/packages noble-backports main restricted universe multiverse
deb https://mirror.hetzner.com/ubuntu/packages noble-security main restricted universe multiverse
Ubuntu 22.04 Jammy Jellyfish
for arm64-based servers
The mirror can be added by creating a /etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
# Packages and Updates from the Hetzner Ubuntu Mirror
deb http://mirror.hetzner.com/ubuntu-ports/packages jammy main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu-ports/packages jammy-updates main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu-ports/packages jammy-backports main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu-ports/packages jammy-security main restricted universe multiverse
for x86-based servers
The mirror can be added by creating a /etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
# Packages and Updates from the Hetzner Ubuntu Mirror
deb http://mirror.hetzner.com/ubuntu/packages jammy main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu/packages jammy-updates main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu/packages jammy-backports main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu/packages jammy-security main restricted universe multiverse
Ubuntu 20.04 Focal Fossa
for arm64-based servers
The mirror can be added by creating a /etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
# Packages and Updates from the Hetzner Ubuntu Mirror
deb http://mirror.hetzner.com/ubuntu-ports/packages focal main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu-ports/packages focal-updates main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu-ports/packages focal-backports main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu-ports/packages focal-security main restricted universe multiverse
for x86-based servers
The mirror can be added by creating a /etc/apt/sources.list.d/hetzner-mirror.list
file with the following content
# Packages and Updates from the Hetzner Ubuntu Mirror
deb http://mirror.hetzner.com/ubuntu/packages focal main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu/packages focal-updates main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu/packages focal-backports main restricted universe multiverse
deb http://mirror.hetzner.com/ubuntu/packages focal-security main restricted universe multiverse
Entry in preseed files
You can configure the Hetzner mirror in the preseed files as follows: (You can replace debian with ubuntu):
d-i mirror/http/hostname string mirror.hetzner.com
d-i mirror/http/directory string /debian/packages
For arm64-based servers using Ubuntu
d-i mirror/http/hostname string mirror.hetzner.com
d-i mirror/http/directory string /ubuntu-ports/packages