How to make opcache settings permanent across updates via docker

Hey, I needed higher opcache.memory_consumption values for my nextcloud docker (apache) installation and changed values in
this seems to work, but this file doesn’t keep it’s settings during an update (pull, up -d).
Of course I could overwrite this setting after each update, but you know how it is… Sometimes you forget things.
Can I put this somewhere in config.php or docker-compose.yaml to keep it persistent?

Thank you for helping,

I have a fix for opache from 128 to 256 in my custom image.

I built a custom Docker image from the official Nextcloud image, which works with the Raspberry Pi 4 and 5. The Docker compose includes a container for Nextcloud, MySQL database, and a Redis Cache Server. I have also added the fixes for adding more PHP memory and adding additional PHP extensions. Video Thumbnails and corn jobs are also supported.

The how-to shows how to install and set up Nextcloud, nginx reverse proxy, & collaborate online.

Feel Free to take a look and test it out for yourself. If it all works well for you, please let me know, as I am trying to make sure my custom image is quick and easy for anyone else to use.

Please answer the poll to see if this worked for you, if it didn’t work, or if more support is needed.


Thank you javadali for your detailed reply, the thing is, I just have this adaption to make, i’m running redis, mysql, proxy and cron running as well. I don’t want to change my whole installation just to change 3 digits,

thank you

Thank you! You gave me the right hint, so I could my setup work as well. Much appreciated!

1 Like