Configuring snapd on ubuntu core for a web proxy

Max Brustkern max.brustkern at
Thu Jan 12 19:14:47 UTC 2017

So I created a system directory with the contents of /lib/systemd/system. I
edited that file to contain the environment variables:
nuclearbob at localhost:~$ cat /lib/systemd/system/snapd.service
Description=Snappy daemon



I then did:
nuclearbob at localhost:~$ sudo systemctl daemon-reload
nuclearbob at localhost:~$ sudo service snapd restart

I still don't seem to see snapd picking up on the proxy. I tried:
sudo systemctl edit snapd
I pasted in the file contents to there, but after that I get:
nuclearbob at localhost:~$ sudo service snapd restart
Failed to restart snapd.service: Unit snapd.service is not loaded properly:
Invalid argument.
See system logs and 'systemctl status snapd.service' for details.
nuclearbob at localhost:~$ systemctl status snapd.service
● snapd.service - Snappy daemon
   Loaded: error (Reason: Invalid argument)
  Drop-In: /etc/systemd/system/snapd.service.d
   Active: active (running) since Thu 2017-01-12 19:11:46 UTC; 2min 26s ago
 Main PID: 1339 (snapd)
   CGroup: /system.slice/snapd.service
           └─1339 /usr/lib/snapd/snapd

Any additional tips to get snapd running on ubuntu core in the lab?

On Wed, Jan 11, 2017 at 11:49 PM, Stuart Bishop <stuart.bishop at
> wrote:

> On 12 January 2017 at 01:44, Max Brustkern <max.brustkern at>
> wrote:
>> I'm trying to run ubuntu core 16 in a kvm instance in an internal lab
>> that requires a web proxy. This bug:
>> seems to cover how to do this on classic ubuntu, but the files that hold
>> the environment variables used by snapd on an ubuntu core system are all on
>> read-only filesystems. How do I set HTTPS_PROXY in a persistent way for
>> snapd on that system?
> is similar, but about
> adding support for proxies to snapd (rather than have it use the system
> environment variables, which is one implementation option but not always
> what you want since that affects everything on the system). But that
> doesn't help with your read-only filesystem sorry :-(
> (Hmm... disgusting hack idea.... since you can't create
> /etc/systemd/system/snapd.service.d/ on your read-only filesystem, try
> mounting that directory from somewhere. Extra points for using systemd to
> mount the systemd service file overrides and setting up dependencies so it
> does everything in the right order :-) )
> --
> Stuart Bishop <stuart.bishop at>
> --
> Snapcraft mailing list
> Snapcraft at
> Modify settings or unsubscribe at:
> mailman/listinfo/snapcraft
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Snapcraft mailing list