apt-cacher-ultra

apt-cacher-ultra

Docker app from hoody424's Repository

Overview

Caching proxy for Debian and Ubuntu package downloads (apt). The first machine that installs a package fetches it from the internet; every other machine gets it from your server. A maintained replacement for apt-cacher-ng: same port 3142 and the same client settings, so existing clients keep working. Checks every file against the repository's signed index, and keeps serving cached packages when a mirror is slow or down. Clients: put Acquire::http::Proxy "http://SERVER-IP:3142"; into /etc/apt/apt.conf.d/01proxy. HTTPS repositories are not cached unless their sources line is changed to http://HTTPS///host/path. The config is written to /config/config.toml on the first start; edit it there and restart. The status page and Prometheus metrics are on port 6789.

apt-cacher-ultra for Unraid

apt-cacher-ultra is a caching proxy for Debian and Ubuntu packages. The first machine that runs apt install or apt upgrade downloads the files from the internet; all others get them from your server. It is a maintained replacement for apt-cacher-ng: same port 3142, same proxy mode and the same http://HTTPS/// URL convention, so clients set up for apt-cacher-ng keep working.

  • Every file is checked against the repository's signed index.
  • While a mirror is down or slow, cached packages and indexes are still served.
  • Status page and Prometheus metrics on port 6789.

Template: apt-cacher-ultra.xml, image: ghcr.io/hoody424/apt-cacher-ultra (amd64), built from image/. Upstream publishes release binaries but no image. This one downloads the release binary, checks its SHA256 and adds a small start script. It is rebuilt every week with the newest release and Alpine updates, and tagged latest plus the version (for example 1.0.2).

Setup

  1. Install the template. The defaults work as they are.

  2. On every Debian/Ubuntu client, create /etc/apt/apt.conf.d/01proxy:

    Acquire::http::Proxy "http://SERVER-IP:3142";
    

    Laptops that are not always on your network can use auto-apt-proxy instead, which falls back to a direct connection.

  3. Run apt update on a client. The status page http://SERVER-IP:6789/ shows the repositories it has seen.

HTTPS repositories

Downloads from https:// sources are not cached; they go straight to the repository. To cache one, change its sources line from https://host/path to http://HTTPS///host/path. apt-cacher-ultra fetches it over HTTPS, and apt still checks the repository signature. Example for a .list file:

deb [signed-by=/usr/share/keyrings/example.gpg] http://HTTPS///repo.example.com/debian stable main

Configuration

On the first start the container writes /config/config.toml (appdata config/). Edit it and restart the container. All options are in the upstream reference. Settings worth looking at:

  • allowed_host_regex: by default any repository host is allowed. Anyone who can reach port 3142 can then download through your server. List only the mirrors you use, for example ['^deb\.debian\.org$', '^security\.debian\.org$', '^([a-z]{2}\.)?archive\.ubuntu\.com$', '^security\.ubuntu\.com$'].
  • deny_target_ranges: empty by default, so mirrors on your LAN work. If you use only public mirrors, block the private ranges (example in the file).
  • Admin password: set it in the template. The container writes the login file on each start; the status page then asks for it. Without one, anyone who can reach port 6789 sees which packages your machines install.
  • tls_mitm: off. When on, it caches HTTPS by acting as the repository itself, which needs its CA certificate (in /cache/ca) installed on every client. http://HTTPS/// does not need that.

The cache cleans itself: package versions nobody has asked for in a week are removed once newer ones exist ([gc] and [retention] in the reference).

Moving from apt-cacher-ng

Stop the apt-cacher-ng container and install this one on the same port 3142. Clients need no change. Remap- lines from acng.conf are not needed: http://HTTPS/// sources work as before. The old cache can't be imported; apt-cacher-ultra fills a new one as clients ask for packages.

Changes for existing installs

Unraid does not update installed templates. New template versions are listed under <Changes> in the template and here.

  • 2026-10-23: first release (apt-cacher-ultra 1.0.2).

Requirements

Clients need one line in their apt config, see the README.

Related apps

Details

Repository
ghcr.io/hoody424/apt-cacher-ultra:latest
Last Updated2026-10-23
First Seen2026-10-23

Runtime arguments

Web UI
http://[IP]:[PORT:6789]/
Network
bridge
Shell
sh
Privileged
false

Template configuration

Proxy portPorttcp

Port the apt clients use: Acquire::http::Proxy &quot;http://SERVER-IP:3142&quot;;

Target
3142
Default
3142
Value
3142
Status page portPorttcp

Status page, /metrics (Prometheus) and /healthz. Set an admin password below if other people can reach it.

Target
6789
Default
6789
Value
6789
CachePathrw

Downloaded packages and the cache database. A cache pool is faster than the array.

Target
/cache
Default
/mnt/user/appdata/apt-cacher-ultra/cache
Value
/mnt/user/appdata/apt-cacher-ultra/cache
ConfigPathrw

config.toml, written with defaults on the first start.

Target
/config
Default
/mnt/user/appdata/apt-cacher-ultra/config
Value
/mnt/user/appdata/apt-cacher-ultra/config
Admin passwordVariable

Optional. Protects the status page with a login (user below). Empty = no login.

Target
ADMIN_PASSWORD
Admin userVariable

Login name for the status page when a password is set.

Target
ADMIN_USER
Default
admin
Value
admin
PUIDVariable

User ID that owns the cache files.

Default
99
Value
99
PGIDVariable

Group ID that owns the cache files.

Default
100
Value
100
Time zoneVariable

Time zone for log timestamps, e.g. Europe/Berlin.

Target
TZ
Default
Etc/UTC
Value
Etc/UTC