# How to set redis DB ID in Docker container?

**URL:** https://meta.discourse.org/t/how-to-set-redis-db-id-in-docker-container/56267
**Category:** Self-hosting
**Created:** [1월 24, 2017, 12:30오후 UTC](https://meta.discourse.org/t/how-to-set-redis-db-id-in-docker-container/56267 "2017-01-24T12:30:23Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![rluba](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rluba/32/122710_2.png) [@rluba](https://meta.discourse.org/u/rluba)
#### Post date: [10월 17, 2018, 2:46오후 UTC](https://meta.discourse.org/t/how-to-set-redis-db-id-in-docker-container/56267/3 "2018-10-17T14:46:32Z")

</div>

I’ve found the corresponding setting via [this answer](https://meta.discourse.org/t/external-database-env-vars-not-documented-external-pg-port-external-redis-env-vars/90879/2). It’s hidden in `discourse_defaults.conf`:

> <https://github.com/discourse/discourse/blob/ee18d9ace09b0b2919867c905cda72f85f61efb4/config/discourse_defaults.conf#L115>

It’s called `redis_db`, so the corresponding setting in the container yaml should be `DISCOURSE_REDIS_DB`.

---

_[View the full topic](https://meta.discourse.org/t/how-to-set-redis-db-id-in-docker-container/56267)._
