Resource icon

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

Joined
Feb 9, 2019
Messages
7
<code>
iocage destroy -f nextcloud
rm -rf ${DB_PATH}/*
rm -rf ${FILES_PATH}/*
</code>
Substitute the path variables as appropriate above, then re-run the script.

It stlll says Device Busy.

Anyway, I managed to reinstall it but the IP is still the thing that hits me. I tried vnet but somehow it just doesnt point to the nextcloud login page. I am using static ip address for the nextcloud. Point to note is that this is all running on a lagg0 interface.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Point to note is that this is all running on a lagg0 interface.
I haven't worked with LAGG, so I really can't say if that would make a difference. But the jail is set to its own static IP address, different from the FreeNAS IP address, but when you browse to the jail, you get the FreeNAS UI?
 
Joined
Feb 9, 2019
Messages
7
I haven't worked with LAGG, so I really can't say if that would make a difference. But the jail is set to its own static IP address, different from the FreeNAS IP address, but when you browse to the jail, you get the FreeNAS UI?
Yes, that's correct.
 

glauco

Guru
Joined
Jan 30, 2017
Messages
526
pkg upgrade should be perfectly fine. There's one specific dependency that's installed using the port, but shouldn't be causing a problem with anything.
Sorry I only just found your reply!
Can you tell me what this specific dependency is and how I should go about upgrading it? But most of all, can I install it via packages and get rid of the portsnap dataset? Would it break anything? Thank you!
 

noob_noob

Cadet
Joined
Mar 14, 2019
Messages
3
Had the same issue as Benc, white web page after reboot. Was missing file and db path as danb35 said. Recreated them and it's working fine again. Thanks for creating this @danb35 !
 

noob_noob

Cadet
Joined
Mar 14, 2019
Messages
3
Also should mention that after the install I did get an odd message and I saved it. This is when the install is finished and it shows you the database and pw information...


All passwords are saved in /root/nextcloud_db_password.txt



[: =: unexpected operator

[: =: unexpected operator
 

airbornespoon

Dabbler
Joined
Mar 16, 2019
Messages
10
So here is my issue, WTF goes in the host_name space? Like do I have to go out and buy/make a website?
I just want to access my movies on freenas from any computer anywhere.
Is there no way to do this easily? Because I'm super confused.

JAIL_IP="192.168.254.15" DEFAULT_GW_IP="192.168.254.15" POOL_PATH="/mnt/NAS_Vol1/Videos" JAIL_NAME="nextcloud" TIME_ZONE="America/Monterrey" # See http://php.net/manual/en/timezones.php HOST_NAME="" STANDALONE_CERT=1 DNS_CERT=0
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
WTF goes in the host_name space?
The fully-qualified domain name you're going to use for this Nextcloud installation. As the README says.
Like do I have to go out and buy/make a website?
Nextcloud is a website. What you need is a domain name (as well as some way to connect that domain name with your IP address--if you have a dynamic IP address, as most home users do, you'd want to look into Dynamic DNS service). You can get some domain names for free (see freenom.com), or pay for others with the registrar of your choice (I like easydns.com, but there are lots to choose from).
JAIL_IP="192.168.254.15" DEFAULT_GW_IP="192.168.254.15"
The jail and your gateway can't both have the same IP address--the gateway address is going to be the IP address of your router.
POOL_PATH="/mnt/NAS_Vol1/Videos"
This variable should point to the pool itself, not to subdirectories.

I just want to access my movies on freenas from any computer anywhere.
You might want to look into Plex instead.
 

hockeyamd

Cadet
Joined
Mar 22, 2019
Messages
6
Great Job. Worked Great!

I wanted to use ElasticSearch and Tesseract OCR but I am unsure how to safely add the requirements to my install
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I wanted to use ElasticSearch and Tesseract OCR but I am unsure how to safely add the requirements to my install
I've done that on Linux, but not on FreeBSD. I'd look for instructions on installing that software under FreeBSD; they should work in the jail.
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Hi I wanted to install Nextclound with the script but it is asking me for username and password entering

Code:
git clone https://github.com/danb35/freenas-iocage-nextcloud 


How come ? What do I have to enter ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
How come ?
It shouldn't be asking for that; I just tested on a machine that's never connected to github before and it just did the clone operation. Can you give the full output of that command?
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Thanks a lot for your reply, tried a different machine too and the clone worked fine.:oops:
 

hafnix

Dabbler
Joined
Mar 24, 2019
Messages
24
Ok, sooo great, guess your script ran with succeess. However I checked from outside my network (with my mobile) and got the
error message that the Cert is invalid. Does it take a little while until there is a refresh ?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
However I checked from outside my network (with my mobile) and got the
error message that the Cert is invalid.
How did you tell it to obtain the cert?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Yes, as the script told you when it finished:
Code:
"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 console ${JAIL_NAME}"
"acme.sh --issue -d ${HOST_NAME} --force -w /usr/local/www/apache24/data -k 4096 --fullchain-file /usr/local/etc/pki/tls/certs/fullchain.pem --key-file /usr/local/etc/pki/tls/private/privkey.pem --reloadcmd \"service apache24 reload\""
 
Top