I’m about to make a fresh install of Ubuntu server for running nextcloud.
I want all of my data to be stored or replicated on my freenas.
I seek advice on selecting the best option:
- Make the freenas the primary data storage. What about the NC database?
- Sync the data to the nas with rsync.
- Run NC in a docker container and sync or backup the whole container.
- insert awesome solution here
So I don’t really care if the data is on both the server and the nas, or exclusively on the nas, as long as it’s at least on the nas.
I will probably run docker anyway, but I was planning on running NC directly on the host.
@STrike thx for sharing .
In this case @mappo if I understood right, you did not yet install Nextcloud, but asking for a proper solution in combination with FreeNAS?
So you already have FreeNAS on another machine and set up a new one for Nextcloud? Generally I would say: Plug storage drives to the Nextcloud servers machine and skip FreeNAS. Depending on how you want to use it, keep in mind, that accessing the Nextcloud data directly from outside of Nextcloud (e.g. via access to FreeNAS) will not work properly. It needs to be done via Nextcloud web ui, Nextcloud client or webdav client at least, so the Nextcloud database can track changes.
If your really want at least part of the data be accessible directly from outside of Nextcloud, then consider adding it via it’s external storage module: https://docs.nextcloud.com/server/13/admin_manual/configuration_files/external_storage_configuration_gui.html#
Yeah so in the end it depends a bid how and why you use FreeNAS and how you want/need to access your Nextcloud data. Using FreeNAS as backup location via rsync of course works painless. FreeNAS also offers a Nextcloud module btw, but of course you will most likely not be able to configure and run it as smooth/optimized as on Ubuntu/Debian.
In addition to what others said:
If you run NC and the database in Docker, you can create named volumes that can be backed up easily, no need to back up the whole container.
@MichaIng, you’re absolutely correct: I’ve not yet installed NC or the OS. Come to think of it, I’ll probably make a fresh install of freeNAS as well…
All these insightful replies made me aware that the original post was incomplete. FreeNAS will run on a tiny CPU and it will do nothing else except provide storage for the Ubuntu server. I might even connect the machines NIC->NIC to keep freeNAS separate from the scary WWW.
So, there will be no accessing freeNAS. It will only expose a mount point to the Ubuntu NC host.
@Krischan, that sounds very interesting. I have absolutely no Dock experience. I’ve only regarded it as a neat way to back up an entire application.
I will definately dig further to understand your point.
Just remember that docker adds several layers of complexity: storage, network-access, user-management and permissions (at least).
if your hardware permits it’ll probably the best to install nc under freenas (also, freebsd is stable and simple as opposed to many “easy-to-use” linux-distros out there).
apart from that, you can always push or pull your data to or from freenas.
I’ve transferred the data-dir of oc/nc a couple of times and this always went smoothly and w/out a lot of downtime (but always on the same box as the nc-install). But it’s better to careful, of course.
If you just want your Nextcloud run, independently from Ubuntu system, and don’t need/want to configure much, a container is maybe the best/fastest solution. But I personally never set one up, so don’t know too much about downsides configure and performance wise.
The separation of Nextcloud instance and data could make sense security wise, but will have performance impact. Not too sure about how to establish this best, but then it looks like set data directory to FreeNAS network drive is easiest. Have a look here as well for possibilities: https://ownyourbits.com/2017/04/18/different-ways-to-access-your-nextcloud-files/
Backups of data could be done on FreeNAS then, database dumps can be send to FreeNAS as well.
Yeah but I am surely the wrong one in this case, having everything on one machine so far .