# 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:** 5

<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, 9:22am UTC](https://meta.discourse.org/t/discourse-container-with-unixsocket-for-redis/153945/5 "2020-06-06T09:22:14Z")

</div>

> [@ryanerwin](#):
>
> Curious if anyone is using `unixsocket /var/discourse/shared/...` for Redis in their Standalone container? Seems `redis-rb` also supports domain sockets with:

Hi @ryanerwin,

I hope you will be happy to hear that I have Discourse running with Redis using a unix socket in a standalone container, just like you asked about.

Check out the bottom of this screen shot from sidekiq:

 ![Screen Shot 2020-06-06 at 4.04.59 PM](https://global.discourse-cdn.com/meta/original/3X/8/4/84774cf3bf11f312421e0f3f0027dd1ad2ef4fed.jpeg)

In addition, here are some more screenshots from building the app:

 ![Screen Shot 2020-06-06 at 4.11.56 PM](https://global.discourse-cdn.com/meta/original/3X/7/a/7ae3d253b07b56088209aee9a72fb7461253667c.jpeg)

 ![Screen Shot 2020-06-06 at 4.14.22 PM](https://global.discourse-cdn.com/meta/original/3X/d/c/dc907ba035777dcf848863d0eae6f9dd4ab88451.jpeg)

My next steps are to:

1. Move the unix socket to the shared volume so it can be accessed outside the container.
2. Retesting with minimal ENV vars to get the “bare bones” changes to get this up and running.

Basically, I have created this new template:

> -rw-r–r-- 1 root root 2028 Jun 6 08:13 redis.socketed.template.yml

![Screen Shot 2020-06-06 at 4.18.55 PM](https://global.discourse-cdn.com/meta/optimized/3X/9/b/9b897c325b4c2462209b8166784e5b7cf53a4fb5_2_690x60.jpeg)

and made minor changes to old friend `app.yml`

Since I only started on this today, I plan to test a bit more before publishing the details.

Hope this will be helpful.

* * *

Update

* * *

Works as expected outside the container when the unix socket is on a shared volume:

 ![Screen Shot 2020-06-06 at 5.59.35 PM](https://global.discourse-cdn.com/meta/original/3X/9/a/9aa935e139717d8cd771f520f686b3d82382be50.jpeg)

---

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