I just reconfigured my server to use the socket and it works seamlessly.
- made sure that the redis.conf file contains the following lines:
unixsocket /var/run/redis.sock unixsocketperm 0770
- restarted Redis server and checked the access rights:
# ls -al /var/run/redis.sock srwxrwx--- 1 redis redis 0 Oct 19 16:54 /var/run/redis.sock
- added the web server user to the redis group.
- made sure that the Nextcloud config.php file contains the following lines:
'redis' => array ( 'host' => '/var/run/redis.sock', 'port' => 0, 'timeout' => 0.0 ),
- restarted the web server
- tested the Nextcloud access by executing e.g. an occ command.