External redis cache server with nextcloud docker app

Hey,

it is possible to connect Nextcloud with an external Redis Cache Server?

i tried to change the config.php but i get an internal server error at this moment.

'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => [
     'host'     => 'serveraddress',
     'port'     => 6379,
     'dbindex'  => 0,
     'password' => 'secret',
     'timeout'  => 1.5,
],

i cant ping in the container nextcloud.

best regards