Snap clients can be connected to your store either by setting an environment variable consumed by the
snapd service, or by being linked to a specific store through a serial assertion.
To connect any snap enabled device to your brand store, the snapd service needs to know about your store
id through the
UBUNTU_STORE_ID environment variable.
There are several ways to expose an environment variable to a service. Here is one of them, that creates the environment variable and makes it persistent between reboots:
- Get your store
idfrom this page, your store id being the value between parenthesis (eg.
/etc/environmentfor edition with root privileges
$ sudo nano /etc/environment
Add a new line:
UBUNTU_STORE_ID=my-brand-storeand save the file with
- Restart the snapd service:
$ sudo service snapd restart
Your brand store should now be the default for snapd clients on the system, such as the snap command-line, snapweb, etc.