@danb35
Ok im going to try and use your script to install another nextcloud instance parallel to the first one (iv shut the first one down but not removed it). Working through your script, a few questions.
I have created the datasets as described but im not 100% sure if the "nextcloud" dataset is supposed to be in the iocage dataset?
This is the pool i will be working in.
Code:
jack@truenas ~/git/freenas-iocage-nextcloud $ zfs list -r NAS-main
NAME USED AVAIL REFER MOUNTPOINT
NAS-main 638G 6.30T 163K /mnt/NAS-main
NAS-main/.system 930M 6.30T 852M legacy
NAS-main/.system/configs-daeb7be0eae547028f28998beacf9023 12.5M 6.30T 12.5M legacy
NAS-main/.system/cores 140K 1024M 140K legacy
NAS-main/.system/rrd-daeb7be0eae547028f28998beacf9023 51.8M 6.30T 51.8M legacy
NAS-main/.system/samba4 7.71M 6.30T 703K legacy
NAS-main/.system/services 140K 6.30T 140K legacy
NAS-main/.system/syslog-daeb7be0eae547028f28998beacf9023 5.43M 6.30T 5.43M legacy
NAS-main/.system/webui 140K 6.30T 140K legacy
NAS-main/VMs 88.5G 6.30T 140K /mnt/NAS-main/VMs
NAS-main/VMs/win10-lz4iis 55.3G 6.34T 16.4G -
NAS-main/VMs/win7-cabreo 33.2G 6.32T 7.28G -
NAS-main/cavern 247G 6.30T 247G /mnt/NAS-main/cavern
NAS-main/home 17.1G 6.30T 16.4G /mnt/NAS-main/home
NAS-main/iocage 15.9G 6.30T 9.34M /mnt/NAS-main/iocage
NAS-main/iocage/download 434M 6.30T 140K /mnt/NAS-main/iocage/download
NAS-main/iocage/download/13.1-RELEASE 434M 6.30T 434M /mnt/NAS-main/iocage/download/13.1-RELEASE
NAS-main/iocage/images 140K 6.30T 140K /mnt/NAS-main/iocage/images
NAS-main/iocage/jails 13.7G 6.30T 151K /mnt/NAS-main/iocage/jails
NAS-main/iocage/jails/adguard 1.33G 6.30T 471K /mnt/NAS-main/iocage/jails/adguard
NAS-main/iocage/jails/adguard/root 1.33G 6.30T 1.26G /mnt/NAS-main/iocage/jails/adguard/root
NAS-main/iocage/jails/nextcloud-jail 9.01G 6.30T 727K /mnt/NAS-main/iocage/jails/nextcloud-jail
NAS-main/iocage/jails/nextcloud-jail/root 9.00G 6.30T 5.23G /mnt/NAS-main/iocage/jails/nextcloud-jail/root
NAS-main/iocage/jails/qbittorrent-jail 1.93G 6.30T 471K /mnt/NAS-main/iocage/jails/qbittorrent-jail
NAS-main/iocage/jails/qbittorrent-jail/root 1.93G 6.30T 1.53G /mnt/NAS-main/iocage/jails/qbittorrent-jail/root
NAS-main/iocage/jails/syncthing-jail 1.46G 6.30T 471K /mnt/NAS-main/iocage/jails/syncthing-jail
NAS-main/iocage/jails/syncthing-jail/root 1.45G 6.30T 1.23G /mnt/NAS-main/iocage/jails/syncthing-jail/root
NAS-main/iocage/log 180K 6.30T 180K /mnt/NAS-main/iocage/log
NAS-main/iocage/releases 1.77G 6.30T 140K /mnt/NAS-main/iocage/releases
NAS-main/iocage/releases/13.1-RELEASE 1.77G 6.30T 140K /mnt/NAS-main/iocage/releases/13.1-RELEASE
NAS-main/iocage/releases/13.1-RELEASE/root 1.77G 6.30T 1.77G /mnt/NAS-main/iocage/releases/13.1-RELEASE/root
NAS-main/iocage/templates 140K 6.30T 140K /mnt/NAS-main/iocage/templates
NAS-main/mandie-home 186M 6.30T 5.65M /mnt/NAS-main/mandie-home
NAS-main/manjaro-home 106G 6.30T 93.5G /mnt/NAS-main/manjaro-home
NAS-main/media 159G 6.30T 153G /mnt/NAS-main/media
NAS-main/nextcloud 721K 6.30T 163K /mnt/NAS-main/nextcloud
NAS-main/nextcloud/config 140K 6.30T 140K /mnt/NAS-main/nextcloud/config
NAS-main/nextcloud/db 140K 6.30T 140K /mnt/NAS-main/nextcloud/db
NAS-main/nextcloud/files 140K 6.30T 140K /mnt/NAS-main/nextcloud/files
NAS-main/nextcloud/themes 140K 6.30T 140K /mnt/NAS-main/nextcloud/themes
NAS-main/syncthing-data 3.15G 6.30T 2.46G /mnt/NAS-main/syncthing-data
As you see i have iocage dataset where all the jails usually live but i assume its ok to have the new nextcloud dataset completely separate? (i dont really have a clue about jails or what iocage is)
JAIL_IP is the IP address for your jail. You can optionally add the netmask in CIDR notation (e.g., 192.168.1.199/24). If not specified, the netmask defaults to 24 bits. Values of less than 8 bits or more than 30 bits are invalid.
The old nextcloud was at 192.168.2.113:8283 but that was assigned by itself i.e. it just told me what IP and port to use, i did not set it. So how do i know what JAIL_IP is going to be here with this new nextcloud?
Or is this where I set the IP to what i want it to be for this jail? The old nextcloud was on the same IP as truenas but had a port used.
I Dont know.
I need UK, but is that UK or GB or something else?
I see it mention $POOL_PATH/portsnap but it never said to create a dataset called portsnap?
Also, HOST_NAME needs to resolve to your jail from
inside your network. You'll probably need to configure this on your router, or on whatever other device provides DNS for your LAN. If you're unable to do so, you can edit the hosts file on your client computers to achieve this result, but consider installing something like
Pi-Hole to give you control over your DNS.
Im starting to get confused here. Its starting to sound like im supposed to have already created a jail and im supposed to know what the IP:port is. I thought this script was going to create a new jail and install nextcloud in it. Im not sure now :(
I need to forward the IP and ports in the router settings but how do i know what the IP is going to be?