Installing Redis for more than one Nextcloud instance

Hello,

I recently discovered Redis and started installing it on some of my Nexxtcloud servers to replace APCU which was giving me some headaches (for example it was causing problem with my CRON’s because there is no PHP command line APCU, well maybe there is but I couldn’t make it work).

I also tried it on a server with Wordpress and after some research was able to make it work nicely. The Wordpress config (with a Redis extension) has a specific line to define a constant “WP_CACHE_KEY_SALT” to have a unique key for each Wordpress using that same Redis server. Usually people use the domain name of the Wordpress as a salt.

I was wondering if there is something similar with Nextcloud and/or Redis to specify a specific “salt” for each Nextcloud using a single Redis server.
For example I have 3 nextcloud instances on one server and just only one Redis server on that same machine, what makes Redis know which nextcloud is talking ?

Maybe it’s a stupid question, if not any idea/input would be welcomed !
Pierre.

The Redis configuration is described in the administrator guide. Please have a closer look on the **`‘dbindex’ ** parameter which should be used to separate multiple Redis instances:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id2

Hello,

Yes I saw this one and also https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#memory-caching-backend-configuration but there is not much explanation about the exact usage and signification of “dbindex”, your answer tells me I have to look in that direction, thanks !

And Set dbindex to separate data in a single Redis instance by environment variable by f466162 · Pull Request #1286 · nextcloud/docker · GitHub seems to tell that there are some additionnal modifications to be made, see post Set dbindex to separate data in a single Redis instance by environment variable by f466162 · Pull Request #1286 · nextcloud/docker · GitHub … that post is only a few months old but original poster is mentionning NC19, I’m at v24/25 so I’m not sure if this does apply …

Thanks for taking the time !

Pierre