Is a non-interactive snapcraft login for a private snap possible?

Hey everyone, long-time user, first-time poster here.

I’m working on a project to manage indie arcade cabinets that run proprietary games. Each cabinet is a host PC running standard Ubuntu Desktop 24.04, and we plan to manage hundreds of these. I’ve got all the games packaged as snaps in devmode, and I’m up to date on the current state of private snaps in the store. Initially, I thought about running my own store, but I’m glad to let Canonical host private snaps so I don’t have to deal with the infrastructure.

All the host PCs are registered to a self-hosted Landscape server that I built and maintain. I noticed that Landscape has a “Snaps” tab to install specific snaps onto a host, which I’d like to use for the game packages I created. These games can’t be public since the authors are also selling them on Steam and some consoles.

So, here’s my question: How do I add authentication info from a special Ubuntu One developer account used only by the owners of these cabinets? The main feature we’re adding is remote management for each cabinet. Right now, employees at bars and arcades have to open the cabinet, attach a keyboard and mouse, and manually update games when there’s a new release. We want to avoid having a bartender typing an Ubuntu One email and password into a terminal to access a private snap channel.

Is there a way to set up an API token or write out a file during provisioning? Any help would be appreciated!

You can pass SNAPCRAFT_STORE_CREDENTIALS with exported credentials. All methods are described below:

For snap itself, you can use exported snapcraft credentials it they’re the same.

Eventually, try to make use of seeding mechanisms if it’s Ubuntu Core based device.

1 Like

Brilliant, thank you that works as expected. Now I need to figure out how to pass that information to Landscape. I hope that’s not out of scope for this forum. I’ll hack around on this today and see what I can find. Would anyone know the answer?