I'm having trouble getting snap to use a proxy with authentication. I've tried configuring the snapd.service to setup the environment (http_proxy/https_proxy) and also used /etc/environment to do the same, as was suggested in these threads:

How to install snap packages behind web proxy on Ubuntu 16.04



It connects to the proxy but does not use the credentials specified in the URL


Has anyone gotten around this?

2 Answers 2


I've been stuck in the same situation but I've solved it.

  1. Set your proxy in /etc/envirnment (or export http_porxy="http://username:password@proxyURL:port")
  2. Check it with bash echo $http_proxy
  3. sudo snap set system proxy.http=$http_proxy
  4. sudo snap set system proxy.https=$http_proxy

With that configuration I could pass the proxy with authentification.


Snap service is configured to use special environment file, so you can just add http_proxy variable to it if your current environment variables are not picked up by the snap.

Open file:

sudo vim /etc/sysconfig/snapd




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.