Request: auto-connection of removable-media for nextcloud

The nextcloud snap comes with no internal SMB support. A common workaround is to locally mount external shares under /media in order to expose them to the snap, see e.g.

It would be nice to have access to /media as default.

there is actually a CIFS mount control interface in the works, so instead of using this workaround through removable-media it might make sense for the actual SMB support to be available instead …

that said … in general autoconnecting removabe-media surely makes sense for nextcloud but for using actual removable media :wink:

(using nextcloud with an external USB disk is most likely a very common use case)

We can’t seem to get it working on all architectures… not sure why. You might have some insight, actually, perhaps we should talk.

Respectfully, I disagree. I like my snaps as confined as possible for basic functionality, and access to /media is not needed by default. If one wants to tweak the config to put data somewhere other than the default, it doesn’t seem like a lot to ask to also connect the interface that allows them to do it. Particularly when the alternative is to allow the snap to potentially walk all over the /media/ directory for every user of the snap, even those that don’t need that functionality.

In my humble opinion, auto-connection seems better suited to interfaces that are required for a given snap to work (i.e. it either breaks completely without it, or doesn’t work as intended). That does not seem to be the case, here.


I agree with @kyrofa. -1 to auto-connect

Yeah, lets take a look together some time this week …

Hi all,

and thank you for your input. I do agree native SMB is preferable to this workaround, so I see why you wouldn’t agree to the auto-connect request.

I have a follow-up question. What would be considered best practice for a snap that runs with unattended-upgrades and needs the removable-media plug, to include the plug after it has been upgraded? As far as I see it, it will always lose the plug on every update, so a manual interaction would be needed everytime we get an update.

I currently run a cron with a crude skript

    if snap interfaces -i=removable-media nextcloud |grep ^:remo; then 
    echo "removable-media already plugged into nextcloud, ending." 
    snap connect nextcloud:removable-media

but I don’t think this can be considered best-practice…

1 Like

once a connection has been made by a user those are supposed to stay, even after a snap updates. If you are seeing cases where the user-connected interfaces are being disconnected again then please report them to the forum or snapd’s github issue tracker.


2 votes against, 0 votes for. Not granting auto-connection.

1 Like