this post was submitted on 16 Dec 2024
26 points (93.3% liked)

Selfhosted

40633 readers
316 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I just spun up a Nextcloud VM, and I'm trying to decide the best way to manage the data storage.

For context, I'm running it on proxmox and installed it with This script.

Ideally I'd like to keep most of my storage on my NAS. I'm trying to figure out if I should keep the data directory local and add a NAS NFS share as external storage, or just move the whole data directory to an NFS share.

How are you guys handling your Nextcloud storage?

top 13 comments
sorted by: hot top controversial new old
[–] m@social.tthi.as 1 points 5 hours ago

Like some others, I have separate storage and compute servers.

The data directory is an NFS share on my storage server and I run Nextcloud in docker on my compute server.

I have the NFS share defined as a volume of type nfs in the docker compose, mounted to /var/www/html/data. Nextcloud itself just treats it like a local directory.

[–] ShellMonkey@lemmy.socdojo.com 3 points 21 hours ago

My two main boxes are split to be storage vs compute. The NAS box has a minimal CPU and a pile of 3.5 drives for the low cost storage and they hypervisor has all the CPU and fairly small storage.

Basically the goal in my setup is all the working data is in one place and the handling in another with various snapshots and RAID mixed in to avoid the risk of "oh shit did I just...?" situations.

So anything that could be called bulk data gets offloaded to the NAS directly via mounts and any cache/working data is held locally. If your lab space grows to a notable level over time eventually you need to consider disk I/O as part of the design and having the bulk data on another box let's you effectively trade some network load in for disk load.

[–] skittlebrau@lemmy.world 4 points 1 day ago* (last edited 1 day ago)

I have my storage mounted from my NAS using NFS and this is added to Nextcloud using the External Storage plugin. Works great.

[–] sugar_in_your_tea@sh.itjust.works 9 points 1 day ago (1 children)

I just run Nextcloud on my NAS, which is just my old desktop PC. Nextcloud is just a docker container and it points to where I mount the NAS partition.

[–] monty33@lemmy.ml 5 points 1 day ago (1 children)

Currently my NAS runs TrueNAS and pretty much just serves files. I guess I could run a Nextcloud container on TrueNAS, but I'm thinking I may get better performance with it running on a more robust machine.

[–] DrDystopia@lemy.lol 5 points 1 day ago (1 children)

What sort of performance are you looking for? I run NC's from Raspberry Pi's, no problem.

[–] monty33@lemmy.ml 1 points 22 hours ago

Its been awhile since I've run Nextcloud but when I did on a pi the interface was slow and the instance itself was unreliable.

[–] atzanteol@sh.itjust.works 2 points 1 day ago* (last edited 1 day ago)

I've put the data dir on an nfs mount - didn't have any problems with it. I'm pretty active with it too - hundreds of gigs, updates daily, run for 5ish years.

[–] hendrik@palaver.p3x.de 3 points 1 day ago* (last edited 1 day ago) (2 children)

Is the storage shared with other software, or are the NAS and Proxmox two different machines? Or why bother to set up NFS at all?

I keep most of my usual data local. But I've also added some external storage to Nextcloud, that'd be a large harddisk that contains some music and TV recordings, Linux ISOs and rarely used stuff. It's mounted read-only most of the times and spins down unless I need to access my achived stuff. That's the main reason why I keep it separate.

[–] atzanteol@sh.itjust.works 1 points 1 day ago (1 children)

why bother to set up NFS at all?

It's a NAS...

[–] hendrik@palaver.p3x.de 2 points 23 hours ago

I meant the other side. If you use 200GB of your Proxmox, you don't need to transfer it to the NAS. Which is the question here. I don't do it, because it's mostly calendars, contacts and like 10GB of data on Nextcloud, which I'm currently working on, or sharing with friends. And the "NAS" is sleeping most of the day. But if OP wants all their data stored on a NAS, they might very well configure Nextcloud to use NFS and do it that way.

[–] monty33@lemmy.ml 2 points 1 day ago (1 children)

Yea proxmox on one machine and a separate machine running truenas and serving NFS

[–] hendrik@palaver.p3x.de 2 points 1 day ago* (last edited 23 hours ago)

Sure. That'd be a valid use-case. I don't think I can recommended anything, here. Both should work fine. And you can always run into some unforeseen consequences in a few years. Especially once you decide to change something about your setup. But these things are hard to factor in. I often tend to prefer the easier solution over the more complex one. That helps with maintainability. But that approach doesn't always apply.

Edit: If you want everything stored on the NAS, just do it.