Resource icon

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

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
/mnt/Stockage/portsnap/ports
Provided path for source does not exist

It's very strange! I can not understand what are these paths because in Stockage I don't have 'portsnap', 'files' and 'db'...

I'm really grateful for all the time you spend with me.
 

danb35

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

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
I placed your folder 'freenas-iocage-nextcloud' in /root/freenas-iocage-nextcloud
After that, I followed your procedure and started your script ./nextcloud-jail.sh
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
When the script runs, it needs to map $FILES_PATH, $DB_PATH, and $PORTS_PATH into the jail. By default, those are assumed to be in /mnt/your_pool/{files|db|portsnap}. Those directories (ideally, datasets) must exist before you run the script, and you need to either explicitly define them, or define $POOL_PATH (i.e., /mnt/your_pool) and use the defaults from the script.

The system is acting like you'd set $POOL_PATH to /mnt/tank, but if you don't have a pool called tank (and didn't when you ran the script), it never would have installed. The next logical assumption would be that you have those paths on Stockage, but now you're saying you don't. So where are they? My crystal ball is in the shop; I don't know what you've done or how you've configured your system.
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
I understand.... I forgot to change this line "POOL_PATH="/mnt/tank" in your nextcloud-config file :eek::oops:

I'm so sorry... I'm going to delete and reinstall
 

Mara

Dabbler
Joined
Jan 14, 2017
Messages
48
I confirm, it's fixed now... :D
thank you for your time and efficiency!
 

blowfish

Cadet
Joined
Apr 22, 2019
Messages
3
I am having a strange issue. I tried installing the script half a year ago but every time after script install was done i entered the ip in the webbrowser to access nextcloud and then it showed me the login screen of my freenas server.

now i wanted to try again with freenas 11.2-U3 and i still have the same problem.

here's my cfg:
JAIL_IP="192.168.1.202" # FreeNAS runs on 192.168.1.200
DEFAULT_GW_IP="192.168.1.1"
INTERFACE="bge0"
VNET="off"
POOL_PATH="/mnt/snowflake"
JAIL_NAME="nextcloud"
TIME_ZONE="Europe/Vienna" # See http://php.net/manual/en/timezones.php
HOST_NAME="xxxxxxxxx.com"
DATABASE="mariadb"
STANDALONE_CERT=1
DNS_CERT=0
SELFSIGNED_CERT=0
NO_CERT=0
TEST_CERT=""

also at my freenas dashboard it shows the new 192.168.1.202 ip instead of 200 like before running the script and creating the jail.
when i go to network adapters it shows both ip addresses with my bge0 adapter:

nextcloud-bge0.png
 

blowfish

Cadet
Joined
Apr 22, 2019
Messages
3
thanks i'll try that. how can i get rid of all the iocage stuff, clean up db and files dataset and start from scratch?
 

blowfish

Cadet
Joined
Apr 22, 2019
Messages
3
I'd suggest using vnet. Set the interface to "vnet0" and vnet to "on".

i did a re-install and reset the browser cache but cant connect to 192.168.1.202 (Jail). any suggestion? is there anything for vnet to adjust in freenas itself?
 

Attachments

  • Bildschirmfoto 2019-04-23 um 10.51.50.png
    Bildschirmfoto 2019-04-23 um 10.51.50.png
    1.3 MB · Views: 341
  • Bildschirmfoto 2019-04-23 um 10.52.20.png
    Bildschirmfoto 2019-04-23 um 10.52.20.png
    311.4 KB · Views: 343
  • Bildschirmfoto 2019-04-23 um 11.15.07.png
    Bildschirmfoto 2019-04-23 um 11.15.07.png
    383.2 KB · Views: 322
  • Bildschirmfoto 2019-04-23 um 11.15.41.png
    Bildschirmfoto 2019-04-23 um 11.15.41.png
    575.7 KB · Views: 315
  • Bildschirmfoto 2019-04-23 um 11.15.16.png
    Bildschirmfoto 2019-04-23 um 11.15.16.png
    168.7 KB · Views: 326
Last edited:

uCtaudio

Cadet
Joined
Oct 12, 2016
Messages
5
I'm using nginx (with SSl) in another jail for all my redirects needs.

Is it possible to disable danb35 redirection setup?

I get "ERR_TOO_MANY_REDIRECTS " error now

secondly when i comment out my redirects in my master nginx file, i get redirected to [server]:80

(using Vnet, outside ping ok)
 

uCtaudio

Cadet
Joined
Oct 12, 2016
Messages
5
I'm using nginx in another jail for all my redirects needs.

Is it possible to disable danb35 redirection setup?

I get "ERR_TOO_MANY_REDIRECTS " error now

secondly when i comment out my redirects in my master nginx file, i get redirected to [server]:80

(using Vnet, outside ping ok)
 

xiSlickix

Dabbler
Joined
Feb 5, 2014
Messages
47
@danb35

Thanks so much for this script / automated setup. I had to bang my head on this for a little while due to, of all things, Notepad++ on windows introducing some characters that FreeBSD wasn't having in the config file. After I figured out that mishap, everything has been working great! I realized a few minutes ago that I retained and changed the admin password (Nextcloud login) but failed to save the root & database passwords. Doh!

What do you think the best course of action is? If I rerun your script, will my current Nextcloud settings get completely wiped out? If not, will I still get new credentials automatically generated? Luckily, this instance is just a testing environment, so if the answer is burn down and start over, no problem, I would just prefer to avoid that as its been working rock solid for a few weeks.

Thanks!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
but failed to save the root & database passwords. Doh!
Unless you've deleted the file, they're saved on your FreeNAS server in /root/nextcloud_db_password.txt.
If I rerun your script, will my current Nextcloud settings get completely wiped out?
Yes. I think someone else (@NasKar?) has a fork of my script that will preserve settings, but my script doesn't.
 

xiSlickix

Dabbler
Joined
Feb 5, 2014
Messages
47
Unless you've deleted the file, they're saved on your FreeNAS server in /root/nextcloud_db_password.txt.

Right where you said it was - ee to check the file and I'm set, thanks!!

Edit-- Ok, the file is definitely there, but perhaps I misunderstand something. I'm trying to SSH into the Nextcloud jail - the update advisor for Nextcloud mentioned modifiying the database for BigInt, and specifies the command to run. I have access to the nextcloud_db_password.txt file. None of those passwords seem to be root for this jail.

MariaDB root password is 7rrnjn*************5Dg== Nextcloud database password is w1Yz********************FHJw== Nextcloud Administrator password is u8L************VN

What am I missing?
Again, thanks!
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Nextcloud 16 has just been released, so I've created a new branch of the script to install it instead of 15. This branch also adds some error checking and GPG signature verification of the Nextcloud download. To try this one, download it with git clone -b nextcloud-16 https://github.com/danb35/freenas-iocage-nextcloud, then run it as before. The Nextcloud devs haven't yet made a latest-16.tar.bz2 download available, which is what I'd used for NC14 and NC15 to get the latest release of that version, so for now this branch is hard-coded to 16.0.0. Try it and let me know what you think.

Edit: If you've already installed NC15, you should be able to update using Nextcloud's built-in updater within the next couple of weeks.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'm trying to SSH into the Nextcloud jail
My script doesn't enable SSH or set a password for the root user. If you need to get to the jail console, you'll either need to configure that manually, or (better) SSH to your FreeNAS box and then do iocage console nextcloud. But I thought I'd already made the necessary changes for BigInt.
 
Top