Nextcloud und redis (memcache.local / memcache.locking)

I’ll venture to translate the post…

If your server runs Ubuntu 16.04 LTS you can install the REDIS Server easily using ā€œapt-get installā€. Only very few configuration settings are required to set it up for your nextcloud.

Start the installtion with
sudo -s apt install redis-server php-redis

afterwards edit file
vi /etc/redis/redis.conf

and change
a) the default port to 0:
# port 6379 port 0

and b) two unix socket entries
unixsocket /var/run/redis/redis.sock unixsocketperm 770

save and exit the file (ā€œwq!ā€) and grant your php-user the rights required
usermod -a -G redis www-data

Now, start the redis server:
service redis-server start

and with
ls -la /run/redis

check for the existance of files
redis-server.pid redis.sock

If you fail to find the files rght away restart your raspberry and check again.

At last modify the nextcloud config with
sudo -u www-data vi /var/www/owncloud/config/config.php

by adding the following lines:
... 'memcache.local' => '\OC\Memcache\APCu', 'filelocking.enabled' => 'true', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0, ), ...

and enjoy the new caching for your nextcloud :slight_smile:

4 Likes