Proxy in template: AUR access in archlinux

Hi folks. Qubes newbie here (qewbie?). I just built and installed the Arch Linux template. I’m able to install Arch software and updates in the template but I can’t get to the AUR. I assume the updates proxy is blocking me. Where/how do I tell it that is okay?


Hi @moy,

welcome to the Qubes-OS world!

I don’t use AUR with my ArchLinux Qubes-OS VMs, but AUR uses makepkg, so I think that a good entry point is : Makepkg#Makepkg_fails_to_download_dependencies_when_behind_proxy

Thanks @ludovic. I’m still not able to get it working.

Attempt 1
I don’t really understand the proxy config, so I first tried the following in the arch template VM (getting the IP address from the updates-proxy doc):
XferCommand = /usr/bin/curl -x -L -C - -f -o %o %u
But makepkg -si gives this error
curl: (7) Couldn't connect to server
It’s not timing out, it’s very quick, so that’s probably the wrong address for the proxy.

Attempt 2
I think the proxy service might be listening on That would make more sense since lo is the only interface in the template VM. So then I tried the following instead:
XferCommand = /usr/bin/curl -x -L -C - -f -o %o %u
This time makepkg -si gets a little further. It’s able to download dependencies from the regular arch repos, but when it tries to download the source from github it’s not able to resolve

Attempt 3
The other suggestion on the makepkg doc is to use the env_keep option in /etc/sudoers. That doesn’t work either (same error resolving

Attempt 3.5
tinyproxy is not actually running in the template VM. I started it manually and retried attempts 2 and 3 above, and it still can’t resolve

Any other ideas? Thanks again.

@ludovic’s tip worked, with additions and full details below. Thanks again, @ludovic.

  1. Add the proxy to pacman.conf:
sed -i 's/^#XferCommand.*curl.*/XferCommand = \/usr\/bin\/curl -x http:\/\/ -L -C - -f -o %o %u/' /etc/pacman.conf
  1. Also add the proxy to makepkg.conf:
sed -i 's/curl/curl -x' /etc/makepkg.conf
  1. The two steps above will let you use makepkg -si manually once you have the PKGBUILD for a package, but AUR-helpers like yay still won’t work because they don’t know about the proxy. I found pikaur to be the easiest AUR-helper to configure for use with a proxy. Get its PKGBUILD and install it with makepkg -si. Then the following config in ~/.config/pikaur.conf works (note: you need the blank sections too):






aurhttpproxy =
aurhttpsproxy =

Alternate solution: change either the tinyproxy config or the iptables routing to send everything through the proxy, but of course that would defeat the purpose of this careful proxy construction (i.e. this: “This is meant to mitigate user errors (like using browser in the template), rather than some real isolation”).

1 Like