# Unix sockets instead of ports

**URL:** <https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232>\
**Category:** Feature Requests\
**Created:** [August 4, 2020, 10:49am UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232 "2020-08-04T10:49:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitwarden\_rs\_User](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bitwarden\_rs\_User](https://vaultwarden.discourse.group/u/bitwarden_rs_User)\
**Post date:** [August 4, 2020, 10:49am UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/1 "2020-08-04T10:49:16Z")

</div>

Hello,

it would be great if one could bind to a unix socket instead of address:port.  
So for example to: /opt/bitwarden\_rs/socket instead of 127.0.0.1:8080

Thank you

---

<div class="post-metadata">

**Author:** ![dani](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/dani/32/2_2.png) [@dani](https://vaultwarden.discourse.group/u/dani)\
**Post date:** [August 4, 2020, 1:25pm UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/2 "2020-08-04T13:25:24Z")

</div>

There is an open issue on the HTTP server we use, and also an old pull request:

> <https://github.com/SergioBenitez/Rocket/issues/545>
>
> I would like to utilize my existing infrastructure on atthost.pl. They are running nginx proxy and allowing me to bind it...

  

> <https://github.com/SergioBenitez/Rocket/pull/594>

Until those are solved there’s not much we can do.

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [August 7, 2020, 6:39pm UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/3 "2020-08-07T18:39:25Z")

</div>

If you really want sockets you could try if socat works for you.

> **[Forwarding TCP-traffic to a UNIX socket (Example)](https://coderwall.com/p/c3wyzq/forwarding-tcp-traffic-to-a-unix-socket)**
>
> A protip by maxcnunes about unix, tcp, socket, forward, and docker.

---

<div class="post-metadata">

**Author:** ![bitwarden\_rs\_User](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bitwarden\_rs\_User](https://vaultwarden.discourse.group/u/bitwarden_rs_User)\
**Post date:** [August 13, 2020, 6:41pm UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/5 "2020-08-13T18:41:23Z")

</div>

Thank you. It’s more of a “I want to avoid ports” than a “I want to have sockets”, so there wouldn’t be anything achieved if I go with socat (but this you couldn’t know, so thank you very much anyway!)

---

<div class="post-metadata">

**Author:** ![bitwarden\_rs\_User](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@bitwarden\_rs\_User](https://vaultwarden.discourse.group/u/bitwarden_rs_User)\
**Post date:** [September 11, 2020, 3:20am UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/6 "2020-09-11T03:20:10Z")

</div>

No hard feelings towards the bitwarden\_rs project, but I’m going just for somethings else. I could be wrong, but I don’t think rocket will have the issue solved anytime soon (which is no complain, since I’m just using things without contributing anything).

I’m only mentioning it, because it seems that I probably was alone with that request (within bitwarden\_rs). So if no one else needs this feature, you can just close the request. Thanks anyway!

---

<div class="post-metadata">

**Author:** ![mfriedenhagen](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/mfriedenhagen/32/16_2.png) [@mfriedenhagen](https://vaultwarden.discourse.group/u/mfriedenhagen)\
**Post date:** [October 31, 2020, 11:18am UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/7 "2020-10-31T11:18:57Z")

</div>

One question @bitwarden_rs_User : what is the reason for your wish? Maybe there is an alternative?

---

<div class="post-metadata">

**Author:** ![boris](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/boris/32/237_2.png) [@boris](https://vaultwarden.discourse.group/u/boris)\
**Post date:** [March 4, 2021, 9:32pm UTC](https://vaultwarden.discourse.group/t/unix-sockets-instead-of-ports/232/8 "2021-03-04T21:32:29Z")

</div>

I am packaging bitwarden\_rs for Syncloud project (open source self-hosting platform) where we have multiple apps for one user on a single device which may lead to port conflicts.  
We use snap so there is no tcp isolation like in Docker for example.

Rocket issue is still open ☹

@bitwarden_rs_User there are two of us now! 🙂
