# Discourse Container with UnixSocket for Redis?

**URL:** https://meta.discourse.org/t/discourse-container-with-unixsocket-for-redis/153945
**Category:** Self-hosting
**Created:** [June 5, 2020, 1:53pm UTC](https://meta.discourse.org/t/discourse-container-with-unixsocket-for-redis/153945 "2020-06-05T13:53:40Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [June 6, 2020, 12:03pm UTC](https://meta.discourse.org/t/discourse-container-with-unixsocket-for-redis/153945/6 "2020-06-06T12:03:21Z")

</div>

PR for this:

[https://github.com/discourse/discourse\_docker/pull/469](https://github.com/discourse/discourse_docker/pull/469)

Note:

To implement:

- Change the redis template in the container yml file
- Add one additional line to the same container yml file

```plaintext
 ## Set the REDIS_URL and use the redis.socketed.template.yml to use 
 ## a unix domain socket for Redis
 REDIS_URL: unix:///shared/tmp/redis.sock

```

Implementation Notes:

1. If concerned about security of the Redis DB on the host, no need to expose this unix socket in the shared volume.

2. If you wish to set the permissions of the unix socket to 770 (instead of 777) , change the group of the unix socket to www-data.

---

_[View the full topic](https://meta.discourse.org/t/discourse-container-with-unixsocket-for-redis/153945)._
