In my environment, I am embarking on creating a plan to set-up and implement a new Virtual Machine (under Windows 2022 Standard + Hyper-V) upon which I want to install a home-based cloud server service, primarily for the purpose of backing up my friends’ and family’s phones (especially photos).
All of our contacts, calendars, and emails are already centrally-managed via my own Exchange server, so none of that needs to be managed, but I would much rather store/backup/host our phones’ movies/photos/documents etc on my own NAS, than let Google, Apple, or Microsoft store, index and sell it to their advertisers. Currently there’s room for ~22TB of data (and two remaining unpopulated drive bays), so I think the machine should be more than adequate to perform this job, I just need to get the right platform to manage it with.
From what little I’ve managd to gather here, my understanding is that the VM I want to put together will have to host some flavour of a Linux distro, in order to install NextCloud, but I’m really uncertain as to what the environment needs to look like. I’ve had versions of Kali, Debian, and Ubuntu run fairly well under Hyper-V, but I don’t know if any of them can host/serve NextCloud?
I already have a public IP address allocated (from my pool) to host this with, and am eager to get going, but I need some help/advice on how to go about getting it from concept to implementation…
My personal home cloud server is an old Dell Business Desktop PC with Windows 11 Pro. I run all my server related services via Hyper-V and respective linux Guest OS.
Nextcloud is running perfectly fine with Hyper-V + Ubuntu in my case.
Nextcloud is running perfectly fine with Hyper-V + Ubuntu in my case.
Thanks for the feedback. So do I just install a default Ubunto distro then? …and what after that? How do I actually download/deploy and configure NetCloud on it? Is there someplace here that provides actual step-by-step instructions on this process? What pre-requisite features need to be installed with Ubunto? I assume Apache+PHP? Does it use it’s own SQL engine? …or do I need to provision my MySQL server to support it?
It seems strange to me that this is so arcane and such a pain to implement. From all I’ve seen, it’s just another web-based PHP+SQL app, so why isn’t it just a simple ZIP/TAR that one downloads and unpacks onto any PHP-enabled web server (just like one would with WordPress or any one of a million other similar web-based applications)?
Oh, and can I allocate network resources directly from the NAS shares (via Samba), or am I going to have to give the VM a gigantic VHDX to use for storage?
Yes, deploy a clean Ubuntu Server LTS install and then just install nextcloud.
There are several methods of nextcloud deployment. Snap / Docker and as you said, package by package native manual installation.
Docker or Snap deployments will come with all the needed prerequisites and configuration done for you.
That storage should be ext4 and that network share needs to be mounted in your Ubuntu Guest OS and then you can change the default user data storage location !!
Using your NAS is a really good idea. However I would consider using the “external storage: SMB” instead. The thing is that unless you are using more expensive professional storage technology like a SAN, or setting up zraid with openZFS across two different hosts (for high availability), then any drop of connection to you NAS, will potentially result in http 500 issues. You also risks corruption in file cache and DB if any (even just for a couple of seconds) drop of connection, if using a network mounted drive as your main nextcloud data folder. With the External storage app from Nextcloud, you keep the core nextcloud data folder on the VHD itself, so if any connection drops, Nextcloud will only “fail” any current fil actions, which can be re-done. All you have to do is to setup sync folders from the devices, to the folder in all users files landing page, which is automatically added for the SMB (and ofc. add all users to a group which allows them to use the mounted SMB).
The NAS is the same machine that’s hosting the VM, meaning that the ‘connectivity’ all happens virtually, inside the same box – so hopefully ‘connection drops’ shouldn’t be a thing…
The NAS server is built on a quad-core, 4th gen Intel i7 with 16GB of RAM, and running Win 2022 Std + Hyper-V that I built anticipating implementing this specific functionality down the road… I’m not sure there’s advantage enough to warrant keeping two copies of the data on the NAS (i.e. one natively, and one on a locally-stored VHD for NextCloud). I like the idea of users having their cloud storage directly available on the LAN via the existing Cloud share on the NAS, so having NextCloud use the same folders/structure would be my preference.
Speaking of which, the Cloud share / folder is currently set up basically like a user share, with each ActiveDirectory user having a folder ‘username.DOMAIN’ in which they have Full Control authority, while being unable to view other users’ folders stored in the same directory. Can NextCloud link it’s internal user accounts with Active Directory in order to reference the correct folders?
Unfortunately for me, the Ubuntu install didn’t go smoothly, so apparently I’m spending today ironing out those kinks before I can go any further…
I have exactly the same environment as you have. I installed Nextcloud by using a pre-installed VM with Ubuntu/Nextcloud. Look here https://www.hanssonit.se/nextcloud-vm/.
Running for years now without a problem!
You are not keeping two copies of same data.
If the NAS is same machine, then just dedicate all that storage and place all of it on same volume. There is no need to seperate it, unless you have other use cases for accessing the data?
If accessing the data (Reading it is okay) happens outside of NC (web interface, WebDAV, SMB, CIFS etc) you will need to run OCC files:scan —all very frequent, as indexing and caching is only “automatic” if done through any native NC apps/interfaces. So unless you plan to make the data accessible elsewhere, just reserve the desired amount of space as one volume and install all of NC in that one. Will remove any potential overhead, and you do not need mounting at all.
VH / BR
Much of the data already lives on a Windows (ReFS) RAID5 volume and is well-shared/managed via existing Active Directory permissions and local laptops/PC’s. My intended purpose, for NextCloud, is simply to provide a streamlined, public-facing, and secure, interface by which I can connect my family’s and friends’ (primarily) mobile devices to this resource from anywhere, facilitating familiar cloud backups and resource management but without letting the corporate conglomerates’ fingers get run all through it…
After spending the morning fighting with just trying to get Ubunto to install properly, I gave up and paid the 20-euros for the VHDX image from HanssonIT, which I’m just in the process of installing now…
Just out of curiosity, after having gone through most of an ultimately failed first attempt to install the HassonIT VM, what network configuration do you use? It’s my intention to set-up this server in my SonicWall DMZ, and I’ve configured the firewall to route traffic from a dedicated static IP to the internal address of the NextCloud VM, but numerous automated scripts clearly weren’t made with such a configuration in mind, and it was unable to do the TLS certificate validation/installation, and was clearly routinely confused by the fact that the DNS information didn’t co-ordinate whatsoever with any of the IP address information it had:
- the server will live at 192.168.0.100 in the DMZ;
- it is accessed from the internet via xxx.yyy.zzz.140;
- but it’s ‘replies’ go out via the firewall’s primary ip address which is at xxx.yyy.zzz.130.
…and I don’t even want to think about how confused its going to get when I activate the NIC that connects to the NAS itself…
I do not use a DMZ. So, I’m not sure what information you want?
I added a dedicated .vhdx to the VM to store the Nextcloud data.