How to use remote storage as primary storage

Hi, I want to use hetzner storage box as a primary storage for my Nextcloud 15 installation which is on an Ubuntu 18.04 VPS also by hetzner, I can access the storage by ftp, ftps, sftp,scp,Samba/CIFS rsync via SSH, Webdav.
which is the best choice and is there a guide somewhere to set this up?

Here: Install Nextcloud 15 on Ubuntu 18.04 with ISPConfig 3.1 – Allerstorfer.at

1 Like

Thanks, but I meant to set the webdav folder as a main storage, and which storage mounting protocol is more suitable in this scenario

Hi, do you mean you want to mount the storage box via the external storage system in nextcloud - or first mount it directly on the serverand let nextcloud use it more like a local mount?

I think you get more flexibility with the latter, but not sure if Nextcloud will handle it . But you could try to mount it as smbfs or webdav on the server first and see if it works.

Performance wise I’m not sure which protocol is the best, but I guess webdav is more suitable, as nextcloud use it both for mounting other nextcloud servers and for client sync.

With that said, I also got a virtual server at Hetzner, but use the Cloud volumes instead of the storage boxes - the volumes are block devices so you can mount them directly on the server, just like a normal disk. So I upgraded my server to Hetzner cloud a while ago, also to get access to those volume boxes - they work much better IMO. So if you haven’t purchased/used the storage box yet, I would recommend to migrate to their cloud platform first and get a volume box instead.

Thank you for you reply, I made it work! mounted a webdav folder to my ubuntu 18.04 VPS at hetzner and used the storagebox as my primary storage, and the results are great so far, I test upload speed and it’s around 400 MBps which is maybe faster than the volume and much more than required, I used the storage box because it’s way cheaper € 21.90 for 5 Tera and internal traffic is not metered, which I assume include the traffic with my VPS, still testing, I promise to update this thread if I faced any difficulties.

2 Likes

Hi sounds great! I need the volume for some other data which needs direct ext4 access, but if the storage box works that well I will consider to get one and move the nextcloud data there - nice price indeed!

Can you give details how u make it done?
Now i’m also using VPS Ubuntu 18/04 from Hetzner and their Storage Box,but have problem with automatic mounting of Storage Box

How you did it? I want to do the same! Thanks!

I believe the webdav was mounted according to the instructions from the wiki at the location used for nextcloud data (for example /var/nextcloud/data).

I will try to use this as well, this sounds like a good alternative to using s3 as primary storage.

Hi, did you manage to mount Storage Box on Nextcloud ?

Guys, I’m stuck on the exact same problem. NextCloud 20 is installed and running. My Hetzner Storage box is mounted in /media/nc_data/data. But it doesn’t work It is complaining about “Your data directory is readable by other users. Please change the permissions to 0770 so that the directory cannot be listed by other users.

I’ve tried sudo chmod 0770 -R /media/nc_data/data, but no success… Anyone here found a solution?

I mounted storagebox to our Hetzner server , but how do i tell nextcloud to use the new directory as it’s primary storage where all files are placed . Commands to change ownership of /mnt/storagebox from root to www-data user are not working as well.

@mawad can you please illuminate us simple folks on how to best mount Storage Box for our Nextcloud instance on Hetzner?

Hey, I came across this thread trying to set this up and I think I managed to do it, so here’s how in case anyone else finds it useful :).

Basically, I followed Hetzner’s guide to mount storage boxes using WebDAV. First I mounted the storage box in the data folder, and then launched the nextcloud instance and it created all the subfolders and necessary files (I used a customized version of the all-in-one solution).

If you want more details, you can check my entire set up here: GitHub - NoelDeMartin/nextcloud: Settings for my self-hosted Nextcloud instance

@noeldemartin
Why do you want to use Hetzner Storage Box (WebDAV, sftp, …) and not Hetzner Storage Share (Nextcloud)? It is the same provider, only one software, much easier, less problems and i think more performance. Or are the restrictions too great? The price difference is not too high.

I would always avoid remote storage as primary or external storage if possible.

In my case, I prefer to self-host Nextcloud so that I can install apps and make modifications. But sure, I agree if you’re ok with a managed instance Storage Share seems a lot better. Although if you’re going for that, maybe there are better options in the list of providers they have on the website (I haven’t checked though).

I do not use Hetzner Storage Share. But there you can install a lot of apps. I found this video for you (sorry german).

Among other things, I have a self-installed Nextcloud. Even the connection of an external storage via Local has disadvantages compared to a 100% Nextcloud.

Reading the features on the Storage Share page I understood you could only install apps that are in the App Store, right? I have been playing with some applications that are under development, and I would only be able to install them (or even my own fork) this way.

In any case, for me it isn’t much of a hassle to self-host. But if anyone’s not comfortable with it or just wants a hands-off solution, I agree Storage Share should be better. But the point is that each person should choose their own set up. I was just sharing how I solved this since I found this thread when I was setting this up :).

1 Like

Yes. Then you need a self installed Nextcloud.

I agree.

That’s the beauty of Nextcloud. There are very many possibilities.

1 Like

hi,

i am also in the process of setting up a cloud server on Hetzner for Nextcloud thats using the storage box for the data directory. I found that some of the guides posted here are a bit outdated - this one seems very recent and worked perfectly for me