# How to configure redis with password in case of stand alone redis server

**URL:** https://meta.discourse.org/t/how-to-configure-redis-with-password-in-case-of-stand-alone-redis-server/51781
**Category:** Self-hosting
**Created:** [2016 年10 月 20 日 12:29 UTC](https://meta.discourse.org/t/how-to-configure-redis-with-password-in-case-of-stand-alone-redis-server/51781 "2016-10-20T12:29:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### 作者： ![irshad\_discource](https://avatars.discourse-cdn.com/v4/letter/i/dec6dc/32.png) [@irshad\_discource](https://meta.discourse.org/u/irshad_discource)
#### 发布日期： [2016 年10 月 20 日 12:29 UTC](https://meta.discourse.org/t/how-to-configure-redis-with-password-in-case-of-stand-alone-redis-server/51781/1 "2016-10-20T12:29:52Z")

</div>

My discourse app need to connect to central redis server which has auth enabled.Right now I am connecting this server by setting `DISCOURSE_REDIS_HOST: $MyRedisIP` in web\_only.yml. Is there a way I can configure a password for redis connection ? Can something be configured like `DISCOURSE_DB_PASSWORD` ?

---

<div class="post-metadata">

### 作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### 发布日期： [2016 年10 月 21 日 00:11 UTC](https://meta.discourse.org/t/how-to-configure-redis-with-password-in-case-of-stand-alone-redis-server/51781/2 "2016-10-21T00:11:33Z")

</div>

Auth is supported use the env var you are after is `DISCOURSE_REDIS_PASSWORD` to specify it.

---

<div class="post-metadata">

### 作者： ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### 发布日期： [2019 年3 月 20 日 13:09 UTC](https://meta.discourse.org/t/how-to-configure-redis-with-password-in-case-of-stand-alone-redis-server/51781/3 "2019-03-20T13:09:55Z")

</div>



---

<div class="post-metadata">

### 作者： ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### 发布日期： [2019 年4 月 19 日 13:10 UTC](https://meta.discourse.org/t/how-to-configure-redis-with-password-in-case-of-stand-alone-redis-server/51781/4 "2019-04-19T13:10:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
