Edit config.php of Nextcloud

Hi

I like to add the “trashbin_retention_obligation” in Nextcloud

How can change this permanentlyin Nextcloud ?
Just edit /home/nextcloud1/.local/share/containers/storage/volumes/nextcloud-app-data/_data/config/config.php
And will this survive a restart or update?

You could enter it in /home/nextcloud1/.local/share/containers/storage/volumes/nextcloud-app-data/_data/config/config.php but you’d need to check the owner.

To avoid owner issues, you could edit it by entering the app environment…

runagent -m nextcloud1

and edit config.php using nano:

podman unshare nano $(podman volume inspect nextcloud-app-data --format={{.Mountpoint}})/config/config.php

Another way instead of editing config.php is to use occ:

occ config:system:set trashbin_retention_obligation --value="auto, 60"

The setting will survive reboot, update and backup/restore.

2 Likes