# 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:** [January 24, 2017, 12:30pm 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:** 7

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [June 9, 2020, 8:08am UTC](https://meta.discourse.org/t/how-to-set-redis-db-id-in-docker-container/56267/7 "2020-06-09T08:08:07Z")

</div>

> [@ryanerwin](#):
>
> is your warning 🔥 from 2018 about the message bus exclusively linked to Redis `db 0` still accurate

Yes this is still 100% correct afaik, PUB/SUB in redis is tied to DB 0. Discourse multisite is designed to work fine with multiple instances talking to 1 redis with db 0.

> **[Develop with Redis](https://redis.io/docs/latest/develop/)**
>
> Learn how to develop with Redis

> Pub/Sub has no relation to the key space. It was made to not interfere with it on any level, including database numbers.
> 
> Publishing on db 10, will be heard by a subscriber on db 1.

---

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