In dom0 (replace $cacher_tempalte with the name of your template:
qvm-run --pass-io -u root $cacher_template "DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install --no-install-recommends qubes-core-agent-networking qubes-core-agent-dom0-updates apt-cacher-ng -y"
qvm-run --pass-io -u root $cacher_template "systemctl mask apt-cacher-ng"
qvm-features $cacher_template qubes-firewall 1
Then in the qube that is based on the above template (e.g. sys-firewall):
- create /rw/config/qubes-bind-dirs.d/50_user.conf and add
binds+=( '/var/cache/apt-cacher-ng' )
binds+=( '/var/log/apt-cacher-ng' )
binds+=( '/etc/apt-cacher-ng')
- add these lines to /rw/config/rc.local
systemctl unmask apt-cacher-ng
systemctl start apt-cacher-ng
iptables -I INPUT -p tcp --dport 8082 -j ACCEPT
-
restart the qube and then change
Port:
to8082
in /etc/apt-cacher-ng/acng.conf -
restart again and run
sudo systemctl status apt-cacher-ng
to see if it’s all setup correctly now.