Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Nextcloud External Storage - mounting external services with Rclone?


  • Hi,
    I am looking for a solution for the following scenario:

    We need to upload & download approx 250GB of large video files per week. There would probably be about a maximum of 500GB but could reach more, on the server at any one time. This is in addition to our normal Nextcloud use for internal files. I don't really want to add this as Block storage to our server as that would be too expensive.

    I tried adding External Storage to a Hetzner Storage box (that's what we use for backups via SMB) but we have found that it is a bit slow. Our users are used to sharing our large unedited video files via mega or google drive & their upload/download speeds are much faster with those services. The Google Drive External Storage app for Nextcloud doesn't work anymore with the current versions of Nextcloud.

    I was thinking of maybe using RClone to locally mount a mega or google drive account & then add that as local External Storage. I noticed in the Cloudron docs that:

    Mounting an existing server directory as 'external storage' on Nextcloud is currently not supported.
    

    So will this not work?

    I have also tried out Wasabi S3 storage which is very competitively priced but they have a model that you are charged for any upload for a full 90 days even if you delete the file within 90 days. This wouldn't really suit us as we are generally deleting the files within a few days once a client has downloaded them.

    Does anyone have in mind any suitable solution for our needs?

  • Staff

    Not sure how much that has changed with recent Nextcloud versions, but generally we have had quite bad experience with that. Many non-block storage types are simply not well suited for regular file usage, while network mounts often are, as you also mentioned, quite slow.

    What could help you here is to get some kind of storage box in the same datacenter as where your server is and then experiment between sshfs/samba/nfs, depending on what is supported and see which one works best.


  • Thanks for the quick reply nebulon. Regarding what I quoted from the docs about mounting an existing server directory as 'external storage' not being supported, - is it not recommended or is that it simply can't be done with a Cloudron Nextcloud install?

    What I mean is - let's say if I use Rclone to mount a Google Drive or Mega account to /mnt/webstorage could I then use the 'local' option in External Storage to 'attach' that drive as External Storage to the relevant users. This can work on a non-Cloudron Nextcloud, is there something that stops it on Cloudron?

  • Staff

    The local mount would not work, since Nextcloud runs in its own container and does not have access to folders on the host system. This requires more changes on the platform and is unlikely to happen any time soon.

    The only option is to try the mount options from the external storage addon in nextcloud.

  • Staff

    @iqweb Mounting a local volume into an app is part of next release - https://forum.cloudron.io/topic/3205/what-s-coming-in-6-0-take-2


  • Actually @nebulon - that's what I meant all along - mounting a local folder in the External Storage app - would that work or only as @girish said - after the 6.0 release because of Nextcloud being in a container?

  • Staff

    @iqweb said in Nextcloud External Storage - mounting external services with Rclone?:

    because of Nextcloud being in a container?

    Yes, correct. It's sandboxed and can't see the host file system.


  • @iqweb If you get a solution going, can you please share here?