Optimized configuration for Pacoloco to cache Official, ALHP, and Chaotic-AUR repositories.
This repository contains my personal configuration for Pacoloco and a brief setup guide.
If you have multiple Arch Linux machines at home or in the office, Pacoloco caches packages and distributes them to other devices over the local network. This significantly saves bandwidth and speeds up software installation and updates. For my setup of 6 machines and a mobile internet connection, it’s a lifesaver.
- Prefetch: The server automatically checks for and caches new package versions at 3:00 AM (server time).
- Support for three repository types:
- Official Arch Linux repositories (
core,extra,multilib). - Chaotic-AUR.
- ALHP (
x86-64-v3and others).
- Official Arch Linux repositories (
- Install Pacoloco:
sudo pacman -S pacoloco
- Replace the default config with mine:
sudo cp pacoloco.yaml /etc/pacoloco.yaml
- Enable and start the service:
sudo systemctl enable --now pacoloco
- Create a Docker container named
pacoloco:
docker run -d --name pacoloco \
-p 9129:9129 \
-v $(pwd)/pacoloco.yaml:/etc/pacoloco.yaml \
-v /var/cache/pacoloco:/var/cache/pacoloco \
--restart unless-stopped \
ghcr.io/anatol/pacoloco
- Replace the default config with mine (if needed inside the volume):
sudo cp pacoloco.yaml /etc/pacoloco.yaml
- Restart the container:
sudo docker restart pacoloco
Note Ensure that the
/var/cache/pacolocodirectory (or whichever you set in the config) exists and is writable.
On every client (other Arch machines), modify the repository sections in /etc/pacman.conf.
Before:
[core-x86-64-v3]
Include = /etc/pacman.d/alhp-mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra-x86-64-v3]
Include = /etc/pacman.d/alhp-mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[multilib-x86-64-v3]
Include = /etc/pacman.d/alhp-mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist
After:
[core]
Server = http://pacoloco.home.arpa:9129/repo/archlinux/$repo/os/$arch
[extra]
Server = http://pacoloco.home.arpa:9129/repo/archlinux/$repo/os/$arch
[multilib]
Server = http://pacoloco.home.arpa:9129/repo/archlinux/$repo/os/$arch
[core-x86-64-v3]
Server = http://pacoloco.home.arpa:9129/repo/alhp/$repo/os/$arch
[extra-x86-64-v3]
Server = http://pacoloco.home.arpa:9129/repo/alhp/$repo/os/$arch
[multilib-x86-64-v3]
Server = http://pacoloco.home.arpa:9129/repo/alhp/$repo/os/$arch
[chaotic-aur]
Server = http://pacoloco.home.arpa:9129/repo/chaotic-aur/$repo/$arch
Important: Replace
pacoloco.home.arpawith your server's actual IP address (e.g.,192.168.1.100) or set up local DNS/mDNS (Avahi) for hostname resolution. Note: If you usex86-64-v4orx86-64-v2, make sure to replace the architecture string accordingly. Pacoloco will automatically pull the correct repository.
port: 9129
cache_dir: /var/cache/pacoloco
user_agent: Pacoloco/1.7
download_timeout: 3600port: The HTTP port clients use to access the proxy.cache_dir: Directory for package storage. Must be writable by thepacolocouser.user_agent: Mandatory; otherwise, ALHP and some mirrors may reject requests.download_timeout: Max time for downloading a single package (set to 1 hour).
Mirrors are chosen based on stability and speed: (см. Arch Mirror Status):
urls:
- http://ftp.halifax.rwth-aachen.de/archlinux
- https://berlin.mirror.pkgbuild.com
- https://mirror.yandex.ru/archlinux
urls:
- https://geo-mirror.chaotic.cx # автоматически редиректит на ближайшее зеркало
ALHP support for x86-64-v2/v3/v4:
urls:
- https://mirror.sunred.org/alhp
- https://alhp.dev
- https://mirrors.shanghaitech.edu.cn/alhp
All three mirrors are tested and up-to-date. If one is unavailable, Pacoloco will automatically switch to the other.
prefetch:
cron: "0 0 3 * * *" # Daily at 3:00 AM
ttl_unaccessed_in_days: 90 # Keep packages unaccessed for up to 90 days
ttl_unupdated_in_days: 90 # Keep packages unupdated for up to 90 days
This ensures that "hot" package updates are already cached by the morning.
Some CDNs and foreign mirrors (especially ALHP) may be unavailable due to ISP-level blocking (ТСПУ). (more detailed).
What to do:
-
Use mirrors located in RU/CIS. For the official branch:
https://mirror.yandex.ru/archlinux/https://mirror.truenetwork.ru/archlinux/
-
For unofficial branches, check mirrors in:
cat /etc/pacman.d/alhp-mirrorlistcat /etc/pacman.d/chaotic-mirrorlist
-
Or configure an HTTP proxy in
pacoloco.yaml:
http_proxy: http://your-proxy:port
# On the client
sudo pacman -Syu
# On the server — check the logs
journalctl -u pacoloco -fIf you see lines like downloader.go:111: downloading, everything is good to go
Feel free to open an Issue if you have any questions!