Local mirror for snaps?


#1

Hello

We’d like to use some snaps on internal Ubuntu servers, which do not have a connection to the interner. At the moment, for normal deb files and the like, we setup a mirror, which mirrors repositories and these servers only access this mirror.

We’d need an internal mirror for snaps as well. Are there howtos, which describe how this can be done?

Thanks,
Alexander


External repositories
#2

Today the only way to do this is to snap download the .snap package and install it on the offline machine with the --dangerous flag but this is not the behaviour we would recommend for enterprise deployments. Instead we are working on a local version of the Store that could be installed on an intranet and only periodically check back in with an online entity.


#3

I thought I’d mention that if you snap download, you’ll get two files: a .snap and a .assert. If you copy them both, and snap ack the .assert file, you can snap install the .snap file without needing --dangerous (and it would refresh from the store). This is still probably not what you want, as the refreshes would still not be mirrored.


#4

snap does respect general http(s) proxies, so while you can not really manage a mirror, you can at least have a central (generic) http proxy for your snaps …


#5

Thanks for the hints reg. --dangerous and snap download. With Debian repositories, I can use debmirror and only download if something is new. And my internal servers can then be updated by eg. apt update && apt full-upgrade.

Can I have something like this with snap as well?


#6

Yes, this is what @JamieBennett talked about above (though it would automatically update i guess, like everything in the snap universe, without any “apt update/upgrade” )


#7

Hm, is there a way to disable automatic updates? This is not wanted — when there are multiple servers, we’d like to have them all running on the same version. And some customers do not want updates, or only during specific times (maintenance windows).


#8

see this topic: