# Redis with TLS in-transit support

**URL:** <https://community.learningequality.org/t/redis-with-tls-in-transit-support/2580>\
**Category:** Kolibri\
**Created:** [October 17, 2022, 5:54pm UTC](https://community.learningequality.org/t/redis-with-tls-in-transit-support/2580 "2022-10-17T17:54:55Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Brian\_LePore](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/brian_lepore/32/1334_2.png) [@Brian\_LePore](https://community.learningequality.org/u/Brian_LePore)\
**Post date:** [October 19, 2022, 3:03pm UTC](https://community.learningequality.org/t/redis-with-tls-in-transit-support/2580/7 "2022-10-19T15:03:04Z")

</div>

So I renamed the file to kolibri.py and moved it to `"/usr/lib/python3/dist-packages/kolibri/kolibri.py` and set my export to “kolibri.kolibri” (I am knew to Python/django stuff so I’m not that familiar with how things should be set) and once I did that I found my file was at least being referenced.

Changed the file to:

```auto
from kolibri.utils.conf import OPTIONS
from kolibri.deployment.default.settings.base import *
...

cache_options = OPTIONS["Cache"]

pickle_protocol = OPTIONS["Python"]["PICKLE_PROTOCOL"]

CACHES = {
    'default': {
        "BACKEND": "redis_cache.RedisCache",
        "LOCATION": cache_options["CACHE_LOCATION"],
        # Default time out of each cache key
        "TIMEOUT": cache_options["CACHE_TIMEOUT"],
        "OPTIONS": {
            "PASSWORD": cache_options["CACHE_PASSWORD"],
            "MAX_ENTRIES": cache_options["CACHE_MAX_ENTRIES"],
            # Pin pickle protocol for Python 2 compatibility
            "PICKLE_VERSION": pickle_protocol,
            "CONNECTION_POOL_CLASS": "redis.BlockingConnectionPool",
            "CONNECTION_POOL_CLASS_KWARGS": {
                "max_connections": cache_options["CACHE_REDIS_MAX_POOL_SIZE"],
                "timeout": cache_options["CACHE_REDIS_POOL_TIMEOUT"]
            },
            "CONNECTION_POOL_KWARGS": {
                #"skip_full_coverage_check": True,
                #"ssl_cert_reqs": None,
                "ssl": True,
                "ssl_ca_certs": "/etc/ssl/certs/ca-certificates.crt"
            },
        },

    }
}

```

In the options.ini file I prefixed the connection with `rediss://` so it looked like:

`CACHE_LOCATION = rediss://endpoint:6379`

But that seemed to not help. Ultimately I needed to manually make changes following this [merge](https://github.com/sebleier/django-redis-cache/pull/170/commits/934187328c1c27e020b3c0d331701889cc6dee84).

Now Kolibri will start, but I am unsure how to verify that this is working. Any suggestion?

---

_[View the full topic](https://community.learningequality.org/t/redis-with-tls-in-transit-support/2580)._
