Installation Advice

  I don't know a whole lot about VMs and how to setup a VM. I want to install NC to its own drive on a Windows 11 machine. If anyone has step-by-step instructions for that, it would be appreciated if you could pass that on. I loved having NC but things have changed cognitively with me since the first time I used it and I have a hard time following a video and sometimes directions. Not to mention, they always tend to leave some things out. Honestly, I need something from setting up the VM and setting up Ubuntu 24.04 LTS on it, so it's ready for installing NC, steps on mounting the drives, installing prerequisites and moving the data directory to that drive and so on. Knowing how many issues I had installing NC back then (my fault and mainly in Ubuntu prerequisites) and setting up NC but it was easy after Ubuntu was setup properly and I can imagine that setting up Ubuntu may be harder now. I couldn't tell you how many to times I had to reinstall Ubuntu because I don't know enough about fixing mistakes in Ubuntu like I can in Windows. What is everyone’s opinion on setting up NC as a VM? What is better, using a docker, snap package (if available), WSL or something like VMware or virtual box? I really would appreciate the help and advice. Thank you. 

The machine it will be going on is an old rig I have and runs flawlessly but installed in a 20 bay rack case:
I9-12900K
Gigabyte Master Mobo
128 GB DDR-5
990 Pro M.2 (2TB)
SN850X m.2 (4TB)
Corsair H1500i PSU
14 HDDs (7 drives, 7 backups) 2 are empty for NC.
SATA expansion card
GTX 2080TI (helps with plex and the POE cameras)
This machine runs 12 cameras and plex right now. It is also a file server.
I don’t know a whole lot about VMs and how to setup a VM. I want to install NC to its own drive on a Windows 11 machine. If anyone has step-by-step instructions for that, it would be appreciated if you could pass that on. I loved having NC but things have changed cognitively with me since the first time I used it and I have a hard time following a video and sometimes directions. Not to mention, they always tend to leave some things out. Honestly, I need something from setting up the VM and setting up Ubuntu 24.04 LTS on it, so it’s ready for installing NC, steps on mounting the drives, installing prerequisites and moving the data directory to that drive and so on. Knowing how many issues I had installing NC back then (my fault and mainly in Ubuntu prerequisites) and setting up NC but it was easy after Ubuntu was setup properly and I can imagine that setting up Ubuntu may be harder now. I couldn’t tell you how many to times I had to reinstall Ubuntu because I don’t know enough about fixing mistakes in Ubuntu like I can in Windows. What is everyone’s opinion on setting up NC as a VM? What is better, using a docker, snap package (if available), WSL or something like VMware or virtual box? I really would appreciate the help and advice. Thank you.
The machine it will be going on is an old rig I have and runs flawlessly but installed in a 20 bay rack case:
I9-12900K
Gigabyte Master Mobo
128 GB DDR-5
990 Pro M.2 (2TB)
SN850X m.2 (4TB)
Corsair H1500i PSU
14 HDDs (7 drives, 7 backups) 2 are empty for NC.
SATA expansion card
GTX 2080TI (helps with plex and the POE cameras)
This machine runs 12 cameras and plex right now. It is also a file server
[/quote]

I don’t know why this post looks like this but if a moderator could fix this to read properly, I would appreciate it.

Hello,

What is your base / Host Operating system?

Depending on that you can select the best possible installation methods.

Nextcloud has different installation ways. All works and all have their pros and cons. It’s just people should select the one which suits their needs & environment best

So first question is what is the base or main operating system you are running on that i9 beast?

Thanks

1 Like

I don’t have an i9 beast, just an older Skylake generation Xeon E3 :wink: …and I’m running a manual installation in an Ubuntu VM on Proxmox VE.

But since you’re already running Windows as the base OS on your machine and have other things set up on it, it wouldn’t be easy to just switch to a different base OS like Proxmox VE or another hypervisor without a solid migration plan for the current applications you’re running on it.

I’m not much of a Windows guy (anymore), but the easiest way to get your hands dirty with Nextcloud on your current setup would indeed be to create an Ubuntu VM and then install the Snap Package in that VM. As for whether you should use VirtualBox, VMware Workstation or WSL, I’d say use the one you’re most familiar with.

1 Like

@esnrhtx

… me either :wink:

the snap is generally not a resource monster, see requirements .

do the basics and read the docs. see Nextcloud snap wiki and support

2 Likes

My base system is Win 11 23H2 right now. I have heard stories about the different ways to use NC. Some say that certain ways like WSL is lower than another way and so on, so I don’t know what the truth is. I just want it to run smoothly. I’m cutting back on machines as I have a Windows PC, Windows “server” with 11 on it and I had the Ubuntu server. I’m in Texas and I’m tired of the $500-$700 electric bills. I know the I9 uses a lot of electricity but it’s more my AC. Less machines means less heat and also less power being used by the machines. I’ve tried in the past to setup VMs and I always make mistakes and they don’t go right. All I want to do is have Ubuntu and NC on one drive for now but I use a second drive for BU. I assume that is the right thing to do. The first thing I want to do is get the files off of the older NC drive and have a copy on Windows. I don’t want to lose this stuff. Then, after 24.04 and NC are installed, I will copy the files on it. It is a great program but I think the last version was NC13. I know I’m asking a lot but this is what I’m trying to do. I wish I knew more about Ubuntu and truthfully, that’s why I stopped trying to get NC installed as I get frustrated with making mistakes and starting over. I know that VMs are the way to go. I’m using a 10GB LAN but that can start a whole new deal, LOL. I have watched numerous videos on all of these subjects but just can’t get it. Do I need to install NC to get the data off the drive for Windows or can I get the data and setup NC afterwards? Does anyone know of a good thorough video or a step-by step guide to setup the best VM on Win 11 and install a single Ubuntu drive (including prerequisites, mounting, ownership and privileges) to accept NC? I suffered some severe brain damage and was in a coma for some time. I can function fine but have to take my time, one step at a time. My short term memory was affected fairly bad but anything before 2006 I can remember fine and unfortunately Ubuntu was after 2006 so my learning isn’t nearly as good. I setup NC 13 following an excellent video that covered all of this but I want to go to the newer versions of both. I’ll probably never try to change anything after this unless I have to. I also would like to set our phones to backup to NC again as that was great. Sorry this was so long winded but I’m just looking for help and to save money and make things more convenient. I tried installing a snap package but maybe I missed the part of install smb client and apache installation as it stopped me there. I appreciate all of the responses and I’m sorry I didn’t include everything but if you need more information just let me know. Thank you again. BTW, there will only be 2 users on NC and just me on Ubuntu.

Hello,

After reading your long post, looking at your configuration, I have a personal and off topic suggestion.

I personally feel, TrueNAS Scale may be a better base operating system for the job.

But in anyway, in case you wish to stick with Windows 11 as base OS and want to use Nextcloud, here is how I also do with my Home Server (yes, I am too on Windows 11 as base OS).

Using a lot of Hyper-V and staying away from WSL. Especially when you have enough RAM.

Ensure to create a Storage Sense Mirror Drive with 2 of your large HDDs. This is to be used for Nextcloud User data and also DB backups.

You may need to create an external virtual switch under Hyper-V to allow Guest and Host on same subnet (IP Range) as your primary router

You may need a primary VM running Ubuntu 24 LTS with Docker / Docker Compose and NginX Proxy Manager. This is to handle your Reverse proxy / SSL termination. Ensure to put this on that external virtual switch.

You may need a second VM running Ubuntu 24 LTS and Snap Nextcloud with cisf (To access Windows Shared Drives). Ensure to put this on that external virtual switch.

Use your router mac binding to issue static lan ip for both these VMs & your Host Windows 11. Or if you wish, you can setup static lan ip via each Ubuntu VM network settings.

Lets assume your,

Windows 11 Host has Static LAN IP → 192.168.1.50
Ubuntu VM (Nginx) has Static LAN IP → 192168.1.51
Ubuntu VM (Nextcloud) has Static LAN IP → 192.168.1.52
Windows Storage Sense Mirror Drive Letter → M

Step 1 (Share that M Drive)

Under your Host OS, share that M drive and ensure to edit sharing permission to allow just your Windows user with full access.

Double check from any network system that drive is shared as some times, windows need a reboot for share to come into effect

Step 2 (Nextcloud)

Lets proceed with the installation on a clean Ubuntu 24 LTS Server VM.

Update the OS

  1. sudo su
  2. apt update && apt upgrade -y
  3. reboot

Access and Mount the Windows 11 Share

  1. sudo su
  2. apt install cifs-utils -y

We need to create a directory, in where we shall store a text file with Windows 11 user id and password for network access. Lets assume your user name is “hello”.

  1. cd /home/hello
  2. mkdir pw
  3. cd pw
  4. nano Win11

This will bring up the text editor, just write this in same format. Where you inlude your own Windows 11 user name and password.

username=YourOwn
password=YourPW

Save the file (CTRL+X, Y then enter)

Lastly, change the permission of this file.

  1. chmod 600 Win11

Now we need to mount Windows 11 M drive in to Ubuntu VM via Network. This needs to mounted under /mnt or /media. I am mounting under /media

  1. sudo su
  2. cd /media
  3. mkdir M_Drive
  4. nano /etc/fstab

This will open text editor for this configuration file. Just add this line (with your own values off course) at the end.

//192.168.1.50/m /media/M_Drive cifs vers=3.0,credentials=/home/hello/pw/Win11,file_mode=0777,dir_mode=0777 0 0

Save and exit.

Run command → sudo mount -a or just reboot to check if the drive is mounted successfully or not.

Installation of Nextcloud

  1. sudo su
  2. snap install nextcloud
  3. nextcloud.manual-install user password
    (use your own user name and password as per your liking. This is the primary admin user of nextcloud)
  4. snap connect nextcloud:network-observe
  5. snap connect nextcloud:removable-media
  6. nextcloud.occ config:system:set trusted_domains 1 --value=192.168.1.52

By this, your basic nextcloud installation is completed. You can now access the server from any system on this same subnet (LAN) via browser with url http://192.168.1.52

Go ahead and check if its working

Changing Default User Data Storage

By default Snap Nextcloud will save everything at this at this following location, /var/snap/nextcloud/common/nextcloud/data

So we need to change it to your Windows 11 storage sense Raid drive. Which we have mounted at /media/M_drive under this VM.

  1. sudo su
  2. nextcloud.occ maintenance:mode --on
  3. mv /var/snap/nextcloud/common/nextcloud/data /media/M_Drive/

The moving is complete but we need to edit the nextcloud config file to ensure that its pointing to this new location.

  1. sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php

Here, find the entry called data directory and change the default location to /media/M_Drive/data. You also need to add an extra line bellow that entry, 'check_data_directory_permissions' => false, otherwise it complains about that mounting 777 permission.

Save the file and exit. Then bring nextcloud out of maintainace mode with command sudo nextcloud.occ maintenance:mode --off

Now reboot the VM and try to access nextcloud to check if data is now getting saved in that drive or not.

SSL and Reverse Proxy

You may need to install Docker / Docker compose under that first VM. Use the Nginx Reverse Proxy manager Docker or their .yml compose file to install and start Nginx Reverse proxy Manager.

Or you may also use a service like CloudFlare Zero trust tunnel by installing that.

Simply point the reverse proxy entry (Your ccTDL or TLD) to this Nextcloud VM IP and port 80 (http) to make it work.

Nextcloud DB Backup

Your user data is safe at that external location but your DB is still at VM root drive. So according to your need or update schedule, you can run following command to create backup of DB (only DB)

sudo nextcloud.export -b

This will create database backup and store it in this location, /var/snap/nextcloud/common/backups/. Use mv command to move those backups out to your M_Drive.

In case something goes wrong, you can recover your nextcloud from user data and this databse backup located in your mirror drive. You can also take these two and restore this in any other system running snap nextcloud

If needed, you can automate this but I haven’t tried due to lack of my knowledge with linux bash and laziness

Thanks.

2 Likes

Wow, I know that took you some time to do and I really appreciate it. You mentioned TrueNAS and I have heard of it but never really looked into it. If I went with Windows, what VM software is good? I just want it to run as smooth as possible. I really do appreciate the time and effort you put in your post. It is very informative and thorough and that’s what I need. Again, thank you for going through all of that trouble to do that for me.

1 Like

Hello,

I have already written that in above reply.

Windows Servers or Windows 10 / 11 Pro / Enterprise editions come with a built in Hypervisor called Microsoft Hyper-V. Its good enough, if not better than other free options.

That is the goal for any server creation. Once the setup is done, you may never need to touch it expect for Ubuntu updates. Snap Nextcloud will update itself automatically in background.

Thanks.

Sorry for the late response. My job keeps me busy and I have to do this when I have time so I can focus. I am going to work on this today. I know the drive from the old installation has the NC data files along with the actual files, I guess that would be the right term. So I still have to install it on the machine that has the NC drive on it to download all of the files to Windows so I don’t lose them, right? Then I can install Ubuntu on the Windows machine using hyper v and install NC on it, right? I can’t risk losing the data. I wish I knew all the tips and tricks and what I can and can’t do so I don’t lose it. I’m OK with doing it, it’s just time consuming as I am a bit slow with this stuff, LOL. So, this may be a dumb question but what if I just install truenas on the machine that has the NC drive, and install NC just to get the information off the drive? Is that a possibility and would it be easier to get them that way. Then, I could mess with it and maybe learn truenas and see if I like it. If using truenas on the now Windows machine, will I still be able to use it for all of my other files like, pdfs, excel, word, links and notepad stuff? What about Plex and blue iris for my cameras? I’m guessing that I would need to install Windows as a VM also in truenas? Under a VM, all I really want is to use a single drive for NC, a second drive for backup and the ability to add more internal drives, if/when needed. I’m very familiar with Windows but not with the VM part as I’m sure you already can tell since I keep going back on a Windows install. Thank you again. I hope I didn’t confuse you as I tend to do that with my wording. I will eventually update to a Xeon as I know these I9’s use a lot of electricity. I don’t know if I’m asking this machine or a Xeon for too much running NC, Plex, Blue Iris and as a network file server. I know it has plenty of memory to help but when I update the board and the CPU to a Xeon I would need ECC memory also, correct?

Hello,

First of all, please understand the fundamental difference between Microsoft / Apple software and linux and open source.

Those larger companies with proprietary software usually locks you down and gives you a single process of doing something.

Compare that to Linux / Open Source, it gives you the freedom choose. There are various deployment methods for nextcloud. Snap is one such. All have their own pros and cons.

Since you have asked about snap, that is why answers given here are covering snap.

This is something new, not present on your first post.

If you are using only single PC for all the tasks. I guess the Windows + Hyper-V based VMs are better option than Virtualizing Windows via TrueNAS. Since that would certainly require you another PC to access that Windows VM remotely.

Its up to you to choose what fits your requirement best.

Based on your first original question, I assume that you wish to run only single Computer for all the task.

I dont know about your CCTV. I dont have any experience about that.

But I too run JellyFin (Plex alternative) and for software like, Nextcloud / Plex (transcoding), even a 35W iGPU based Ryzen 3 is more than enough with 8GB of RAM.

These apps aren’t that resource hungry for low home based user count. Resource become an issue when you have many number of users doing simultaneous access to this server.

Pardon me, but I am feeling little confused here. So I shall try to make this simple and sticking to nextcloud only. I understand that you wish to restore data from previous nextcloud install.

The above post of mine stays valid even in that case also. However, I have asked you to format two of your large HDD for Windows Storage Sense. So obviously, take backup of those data at some other place.

However, after you have completed the install, to restore the data, please follow these additional steps.

Create Nextcloud users

First thing to do is to create nextcloud users. Just like you had in your previous install.

Locate the User Data Folder

As per my previous post, all your data is stored in a Windows Storage Sense raid drive. In there, you can browse into individual user folder and you can see something like this,

Screenshot 2024-09-01 235652

For each user, copy their previous data inside that “files” folder.

After that run this following command,

  1. sudo nextcloud.occ files:scan --all
  2. sudo nextcloud.occ files:scan-app-data
  3. sudo nextcloud.occ files:cleanup

That will restore and make all files visible under those respective users.

Thanks.

The recovering information is on another post that really hasn’t been answered. Before I do a VM, I want to be able to save the actual files to on the Windows machine where Windows can read them as some aren’t backed up. It’s a long story. I’m trying to accomplish that and the installation on a VM after that. Sorry for the confusion. At this point, if I had someone that I trust to do it, I’d pay for it to be done just so I don’t mess it up and it will be done without me worrying about it, but you don’t know who can be trusted. I have a hard time with keeping things in line nowadays.

Hello,

Pardon me, but here is another new information.

Can we take things from start?

It would be easier and in a community forum, people are offering their volunteer help, so things may be slow in moving (going back and forth) but its free.

I have few questions,

  1. Do you have an already running Nextcloud installation?
  2. What deployment method did you use to install this nextcloud? Like Snap / Docker, in WSL / VM or something else?
  3. Is it functioning? meaning, can you access nextcloud via browser?
  4. What is the problem in this install, for which you wish this new setup?

Based on these answers, we can take things forward from there on, and try to get it done for you.

Thanks.

1 Like

I had a machine running NC. It was Ubuntu 18.04 running NC 13 I think. I actually found a video that walked me through everything and it was simple. I upgraded Ubuntu to 20.04 when it came out and when I tried installing NC, things changed and required different things but I’m not sure what the NC version was. So, right now I have the 2 drives in the machine that were being used and have data on them and they aren’t being used because I never got NC installed on it again. So, no machine has NC on it. This machine was just a Ubuntu machine being used for NC, when it was working.
I want to eliminate this Ubuntu machine and install it and NC on a VM on my Windows machine but I’m scared that I will lose the data on the 2 drives if something goes wrong. I just want one machine that can do everything like Plex, Blue Iris for my PoE cameras, NC and just for storing and accessing files in Windows. I think the old NC drive wasn’t completely up to date on the backup so I don’t want to rely on the backup. I would like to get the data off of the drive and put it on a drive that Windows can see so I have a drive that Windows will have readable files that are from the old NC drive.
I have no machine running NC at all right now but I still have it and installed Ubuntu 24.04 on it but I attempted to install NC on it using a snap but then it says I don’t have apache installed and something else so I quit there. I thought everything came in the snap package that I need to install it and get it working. I was trying to get it working so I can download/copy the files to a Windows drive through the browser. I think I lost the Windows drive that did have the files on and the backup wasn’t setup right, so I’m trying to get those files from NC. That’s the first priority.
I’ve tried doing VMs before but I can’t seem to get them right as there are too many settings.
I have bigger drives for NC and backup and I want to use the complete drive for NC and the other for it’s backup. I would like to have it to where I could add more drives to NC if needed. I don’t know how to setup a VM properly especially to do what I want for NC. The Windows side of things is not an issue. It’s setting up the VM and installing Ubuntu and NC on the VM to use the complete drive and figuring out things like memory allotment for it and so on. The last time I tried doing a VM, I probably did it well over a dozen times and I kept installing Windows also because it kept adding a number behind Ubuntu, like one install was Ubuntu the next was Ubuntu (1) and so on. I couldn’t figure out how to completely clean it to just have a single Ubuntu VM without the number behind it. It’s been a while since I’ve tried it, so if my terminology is incorrect, I’m sorry. My whole goal is that I just want to keep the Windows machine the way it is except I want to install a VM with Ubuntu and NC and retrieve the data from the NC drive in the old machine as the data on it is no longer around. I hope this clears things up. I posted to another forum about the data retrieval as it was a different concern.

Hello,

One can understand the frustration of getting stuck and feeling clueless with fear of data loss but pardon me for saying it, unless you approach the issue on step by step manner, it is hard to identify things and then troubleshoot and fix it.

Normally in your condition, one must figure out one main thing, data safety. But from external troubleshooting, one can’t advice any steps unless we can figure out the location of the data.

Can you access this data right now? If you can access it, just copy it out somewhere safe. In case you dont have any other means of storage. Just copy one drive into another, make one drive free.

That solves most your issues.

The empty drive can now be used as data storage for nextcloud. You have to skip the storage sense raid creation and that eliminates any change of accidental drive format.

Windows Hyper-V wont format any drive. vDisks (Virtual Disks) are stored as a single file with .VHD or .VHDX extension.

The setup guide post of mine stays valid except the raid creation. You are using a single HDD now for external mounting to storge your user data.

Go ahead, try with Hyper-V VMs. Dont worry, they dont format anything. You can safely delete those VM and start fresh without any fear of data loss.

Thanks.

The data on the 2 NC drive is there and I can copy it, no problem. The drives are still in the machine that WAS running NC, which currently has 24.04 on it. But it doesn’t look like Windows will be able to see it or be able to be use it on a Windows PC, unless I’m missing something. It looks like it has several different directories with no way of knowing what each one is. I mean I feel dumb because I can’t seem to explain what I need to do first in a way that’s not confusing. I just want to get a copy of the files I uploaded from my Windows PC from the NC drive so that it can be used on Windows and that will settle the data transfer as I lost the files on the Windows server that were uploaded to NC. The NC drive looks like it has random numbers for directories on the actual drive once I go into each folder. Do I need to install NC on the machine running 24.04 and get NC running to download the files onto a windows server drive so it can basically “recover” my files from NC so I have copies on Windows? I can always put them back on the new and bigger NC drive after that. There is 4TB of data on the NC drive but it seems like it’s in a format that Windows can’t interpret, unless I’m missing something or looking in the wrong place. The data is there, I just want to copy it to Windows so I have it there first and I can make a backup on Windows again. Then, I want to setup NC on a VM. I’m really trying to explain it the best I can.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.