How to automount(?) connected Nextcloud space?

I´m pretty impressed on how easily the connection to my Nextcloud instance went after installing Fedora. It´s also flawlessly working to open the file manager and browse the files there. I can also open my keepass database with KeePassXC with no issues.

But after restarting this connection is not available until I mount it manually with the file browser and I do not see any option there to have it automatically available on startup. I don´t want to use nextcloud client as everything is totally fine the way gnome/fedora integrates my account.

Any suggestion?
Is there any gui application to do this?

I am kind of familiar with fstab and automount(?) as I had to use these methods on my previous Manjaro KDE installation but I would like to avoid them if possible because editing system files did not always went fine for me.

Hi, I just want to give my though, but not sure if it will works. With Gnome there a settings to add NextCloud online account and may be there also a same setting for KDE. The other thing if we search with dnf search nextcloud there a package name nextcloud-client-dolphin. May be you also need to install nextcloud-client-dolphin to integrate it with dolphin.

1 Like

Looking at the post tags, @casesensitive is using GNOME, so installing this package is not useful.

Automount can be done with editing this
/etc/fstab is as follows:

# <file system> <mount point> <type> <options> <dump> <pass>

  • <file system> is the device or remote filesystem you want to mount.
  • <mount point> is where you would like your device or remote file system to be mounted.
  • <type> is the type of the filesystem you are mounted. (ext4, FAT, NTFS, etc.)
  • <options> are the mount options associated with the filesystem.
    A good link for this topic it has gui and commend line approach automount - How to make partitions mount at startup? - Ask Ubuntu

@alciregi My bad. I didn’t read the tags. :sweat_smile:

Hey there. Nextcloud user here. When you connect with Online Accounts in Gnome, it is using gvfs to connect over webdavfs. This works well for basic things, but can definitely choke under heavy use. You can mount davfs in your fstab similarly. You’ll want to be sure to add the _netdev and/or nofail mount option if you do it this way, so systemd doesn’t create a boot dependency on your nextcloud server. I’ve had good luck with mounting this way on my kodi raspberry pi instances.

You’ll want to use the remote.php endpoint. Since user is derived in the path, you could probably even get creative with autofs for mounting it based on the user login in your system, too. What I’ve done otherwise is create a separate nextcloud account and share to it what I want the server/service to specifically have access to, and connect as that user. For example, I’ll login with a “kodi” user that only has read access to my music and videos, shared from other nextcloud accounts.

The nextcloud docs for this are here:
https://docs.nextcloud.com/server/23/user_manual/en/files/access_webdav.html

Regarding KeePassXC, I use the nextcloud client (separate from gnome, but also not a problem to use both) with the nautilus extension to sync the nextcloud folder containing my KeePassXC database to the filesystem. It’s not mounted in this case, but any writes locally or remotely to that file will then trigger a sync via the nextcloud API. That’s worked well for me so far and is easier than messing with fstab.

3 Likes

What about this extension? Interesting. Could you provide more information?

1 Like

Thanks for all your info in your reply.
But this is overwhelming my needs and skills.

I just want to have that nextcloud share automounted on system startup/user login to use it mainly atm with KeePassXC. And a method without the nextcloud client would be better I guess as I want to install as less software as needed to avoid incompatibility or similar problems due to my experience so far.

So I guess best way is to automount via fstab or systemd(?) automount which I´ve done on Manjaro once before but was more complicated.

Do you mean this one here? The description says it only adds status icons to nextcloud synced files and folders.

Yeah, the nautilus extension itself isn’t necessary. More importantly is using the Nextcloud client to setup a folder sync.

The Nextcloud client is also per-user on login. Keep in mind that if you do it with fstab, it’s going to be over davfs and you’ll need to figure out how to do authentication with autofs if you want it per-user. Davfs doesn’t have the best performance, in general.

IOW, it can theoretically be done (autofs generally is for nfs or samba), but it’s going to be a lot more complicated that using the Nextcloud client for very little, if any, actual gain.

1 Like

Thanks for all your replys.

As I just started the just barely used Solus OS on my laptop (which I primarely only use for Skype sessions and Windows) I just noticed that I have installed the Nextcloud client there. I noticed because an yellow attention sign reminds me that there have been some sync issues. And that triggered my memory that though I did not use this system often - as I said - I still had issues with it and that´s why I don´t want to use the Nextcloud client at all.

So you all have told me some ways to automount but atm I just do my own workaround with opening the file browser, clicking on the nextlcoud share and after that sign into my KeePassXC database. This just works simply for me atm. =D

After fiddling more around with Fedora and proving it will work for me I get back to this topic. I´m thinking of if I can autostart the file browser with auto switching to the nextcloud share. ^^