NextCloud on Freenas

ghostwolf59

Contributor
Joined
Mar 2, 2013
Messages
165
Ok,
Here's a problem I lived with since NC 11 and persist over updates to now lates version 15.
Getting a bi sick of these errors and have tried anything in my power to resolve this, but to no avail :(

A few key points...
* I've installed NC using Lighttpd in its own standard Freenas jail - i.e not using the plugins - Rational when I installed this using Lighttpd was that its not going to be heavily used so anything running with limited or as little system resources was of interest.
* I've found three versions of ".htaccess" on the system tied to the NC installation *jail* - Any changes to what I think is the one the server is using *i,e "/usr/local/www/nextcloud/.htaceess" dont change anything! *
The root location specified in the lighttpd.conf points to "var.server_root = "/usr/local/www/nextcloud"
* I have tried to install newer versions of php but non seem to take affect - method used to install versions is basic pkg install xxxx *which php keep pointing to the old current version

The errors thrown have grown with each release and personally I think the documentation pointing to each issue suxxx big time

Is there anyone that can provide some step by step instructions on how to resolve each issue????

Like, do I need to login to the jail itself to perform some of the updates or can I simply login as root to issue db updates to add the BigInt field to the NC db????

This is the system warning screen thrown at me as we speak - tired seeing this, but obviously would like to resolve each issue, but not sure how to go about sorting each reported issue due to crappy NC documentation

***Should be noted that NC still runs and other than the warnings I havent noticed any issues

Currently running FreeNAS-11.1-U7

This is what NextCloud throws back under "System Overview"

Security & setup warnings

It's important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.

There are some warnings regarding your setup.


  • Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.
  • Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.
  • No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.
  • You are currently running PHP 7.0.22. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.
  • The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.
  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running "occ db:add-missing-indices" those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
    • Missing index "share_with_index" in table "oc_share".
    • Missing index "parent_index" in table "oc_share".
    • Missing index "owner_index" in table "oc_share".
    • Missing index "initiator_index" in table "oc_share".
    • Missing index "fs_mtime" in table "oc_filecache".
  • This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them.
    • imagick
  • Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running 'occ db:convert-filecache-bigint' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this.
    • activity.activity_id
    • activity.object_id
    • activity_mq.mail_id
    • filecache.fileid
    • filecache.storage
    • filecache.parent
    • filecache.mimetype
    • filecache.mimepart
    • filecache.mtime
    • filecache.storage_mtime
    • mimetypes.id
    • storages.numeric_id


Please double check the installation guides ↗, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan ↗.
nextcloud problem.jpg
 
Last edited:

dknm

Dabbler
Joined
Aug 27, 2018
Messages
25
To be fair, the developers did a very good job at pointing you in the right direction as far as debugging goes.

You mentioned installing this from scratch rather than through the plugins, so I'll assume you're comfortable getting into the jail. Before making changes, create a snapshot - just in case.

Note that you need to explicitly run commands as the www user

my setup is in cd /usr/local/www/nextcloud , you referenced the same file path early in your post, so the commands below will work:
enter maintenance mode with sudo -u www php occ maintenance:mode --on
run sudo -u www php occ db:convert-filecache-bigint - this will fix the last warning / give it a minute or two to complete
run sudo -u www php occ db:add-missing-indices - to address the other database setup issue.
exit maintenance mode with sudo -u www php occ maintenance:mode --off

for the memory cache and php opcache - my guess would be that there is a string you need to uncomment in the php.ini file.

I hope this gets you onto a good start. Google is your friend.

imagick - personally, I have not added this to my setup.

PS. I would not upgrade the php pkg at this stage (v7.3 being the latest) - depending on how your nextcloud was compiled (in your case with php 7.0.x), it might break functionality.
 
Last edited:

ikke

Contributor
Joined
Apr 22, 2012
Messages
124
If you find it hard, I recommend you just setup nfs for nextcloud, and use their container from some linux box. Works really well out of the box.

Then the updates are just matter of running e.g. ansible to restart it with latest. I have the ansible if you need it.
 
Top