Resource icon

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

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
There's a pull request against the script that should address this, but I haven't yet had a chance to test it before merging it.
I've now merged that PR. @kwessel, pull the latest version of the script and see if it works for you this time.
 

kwessel

Dabbler
Joined
Mar 30, 2015
Messages
44
Sorry, I deleted posts again before seeing your request to not do so. I will not do that again.

I will try the upgrade to 11.2-RC

Is the latest version of your script in the text of your read.me file?
 
Last edited:

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
If you're going to recommend pre-release software, wouldn't you want to recommend the most recent version? 11.2-RC2 has been out for a few days now.
Can't remember if I intended to write RC1 or RC2.
With RC2, I have very little history due to the short availability.
With RC1, I have been doing a lot of things and haven't encountered any particular issues.

RC2 should be the preferred choice, due to bug fixes, but there is also the possibility of introducing more bugs too.
I have RC2 running on another system and it seems to work fine for now.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Nextcloud should work just fine in any Unix-y OS that supports PHP and a compatible database. I can't speak to its being production-ready (as I don't personally run it on my FreeNAS box; I have a public-facing Linux web server for that), but it seems to run well and I haven't heard of any incompatibilities.
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
Thanks danb35. From reading this thread, you seem to have put a lot of work into that script (thanks!), so I'm kinda surprised you're not actually using it in production. :)
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I've had it running on my Linux server for years (Owncloud previously, Nextcloud now), and that server's already open to the Internet. Given that, I didn't see any reason to open anything on my FreeNAS box to the Internet.

As to why I wrote it in the first place, I was seeing lots of folks having trouble with a number of other guides, almost all resulting from user error. I figured if I could automate most of the work, there would be fewer things for users to get wrong (and therefore saving me time in monitoring those threads). And I think I mostly succeeded. It isn't quite as easy as the plugin, but OTOH I don't think the plugin actually fully installs the system.
 

seanm

Guru
Joined
Jun 11, 2018
Messages
570
Cool, it's very nice of you to create and share your work, cheers!

If it's not too off topic to ask: for someone like me new to both FreeNAS and nextcloud: what are the pros/cons of using your script vs the plugin (that AFAICT is new in 11.2)?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Cool, it's very nice of you to create and share your work, cheers!

If it's not too off topic to ask: for someone like me new to both FreeNAS and nextcloud: what are the pros/cons of using your script vs the plugin (that AFAICT is new in 11.2)?
Plugins used to be frozen as there was no updates, or rarely.
Iocage jails on the other hand are a bit chalenging to use at first, but once you get the hang of it it is more manageable.
The script will be very good for that, but the default config files will need to be tweaked as per Nextcloud recommendations, mainly MySQL and php config.
With that in mind, with iocage jails you can upgrade Nextcloud as often is required as it only involves downloadin gthe tar file available from Nextcloud and proceed throught the update process as per Nextcloud guideline.
I have been using Nextcloud since it came out and it is getting better and better.
You can also use Docker to run Nextcloud, so you have options.

I find Nextcloud to be very solid and being on top of ZFS makes it even better.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
the default config files will need to be tweaked as per Nextcloud recommendations, mainly MySQL and php config.
What tweaks would those be? Seems we might as well get those into the script.
upgrade Nextcloud as often is required as it only involves downloadin gthe tar file available from Nextcloud and proceed throught the update process as per Nextcloud guideline.
...or clicking the "upgrade" button in Nextcloud...
what are the pros/cons of using your script vs the plugin (that AFAICT is new in 11.2)?
There's been a Nextcloud plugin for a long time, but I believe it's been redone for iocage under 11.2. I haven't used it, but there are a couple of threads indicating that it doesn't completely set up the jail. I also don't know if the plugin sets up a SSL certificate.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
What tweaks would those be? Seems we might as well get those into the script.
By default the database is configured to make use of a certain number of resources. Those resources are dependent of the hardware it is being run of.
I think the file is the mysql.conf
The same applies to the php section.
Those resources are part of the Nextcloud tuning sectino of the Admin documentation and is specific to the hardware being used.

...or clicking the "upgrade" button in Nextcloud...
Normally this works, but with Nexctloud upgrade from 13 to 14, I was not able to perform the update on my system
I think some already installed apps would cause the update to fail.
I ended up performing th update using CLI only based on Nextcloud Admin documentation.

There's been a Nextcloud plugin for a long time, but I believe it's been redone for iocage under 11.2. I haven't used it, but there are a couple of threads indicating that it doesn't completely set up the jail. I also don't know if the plugin sets up a SSL certificate.

I think it doesn't setup SSL certificate.
 

Silvan Burch

Explorer
Joined
May 1, 2016
Messages
65
hey danb35

thanks again for this awesome script, im gonna try it on my 11.2-RC2 soon.

three questions remain that I want to ask before I start:

* as mentioned on github (https://github.com/danb35/freenas-iocage-nextcloud/issues), there is a newer version of mariadb. can I update to it just by accessing the iocage and update normally (pkg update)?
* also would it work to update nextcloud the same way if a newer version gets out?
* what is the portsnap / portsnap directory for?

thanks and br, silvan
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
there is a newer version of mariadb. can I update to it just by accessing the iocage and update normally (pkg update)?
No, as it's a different package name (mariadb101-server vs. mariadb102-server, IIRC). I saw some indications that 10.2 expected configuration files in a different place, and I didn't see any particular reason to prioritize making the change. I may get to it some day. If you want to test, you can try changing the script to install 102 instead and see if it breaks.
would it work to update nextcloud the same way if a newer version gets out?
Nextcloud isn't installed from a package, so no. You'd use its built-in updater instead.
what is the portsnap / portsnap directory for?
To install anything that needs to be built from ports. In an earlier version of this script, Apache was built from a port because the package hadn't caught up with a security vulnerability. That's now resolved, but there are a couple of the PHP packages that still build that way.
 

Silvan Burch

Explorer
Joined
May 1, 2016
Messages
65
thank you

I got it to work with your script, it's really awesome!
one last question: how do i access the webinterface? on port 80, i get to freenas login site ... it's weird
is it on another port?
 

Scrat_

Explorer
Joined
May 3, 2018
Messages
95
Dan, outta curiosity, does this install method break the theming abilities inside Nextcloud? Nothing I do seems to work, and I have a ticket open with them.. but they seem dumbfounded. *shrugs*

Sent from my SM-N950W using Tapatalk
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Dan, outta curiosity, does this install method break the theming abilities inside Nextcloud? Nothing I do seems to work, and I have a ticket open with them.. but they seem dumbfounded. *shrugs*

Sent from my SM-N950W using Tapatalk
I just did an install in a VM running Freenas 11.2-RC2 and everything works fine. Theming works as expected, at least changing the color is being updated on the web browser.
Is it possible you are runnign more than one Nextcloud instance and being redirected to the one that doesn't have Theming modified?
 

Scrat_

Explorer
Joined
May 3, 2018
Messages
95
I just have the one install. I'm tempted to make another jail for NextCloud and see if that changes things.. just instead of the scripted install, go through the plugin menu.

Sent from my SM-N950W using Tapatalk
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
how do i access the webinterface?
Browse to the IP address or FQDN of your jail. You may need to use VNET when creating the jail.
Dan, outta curiosity, does this install method break the theming abilities inside Nextcloud?
I can't see why it should, though it's not something I've tested.
 

Scrat_

Explorer
Joined
May 3, 2018
Messages
95
Confirmed.

I setup a second NextCloud server, the dark theme and font changing works.. under Accessibility.

Sent from my SM-N950W using Tapatalk
 

Ashima

Dabbler
Joined
Apr 26, 2018
Messages
13
Hello,

I am new to freenas n nextcloud.

MySetup : Freenas 11.1 U5

I am trying to install nextcloud using the script provided by @danb35. The script runs till the end. But when I try to access 192.168.1.199 it gives following error :

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.


I have tried it almost 10 times. But every time I get the same error. Can any one give any pointer. I have reinstalled the base Freenas but doesn't help.

@danb35 Thank you for the script...

Regards,
Ashima
 
Top