Is there a way to insert a config.php option during install

I’ve written a script to install NC. It sets up memcached but since config.php does not exist I cannot put the option ‘memcache.local’ => ‘\OC\Memcache\APCu’ into the $CONFIG array.

If I create config.php with just that entry, NC will not start.

So I end up running install -> logging into NC for first time -> running another script to insert memcached.local option.

If I get this working, I’ll have a script that full configures server apps and NC so that it passes all Sercurity & Setup tests.


FOLLOW UP - Via install script I edited /usr/share/nginx/nextcloud/lib/private/Setup.php with the memcached option. However, this caused a security notice to display that a core file has been changed. I guess I’ll have to create a post installation script to update config.php YUK

you mean something like this:

you’ll find the setup section here:

there are various examples how to fully config nextcloud with occ.

Great info, I appreciate your help

Just before reading this , I created a post installation script to add memcached to the config. That was the last item to make a complete installation on Ubuntu 18.04 on raspberry PI 3 B+