# Redis configuration

**URL:** <https://forum.shopware.com/t/redis-configuration/48928>\
**Category:** Installation/Einstieg\
**Created:** [19. Oktober 2017 um 08:29 UTC](https://forum.shopware.com/t/redis-configuration/48928 "2017-10-19T08:29:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wietse](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@Wietse](https://forum.shopware.com/u/Wietse)\
**Post date:** [19. Oktober 2017 um 08:29 UTC](https://forum.shopware.com/t/redis-configuration/48928/1 "2017-10-19T08:29:19Z")

</div>

Dear all,&nbsp;

&nbsp;

We are trying to enable redis caching using the following manual:

[https://developers.shopware.com/developers-guide/shopware-config/#redis-configuration](https://developers.shopware.com/developers-guide/shopware-config/#redis-configuration)

This is a shared hosting server and therefore there are multiple redis instances that use authentication:

The manual is not clear about how we should add the redis auth password. Is this possible at the moment?

&nbsp;

Best regards

Wietse D.

&nbsp;

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [22. Oktober 2017 um 20:21 UTC](https://forum.shopware.com/t/redis-configuration/48928/2 "2017-10-22T20:21:20Z")

</div>

Hey,&nbsp;

at the moment it seems to me that is not possible. I created a pull request to implement this. Please have a look into it:&nbsp;[support redis auth in createRedisCacheProvider by teiling88 · Pull Request #1329 · shopware/shopware · GitHub](https://github.com/shopware/shopware/pull/1329)

Greetings

---

<div class="post-metadata">

**Author:** ![Wietse](https://avatars.discourse-cdn.com/v4/letter/w/59ef9b/32.png) [@Wietse](https://forum.shopware.com/u/Wietse)\
**Post date:** [9. November 2017 um 16:11 UTC](https://forum.shopware.com/t/redis-configuration/48928/3 "2017-11-09T16:11:50Z")

</div>

Hello Thomas,&nbsp;

Thank you for looking into this.&nbsp;

As this version is not released yet i tried adding your lines from the git&nbsp;to the latest version and edited the config.php

```
'model' => [
    'redisHost' => '127.0.0.1',
    'redisPort' => 6379,
    'redisDbIndex' => 0,
    'cacheProvider' => 'redis',
    'redisAuth' => 'ditiseentopsecretpassword'
],
'cache' => [
    'backend' => 'redis', // e.G auto, apcu, xcache
    'backendOptions' => [
        'servers' => array(
            array(
                'host' => '127.0.0.1',
                'port' => 6379,
                'dbindex' => 0,
                'redisAuth' => 'ditiseentopsecretpassword'
            ),
        ),
    ],
]

```

This give me a zend error in redis.php (NOAUTH required) .&nbsp;I did a quick hack to enable redis auth here:&nbsp;

$this-\>\_redis-\>auth($server[‘redisAuth’]);&nbsp; &nbsp;just before&nbsp;

```
    111 if ($result)
    112 $this->_redis->select($server['dbindex']);
    113 else
    114 $this->_redis = null;
    115 }

```

This makes it working. I just wanted to let you know the zend libraries need an update to. But maybe you already knew this.&nbsp;

Best regards.

Wietse

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Thomas](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/thomas/32/8167_2.png) [@Thomas](https://forum.shopware.com/u/Thomas)\
**Post date:** [10. November 2017 um 09:27 UTC](https://forum.shopware.com/t/redis-configuration/48928/4 "2017-11-10T09:27:25Z")

</div>

> [@Wietse schrieb:](https://forum.shopware.com/profile/27516/Wietse "Wietse")
> 
> This makes it working. I just wanted to let you know the zend libraries need an update to. But maybe you already knew this.&nbsp;

Thank you for your testing. I checked it only with the Model Cache implementation. I allready created an internal Pull Request for this. Should be available in the next hours on github too.&nbsp;
