Local mirror for snaps?

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

2 Likes

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.

1 Like

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.

1 Like

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 …

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?

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” )

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).

see this topic:

2 Likes