Redis not working on fresh installation

To solve this on Ubuntu 18.04 LTS Do the following

‘sudo apt-get install redis-server’

Caution:

The installation process will fail, becaouse the redis.conf file comming with the deb package contains bind 127.0.0.1:1 see below…

After installation Installation has faild edit /etc/redis.conf

sudo nano /etc/redis/redis.conf

In line 69 change

bind 127.0.0.1 ::1 to bind 127.0.0.1

Change the port number to 0 and enable socket by chageing

#unixsocket ... unixsocket /var/run/redis/redis-server.sock

save the file

next reinstall redis server by useing

sudo apt-get -y install --reinstall redis-server && sudo service redis-server restart

than edit /pathtonextcloud/config/config.php to add redis cacheing

by useing

sudo nano /phaththonextcloud/config/config.php

‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis-server.sock’,
‘port’ => 0,
‘timeout’ => 0.5,
‘dbindex’ => 0,
),

Finally check permission and gorup settings by useing

sudo chown -Rh redis:redis /var/run/redis 
sudo chmod 775 /var/run/redis *
usermod -a -G redis www-data

Thats it.

This is solveing it for Nextcloud x.x used on ubuntu 18.04 LTS and maybe beyond,because this is not a nextcloud bug. It’s just a lazy deb-package creator not willing to provide an updated deb package in ubuntus repositories. Sad but true.

Be aware that this solution is not taking in account that redis should be plugged in to nextcloud by useing a password. But this is a topic for an other thread.

Thanks to J ED for recognicing this. Sometiimes hands on and document it somewhere solves a problem more efficient than talking about it.

Stll wondering why this isn’t documented in the edmin manual. There are less information about that. Nextcloud VM github package uses the same fix but isn’t intended to be used on a vps or any external reachable server. So what’s the reason they don’t put it in to trouble shooting chapter or even the redis one. They know how to fix this.