Enhance Speed of Owncloud 8.x or Nextcloud

After the mega update into version 8.2 some of us encountered long response times using Owncloud. The reason is, that file locking was changed in the new version. This is a good reason to change your caching configuration.

Explanation just for Debian. Same thing is true for Redhat, well, except the yum

Get rid of other caching daemons than Redis.

Install Redis Server and Tools:

sudo apt-get install redis-*

The installer sets up the system so systemd loads Redis on startup.

Edit the config.php of owncloud. Add the following:

 'memcache.local' => '\OC\Memcache\Redis',
 'redis' => array(
 'host' => 'localhost',
 'port' => 6379,
 'timeout' => 0.0,
 'memcache.locking' => '\\OC\\Memcache\\Redis',

Restart your Application server (Apache/NGINX)

Of course you can fine tune Redis, but it should work for most installations.