Resource icon

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

tebra

Dabbler
Joined
Feb 29, 2020
Messages
21
one more question: how to install a new php module in my NC iocage?
After upgrading to NC19 I'm getting "bcmath" module is missing in configuration overview of NC.
 

tebra

Dabbler
Joined
Feb 29, 2020
Messages
21
It is not include because I’m still using my old jail from NC18 install script ;-)
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
If I need external access, I'm used to expose services running inside LAN on router's WAN interface but using random port numbers. Such port forwarding works fine but Nextcloud keep rewriting random port to standard 443 and communication is lost. I mean when I have set forwarding i.e. port 4443 to 443: page https://nextcloud.domain.com:4443 gets rewritten after typing in logon credentials to https://nextcloud.domain.com/login and of course lost comms error is displayed. When I manually amend again port to 4443 and reload the page Nextcloud is opened and user logged in. Is Caddy or Nextcloud (overwrite entries in config) responsible fot that?
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
After upgrading to NC19 I'm getting "bcmath" module is missing in configuration overview of NC.
Haven't you noticed serious slow down when upgrading ver. 18 to 19 with built in upgrade tool?? Mine instance became almost unusable...
 

RSVP

Explorer
Joined
Feb 11, 2016
Messages
73
You might want to try Caddyv2 with it--it seems to be working for me. Granted, I'm using OPNsense rather than pfSense, but since they're both running HAProxy, that shouldn't make a difference.
I have retried the script now with Caddyv2 and I didnt have any of the issues I had in the previously. Thanks
 

InGenetic

Contributor
Joined
Dec 18, 2013
Messages
183
Hi again mr.Danb35,

i want to ask about memory leak in freenas , i'm using nextcloud in jail as in this tutorial,
my freenas using 16GB of RAM , and only for nextcloud on freenas.

hm.. about 1-2 months ago, i see my freenas run out the memory , the memory ram can only left 0.2gb , if its happen , its too slow respon to login to nextcloud, so i have to restart the freenas, and it'll normal again.

sometimes it will be run out memory in 1 week, but sometimes , just 2-3 days the memory become run out .

for ex:

freenas memory.JPG


and sometimes if freenas running out memory , my nextcloud can not be accessible. if it so , i have to restart the freenas and the nextcloud being normally again .

like below after restart freenas machine :

freenas memory2.JPG


Please advice.

Regards,
 
Last edited:

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
After installing mail app in nextcloud I've noticed following warning in log:
"KItinerary binary adapter is not available, can't extract information" - it is to extract tickets, events info...
If I'm right there's a port for this binary: https://www.freshports.org/net/kitinerary
But it requires a lot of dependancies (227!) which takes almost 1GB. Space isn't an issue, but I wouldn't like to litter jail. Has anybody tried it out?
 

Tido

Cadet
Joined
Sep 23, 2020
Messages
1
Hi,

Dan guided me over here to troubleshoot my issue on getting NC up and running with the self-signed certificate. Here I gathered a log and tested the system with a CURL command: https://github.com/danb35/freenas-iocage-nextcloud/issues/124#issuecomment-695359647

According to the log file, the cert/pem files are somewhere else, if I am not wrong - what I may be. Any tip what I should try to solve this in a proper manner?

Thanks in advance for any advice what I could test or change :smile:
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
Has anybody tried out Nextcloud 20? Did you use built in upgrade tool?
Some notes about release: https://nextcloud.com/blog/nextclou...fications-integrates-with-other-technologies/
I am using NC 20.
I have been upgrading through the normal web GUI provided within Nextcloud.
Due to the release, it took an extremely long time to actually do the upgrade.
Download speed was around 20 kB/s and as a result would look like the update failed.
Now, it seems tis is no longer the problem.
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
Thanks @Apollo
So maybe I'll give it a try. I'm a bit of afraid of demolishing my freshly installed v. 19. Did you need to upgrade any php packages?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
Thanks @Apollo
So maybe I'll give it a try. I'm a bit of afraid of demolishing my freshly installed v. 19. Did you need to upgrade any php packages?
When you do the upgrade within Nextcloud web interface, part of the process is to create a backup of the entire Nextcloud application files into your mounted file dataset.
So in theory, you can just rename the new Nextcloud tree and copy the old one in place to be able to recover where you left off.
The only issue would be the database usually goes through the upgrade as well so it could be problematic.

When in the Nextcloud Web interface, you will be taold what apps are incompatible and it will tell you if your version of php is incompatible.
Sometimes, after the update, you will be notified, in the web interface of missing packages. Usually it is a matter to enable the package or download them. This is done via CLI.
While going through the update, you will be notified to upgrade the database, often it fails at that stage via the web page.
All you need is run the recommended "occ" command to perform the upgrade and take the database out of maintenance.

When you do this for the first time it is a bit nerve wreaking. I have proceeded that way since the time of Owncloud and transitionned to Nextcloud using the same database. I also migrated from the old warden jail system to iocage.
When doing major migrations, I usually create a new iocage jail, install Nextcloud using Danb35 and assign a new IP address and domain name which I route via my firewall.
I don't seem to remember if I tried this, but you could creat a clone of your data dataset but usually I replicate my entire dataset onto a new system or pool, and have the new test iocage use the data that already exist. Don't do that with your live Nextcloud iocage jail and your dedicated domain as it could mess users data.
If the test iocage works and you can access a copy of your data, you can either use the new iocage to point to the original data and retire the old iocage jail, or simply go with the upgrade on the old one,

Make sure you create snapshots of your data before the procedure, and do that when the iocage jail is stopped. This way you can recover in the event of an issue.

PS: if you your original Nextcloud install was based on Danb35 script, then you should have the /install folder or dataset you used during creation.
If that the case, you can create a new iocage install dataset and copy the content of the install, edit the config file to accommodate the chnage in IP and domain name and proceed with the creation of the new iocage jails. You need to create the /file and /db dataset for the new iocage jail to use and experiment with.
 
Last edited:

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
When you do the upgrade within Nextcloud web interface, part of the process is to create a backup of the entire Nextcloud application files into your mounted file dataset.
Is it safe to do it when Nextcloud is up and running? And I guess all permissions and ownership must be preserved...
Make sure you create snapshots of your data before the procedure, and do that when the iocage jail is stopped. This way you can recover in the event of an issue.
I have set creating recursive snapshots of /poolname/nextcloud which contains all 4 subdatasets. If I do rollback of /poolname/nextcloud only, would it rollback subdatasets as well (including users files)?
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
Is it safe to do it when Nextcloud is up and running? And I guess all permissions and ownership must be preserved...

I have set creating recursive snapshots of /poolname/nextcloud which contains all 4 subdatasets. If I do rollback of /poolname/nextcloud only, would it rollback subdatasets as well (including users files)?
It is safe to some extent, but Nextcloud must be running, otherwise you won't have access to the web interface. You don't have to worry about the permission as it is taken care of.

See one of my Nextcloud instances runnig in iocage:

NC-web.png

Normally, you would have "Upgrade" button showing on the page.

Normally, you won't have to revert from a snapshot, at least you want to make sure both data and db are reverted at the same time.
 

listhor

Contributor
Joined
Mar 2, 2020
Messages
133
Thanks, hopefully I won't need to recover anything!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,457
If all your nextcloud data is stored on its own dataset, as I recommend in the README, there's a likely simpler answer:
  • Stop the jail (mainly to have the database in a consistent state)
  • Snapshot the Nextcloud dataset
  • Start the jail and attempt the update through the web GUI.
  • If it fails, stop the jail and roll back the Nextcloud dataset to your snapshot
 
Top