Local Pacman Mirror Cache
I use Arch Linux as the underlying OS for most of my self hosting services, and with it being a rolling release distro I pull down updates for those servers on a very regular basis. Instead of downloading from the internet for each server, I host a local Pacman cache on one of the servers that all the others use as a repository mirror.
- https://github.com/nroi/flexo
- caching proxy for pacman, the package manager of Arch Linux.
Installation
Adding to Mirrorlist
- Add server to mirror list with 1 command.
- Optional Checkbox in: Linux-Setup-Script
echo 'Server = http://10.0.0.101:7878/$repo/os/$arch' | sudo tee -a /etc/pacman.d/mirrorlist
- Add server to mirror list manually:
sudo nano /etc/pacman.d/mirrorlist
# Add somewhere on the list:
Server = http://10.0.0.101:7878/$repo/os/$arch
Testing
- Edit mirrorlist and remove all mirrors except the local flexo IP, and then do a system upgrade with Pacman
sudo nano /etc/pacman.d/mirrorlist
Last updated on July 14, 2024. For any questions/feedback, email me at blog@zinchuk.xyz.