If redis on seperate machine than nextcloud, which ones gets php-redis?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 18.0.7
Operating system and version: Debian GNU/Linux 10 (buster) (in an LXC Container running on Ubuntu 20.04)
Apache or nginx version: Apache/2.4.38 (Debian)
PHP version: PHP 7.3.19-1~deb10u1 (cli)

The issue you are facing:

  • I am trying to add caching.
  • Because of issues caused by having my instance in an LXC Contianer, I have apparmor issues that caused me to run OnlyOffice on a KVM VM. (not important to this question except to know I have a seperate VM for OnlyOffice)
  • These same issues prevent me from running redis-server on my LXC container.
  • Solution: install redis-server on the same VM that is running onlyoffice!
  • Success!
  • Review docs to see how to connect Nextcloud to redis.
  • See that I also need php-redis… (https://docs.nextcloud.com/server/18/admin_manual/configuration_server/caching_configuration.html#id2)

QUESTION: Which machine needs php-redis? My VM running redis-server doesn’t even have PHP installed. I figure php-redis is either

  1. Needed by Nextcloud to communicate with redis (therefore install on Nextcloud container)
  2. Needed by redis to do its magic (therefore install both php and php-redis on the redis VM)

(Removed other parts of template as this is not an error)

I really don’t want to install php on a server if it doesn’t need it. Which server needs php-redis?

Thanks, Rhys


I installed php-redis on my Nextcloud instance on the LXC Container, because it was the less involved option, so why not try it.
I add the following to my config.php:

  'memcache.distributed' => '\OC\Memcache\Redis',
  'redis' => [
      'host' => '',
      'port' => 6380,
  'memcache.locking' => '\OC\Memcache\Redis',

Then I fully rebooted my LXC container, but still get the notification that i should enable caching on my Nextcloud overview page. Nextcloud Logs don’t indicate anything about caching failing or otherwise. Redis logs on the VM don’t indicate any connection attempts, not that I would know what I’m looking for, this is the first time I’ve used redis.
I did validate that the container (Nextcloud instance) could connect to redis on the VM by installing redis-tools and successfully connecting to it with redis-cli -h -p 6380.

Not sure where to look next. Thanks for any help,