Issue getting REDIS running in Nextcloud Snap v13 - port 0


I have Nextcloud snap running on Ubuntu 16.04 LTS. I added the OCR app, and it installed and starts along with everything else, but the port for REDIS is defaulting to ‘0’ . I am sure of this because I found the config file showing this at “/snap/nextcloud/####/config/redis/redis.conf”.

I have the port set at 6379 in the OCR web config, and this also is reflected in the /var/snap config file, so I’m not sure where it’s getting port 0. This is causing the web app to display, “unable to connect to redis”, which I would expect since it’s configured to port 0 --> port 0 forces it to no TCP connections.

Assistance is appreciated, I’d love to check this out.

Thank you!

Port 0 is used to let Nextcloud connect to redis via unix socket. Within redis.conf you should find/define the socket location. Within config.php then set port 0 and the socket location as host: (second example)

config.php port is set to 0, socket location is set to ‘/tmp/sockets/redis.sock’. Since this is a snap install, that file creates under ‘/tmp/snap.0_nextcloud_WOeKll/tmp/sockets/redis.sock’

The file is there, and the config.php reads:

‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/tmp/sockets/redis.sock’,
‘port’ => 0,

I’m sure this is because of snap, but I don’t know how to get redis to connect this way.