I have nearly 5tb of photos on this system now, so I would like to get it going for now. I have another machine and will try building something in iocage.
This is a bit tricky but there should be no showstopper:
I am in a similar situation as my server is also pointing to the "owncloud" folder, at least this is what I see from your low resolution picture, but I have since long been performing updated to maintain the "owncloud" folder structure. My latest update is Nextcloud 13.0.7.
There are several aspect of the migration using iocage which is by far preferable but the first thing you need to know is the details about your "nginx" and "Mysql".
I would use Danb35 script to Nextcloud as the base of you install:
First of all, make sure you have snapshots of your "db" and "files" dataset as a precaution. At least if you have your "files" dataset available, all the files you have from the various user account will be accessible there if you mount them as SMB or browse through over SSH, but it is not what you should do here.
If you have snapshots of the old jail, I would clone the snapshots that are from the time just before the update as it contains information within your "Nginx" account profile.
If it was running on iocage, which it doesn't you could have reverted the jail before updrage without too much trouble.
If you were to follow danb35 script, you will need information related to your MySQL database which are store into your jail somewhere like:
/usr/local/www/owncloud/config
The file containing the info is "config.php".
The element you need to save are:
'passwordsalt'
'secret'
'dbname'
'dbuser'
'dbpassword'
'instanceid'
'htaccess.RewriteBase'
If you do a fresh install by script, the above elements are going to be automaticaly created and you will need to have them match the one you recovered.
Without those, you will not be able to connect to the database because it is encrypted.
Then you will have to worry about PHP and how it handles access to Nextcloud.
For that two scenario:
1) you want to retain your "domain.xyz/owncloud" so your current users can access there own account as if nothing changed, you can use the scipt unmodifie ( almost umodifed ) and you will need to implement a "RewriteRule" within your "VirtualHost" section of your "domain.xyz.conf" file hosted by Apache24.
I was successful going this far, but the issue that remain unresolved on my end is RewriteRule command to support Windows and Android App redirection. As of now I am unable to have them connect to the server with existing link.
2) if the scenario above is not an option, you need to modify a few of the danb35 script to change the default
Code:
DocumentRoot "/usr/local/www/apache24/data/nextcloud"
into something like this:
Code:
DocumentRoot "/usr/local/www/apache24/data/cloud"
The script requires to have "db", "files" and "portsnap" dataset created. You should group them under one dataset of your choice which doesn't contain anything.
Upon running the script, after it has been clones from git and created your nextclou-config file, you will have Freenas create and mount the iocage jail you named in your nextcloud-config file.
Information on how to access the newly created Nextcloud server will be provided with the credential. You need to access it to see if the installation was successful.
At that point, if you can access Nextcloud, you are only accessing the MySQL data from the new installed Nextcloud.
To access you old data, you will need to stop the iocage jail you just created in order to edit the "fstab" file.
This is easily done using "ssh" to your Freenas box and use "nano" or "mc" to edit it in the iocage section. You can also do it with Freenas web GUI for "jails".
The "fstab" or mount point need to be chnaged to point to yu old "db" and "files" dataset locations.
Restart jail and after a few seconds you should have access to the new Nextcloud with the old data, but there will be updates Nextcloud will need to perform.
With Nextcloud 14, I am not able to update the database due to some unknown errors.
Instead of installing the latest 14 tar file, I would suggest you stick with the latest 13 tar file instead.
You just need to edit the script to point to the 13 install file location instead.
If you still need the "/owncloud/" folder as part of your domain, you will also need to update the script which include the "occ" relevant commends as they are hard coded.
Not a bit thing, but it has to be done properly.
Letsencrypt can be tricky at first and is one thing that will cause to not being able to access Nextcloud, but if certificate issueance is successful you will be much closer to sorting this issue out.