Set custom parameters on nextcloud config.php

NethServer Version: 8
Module: Nextcloud

Hello,

I’m trying to setup ‘trashbin_retention_obligation’ => ‘auto, 60’, so the trashbin automatically remove files older than 60 days, i’ve set this parameter on

/home/nextcloud1/.local/share/containers/storage/volumes/nextcloud-app-data/_data/config/config.php

which is the only config.php file that I found, but it still seems that is ignoring this,

how can I configure custom parameters in nextcloud config.php and nethserver 8?

Thank you

Hi, does the following work?

@mrmarkuz Do these changes to config.php remain after a Nextcloud update from the cluster-admin? I’ve made a number of updates including setting the timezone which doesn’t appear to be retained. Things like reminder times are off after an update. Also needed to manually change some items in Recognize settings in config.php which appear to get lost.

If I need to create a script for each of these customizations, then it would be good to know so each update, I can re-run the changes.

I tested the Nextcloud update from 1.5.2 to 1.6.0 and for example timezone and trashbin retention that I set before the update were still there after the update.

config.php is saved in a volume so it should survive updates.

I didn’t find those settings in config.php, could you please explain?

Hi @mrmarkuz

The timezone seems to revert to GMT/UTC time. As I am in Canada eastern time zone, the reminders show up 5 hrs early. I couldn’t find it in the GUI so I tried to fix it from the command line with:

# bash

runagent -m nextcloud2 occ config:system:set default_timezone --value="America/Toronto"
...lots of info then...
System config value default_timezone set to string America/Toronto

... and then ...
runagent -m nextcloud2 occ config:system:set default_phone_region --value="CA"

But, the reminders for events appears to still be off by 5 hours. So I don’t know exactly what I changed and why the reminders are still off.

I was hoping that these manual settings would be kept in the update and I’m glad to hear that it should be.


Off topic:

I don’t know why my update from 1.5.2 to 1.6.0 failed, but it was catastrophic. Nothing worked. Luckily I did a snapshot before I did the update and so I reverted back to 1.5.2.

Typically on an update I have a problem. Usually I only have to force a clean and repair and sometimes another update. Usually I’m just using: `runagent -m nextcloud2 occ maintenance:repair`

Incidentally, this is necessary each time I update Nextcloud Office or Collabora Office.
I’m willing to try the upgrade again but it will have to wait for the weekend.

Maybe it’s just an issue for existing reminders?
What about newly created events? Do they work correctly with the new timezone?

From my experience apps are often the cause for not working upgrades. Please check and share the logs when you’re going to try the next update and open a new support thread so we can try to solve the issue.

Hi @mrmarkuz

Yes, it has been quite a bit of time since I updated this thread. With the holidays and the new year starting, I didn’t have enough time to do the update and determine why there were errors.

So today while it is a blizzard outside, I finally have some time.

So I did a snapshot of my NS8 install and then realized that I had a new core update. This was completed first without problems!!

Second I ran the Nextcloud 1.5.2 to 1.6.0 update. After completing the update and attempting to get to the web interface, I got a 502 Bad Gateway. I tried another browser and was able to login. So this is a cache problem on Firefox.

So the Nextcloud update worked this time, first time!! I’m so happy that it worked this time.

I’m also updating Collabra from Version 1.0.13 to Version 1.1.0. This also worked first time.
Woo hoo!!!

Thanks all you folks who work on NS8 and the Nextcloud and Collabra apps! Loving it!

1 Like

OK I have some errors … :upside_down_face:

Looks like I have to do some manual intervention.

There are some errors regarding your setup.

  • AppAPI deploy daemon
    AppAPI default deploy daemon is not set. Please register a default deploy daemon in the settings to install External Apps (Ex-Apps).

  • Mimetype migrations available
    One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command occ maintenance:repair --include-expensive to perform the migrations.

  • Database missing indices
    Detected some missing optional indices. Occasionally new indices are added (by Nextcloud or installed applications) to improve database performance. Adding indices can sometimes take awhile and temporarily hurt performance so this is not done automatically during upgrades. Once the indices are added, queries to those tables should be faster. Use the command occ db:add-missing-indices to add them. Missing indices: “properties_name_path_user” in table “properties”, “unique_category_per_user” in table “vcategory”, “calobjects_by_uid_index” in table “calendarobjects”

  • .well-known URLs
    check_for_working_wellknown_setup is set to false in your configuration, so this check was skipped.

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

Trying to get to the log … hmm

So two of the errors were fixed with logging into NS8 and running the recommended two occ commands:

runagent -m nextcloud2 occ maintenance:repair --include-expensive

runagent -m nextcloud2 occ db:add-missing-indices

This cleaned up the two middle errors.

Now I have to figure out what the other two mean.

The “appAPI deploy daemon” one is explained here:

The “.well-known URLs” one is not really an error, it’s just a message that a test is skipped due to configuration.

There would have been a command to fix those errors, see Nextcloud — NS8 documentation but doing it manually as you did, works too.

Thanks @mrmarkuz

I just finished running

runagent -m nextcloud2 occ app:disable app_api

as I don’t want or need any Docker apps inside the Nextcloud.

I’ll read about the “well-known URL” and see what to fix there.

Just ran the Nextcloud security scan. You guys did a great job as I got an “A”.

The only issue is that we are not on the most recent patch level.

Rating: A

Running Nextcloud 32.0.1.2

NOT on latest patch level

Major version still supported

Very nice!

1 Like

To get this error to disappear do I have to manually edit the config.php in the nextcloud container?

I’d ignore it as it’s not an error.

1 Like