Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
Since you only have one disk right now, you apparently don't care about redundancy. In that case, you should be able to replace the old disk through the GUI. Plug in the new one, go to Storage -> Pools, click on the gear, click Status, select the three vertical dots to the right of your current disk, select Replace, pick the new disk. Wait for the server to do its thing, then you can remove the old disk.

But consider adding a second 4 TB disk to create a mirror--which you'll unfortunately need to do at the CLI.
Hi mr.danb35,

sorry for bringing up , and old post .
as ur advice, i will replace HDD 500GB my freenas which nextcloud inside to 2 HDD 4TB ( mirror )

can u give me some information about procedure and how to replace my hdd 500GB to 2 hdd 4TB ( mirror ) on my freenas system ?

Thank you

Regards,
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
can u give me some information about procedure and how to replace my hdd 500GB to 2 hdd 4TB ( mirror ) on my freenas system ?
Add both 4 TB disks to your system if mounting space and number of SATA ports allow.
Attach both new disks to the existing vdev (don't create a new vdev!) to build a three-way mirror.
Detach old disk from three-way mirror.
Resize partitions to make use of the entire space if necessary.

The last step probably requires use of the CLI, the rest should be available in the UI.
 

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
Add both 4 TB disks to your system if mounting space and number of SATA ports allow.
Attach both new disks to the existing vdev (don't create a new vdev!) to build a three-way mirror.
Detach old disk from three-way mirror.
Resize partitions to make use of the entire space if necessary.

The last step probably requires use of the CLI, the rest should be available in the UI.
hi Patrick ,

may i ask for the command for that steps ? is it not via GUI freenas ?
because i'm new in linux and also freebsd command,
all i've done mostly using GUI interface.
still dunno what must i starting to do .

Thank you .

Regards,
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
Have you done all the other steps via the UI, already? The last step may not be necessary.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
Please mount and connect the two additional disks. And as I wrote all but the last step - which might not even be necessary - can be done in the UI.
Once your disks are connected go to Storage --> Pools --> your pool, little gear icon --> Status. Then click on the menu to the right for your single disk and select Extend like in the screenshot. Pick one of your new disks and apply. Repeat for the second new disk.

Bildschirmfoto 2021-01-20 um 11.53.50.png


Once the resilver is done, please report back.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
Please mount and connect the two additional disks. And as I wrote all but the last step - which might not even be necessary - can be done in the UI.
Once your disks are connected go to Storage --> Pools --> your pool, little gear icon --> Status. Then click on the menu to the right for your single disk and select Extend like in the screenshot. Pick one of your new disks and apply. Repeat for the second new disk.

View attachment 44439

Once the resilver is done, please report back.
Hi Mr.Patrick and mr. danb35 ,
really thanks for your advice ,
i' ll report later , because there's a small problem here, one of my new hdd 4TB was defect, i have to RMA the HDD .

Regards,
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
You could still add the other one as a mirror, which would give you some redundancy. Of course, that's assuming you've already successfully burned in and tested that one.
 

G8One2

Patron
Joined
Jan 2, 2017
Messages
248
Quick question for @danb35
NextCloud is showing an update in the web UI. Whats the best way to update? Last time I updated, I used the web interface, and wound up doing a reinstall and getting it stuck in maintenece mode. I was able to get it back up and updated, but I feel I went about updating the server the wrong way. Is there a correct process for updating?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
AFAIK, you should be able to do it through the GUI, but it's always good to take a snapshot first.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
you should be able to do it through the GUI
I have done several, including the one from today (20.0.5 to 20.0.6) with success.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Dear danb35/(& other freenasers)
You referred me to this script from another post - but I pretty inexperienced in all this. I wanted to check I am on track to run the script.
I am running FreeNAS-11.3-U2.1.

I've followed the guide in detail, here's the sum total of what I have done:

Running
Want to use Lets Encrypt. I note the references to Caddy. I do not know if there are pre-requisite steps for Caddy, as I have no knowledge / use of this so far.

0. Pre-requisites as per guide.
1. Bought .com domain
2. Registered free plan with Cloudflare and used in txt file below
3. Added site to Cloudflare
4. Updated DNS Nameservers to Cloudflare ones
5. Created API token on Cloudflare and used in txt file below
6. Created 1 dataset with 4 sub-datasets are per instructions
7. Downloaded repository and created text file (nextcloud-config.txt) as per below. Pool_Path is to the dataset I created. Hope that's correct?

JAIL_IP="192.168.0.X"
DEFAULT_GW_IP="192.168.0.X"
POOL_PATH="/mnt/Nikin_ZFS/nextcloud"
TIME_ZONE="Europe/London"
HOST_NAME="Xl.com"
DNS_CERT=1
DNS_PLUGIN="cloudflare"
DNS_TOKEN="XXXXX"
CERT_EMAIL="X@X.co.uk"

I noted the comment in the guide. "HOST_NAME" needs to resolve to your jail from inside your network.... I dont know what this means or if I need to do this before running the script (which I have not done yet). Also the Nameservers take 24hrs to update, so I was waiting for that to happen too.

Do I need to do anything else before running the magical script?
Thanks in advance
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
Generally looks good, but a few points:
I do not know if there are pre-requisite steps for Caddy
The script installs Caddy, so the noted prerequisites should cover everything it needs as well.
created text file (nextcloud-config.txt)
The file name should be just nextcloud-config, not nextcloud-config.txt.
Pool_Path is to the dataset I created.
POOL_PATH should be, as the README says, the path for your pool. Unless you set other locations (which you haven't in the example you posted), all the relevant files will be stored in $POOL_PATH/nextcloud/{db|files|config|themes}.
"HOST_NAME" needs to resolve to your jail from inside your network.... I dont know what this means
Apologies if this sounds blunt, but what part of it confuses you?
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Generally looks good, but a few points:

The script installs Caddy, so the noted prerequisites should cover everything it needs as well.

The file name should be just nextcloud-config, not nextcloud-config.txt.

POOL_PATH should be, as the README says, the path for your pool. Unless you set other locations (which you haven't in the example you posted), all the relevant files will be stored in $POOL_PATH/nextcloud/{db|files|config|themes}.

Apologies if this sounds blunt, but what part of it confuses you?

Not being blunt. Rather helpful that way, I think!

Thanks for the catch on the filename.
Re POOL_PATH. My pool is Nikin_ZFS within this I have created the 1+4 datasets. So perhaps it should read POOL_PATH=""/mnt/Nikin_ZFS"

I dont know what I have have to do to ensure "HOST_NAME" resolves to your jail from inside the network. ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
So perhaps it should read POOL_PATH=""/mnt/Nikin_ZFS"
Correct.
I dont know what I have have to do to ensure "HOST_NAME" resolves to your jail from inside the network. ?
Whatever device is providing DNS service for your LAN (likely your router) is where this really should be configured, assuming it has the capability to do it. Can't really help much more unless you're using pfSense or perhaps OPNsense.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Correct.

Whatever device is providing DNS service for your LAN (likely your router) is where this really should be configured, assuming it has the capability to do it. Can't really help much more unless you're using pfSense or perhaps OPNsense.

I ran the script. Final output is


Installation complete!
Using your web browser, go to https://X.com to log in
Default user is admin, password is X

Database Information
--------------------
Database user = nextcloud
Database password = X
The MariaDB root password is X

All passwords are saved in /root/nextcloud_db_password.txt

You have obtained your Let's Encrypt certificate using the staging server.
This certificate will not be trusted by your browser and will cause SSL errors
when you connect. Once you've verified that everything else is working
correctly, you should issue a trusted certificate. To do this, run:
iocage exec nextcloud /root/remove-staging.sh


Script done, output file is nextcloud.log
root@freenas:/download/freenas-iocage-nextcloud #

However, when I go to http://X.com it just takes me to a easydns marketing page. Are there some configurations on the domain/cloudflare to point it to my nas?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
Are there some configurations on the domain/cloudflare to point it to my nas?
That depends. Do you want to access the Nextcloud installation from outside your LAN? If not, then no, there's really nothing you need to do on that end (if yes, then you'd need to point the domain name to your IP address and forward ports to the Nextcloud jail). What you do need to do is what we've been discussing--figure out, on your network, with your devices, how to have X.com resolve to the IP address of your jail.
 
Top