[GH-ISSUE #776] Address already in use when starting Bitwarden_rs #537

Closed
opened 2026-03-03 01:30:18 +03:00 by kerem · 6 comments
Owner

Originally created by @Jungack on GitHub (Dec 21, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/776

Hello,
I am trying to run bitwarden_rs without docker on my server. However, I come to this error :
[bitwarden_rs][ERROR] Launch error Bind(Io(Os { code: 98, kind: AddrInUse, message: "Address already in use" }))
I am quite a noob sorry... In fact I think I don't know how to manage the .env file. After having compiled bitwarden_rs and installed the web-vault, I have copied the .env.template file to /bitwarden_rs/target/release/ and renamed It to bitwarden_rs.env. Then, I have modified WEBSOCKET_PORT=3012 to WEBSOCKET_PORT=3013 and ROCKET_PORT=8000 to ROCKET_PORT=8001. However, the same error is still there. What is wrong?
Thank you

Originally created by @Jungack on GitHub (Dec 21, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/776 Hello, I am trying to run bitwarden_rs without docker on my server. However, I come to this error : `[bitwarden_rs][ERROR] Launch error Bind(Io(Os { code: 98, kind: AddrInUse, message: "Address already in use" })) ` I am quite a noob sorry... In fact I think I don't know how to manage the `.env` file. After having compiled bitwarden_rs and installed the web-vault, I have copied the `.env.template` file to `/bitwarden_rs/target/release/` and renamed It to `bitwarden_rs.env`. Then, I have modified `WEBSOCKET_PORT=3012` to `WEBSOCKET_PORT=3013` and `ROCKET_PORT=8000` to `ROCKET_PORT=8001`. However, the same error is still there. What is wrong? Thank you
kerem closed this issue 2026-03-03 01:30:18 +03:00
Author
Owner

@mprasil commented on GitHub (Dec 22, 2019):

Hi @Jungack, bitwarden_rs is expecting file named .env so your file is very likely ignored and then bitwarden_rs defaults to port 80 which seems to be used.

<!-- gh-comment-id:568295735 --> @mprasil commented on GitHub (Dec 22, 2019): Hi @Jungack, `bitwarden_rs` is expecting file named `.env` so your file is very likely ignored and then `bitwarden_rs` defaults to port `80` which seems to be used.
Author
Owner

@Jungack commented on GitHub (Dec 22, 2019):

Hi @Jungack, bitwarden_rs is expecting file named .env so your file is very likely ignored and then bitwarden_rs defaults to port 80 which seems to be used.

Hello,

Thank you ! So you mean that I have to rename my bitwarden_rs.env file to just .env and put It in /bitwarden_rs/target/release/?

I have a LEMP stack on my server actually with Nextcloud (and Onlyoffice which is running port 8000). How can I change the default port used by Bitwarden_rs to remove all the conflicts?

Thank you !

<!-- gh-comment-id:568312568 --> @Jungack commented on GitHub (Dec 22, 2019): > Hi @Jungack, `bitwarden_rs` is expecting file named `.env` so your file is very likely ignored and then `bitwarden_rs` defaults to port `80` which seems to be used. Hello, Thank you ! So you mean that I have to rename my `bitwarden_rs.env` file to just `.env` and put It in `/bitwarden_rs/target/release/`? I have a LEMP stack on my server actually with Nextcloud (and Onlyoffice which is running port `8000`). How can I change the default port used by Bitwarden_rs to remove all the conflicts? Thank you !
Author
Owner

@fbartels commented on GitHub (Dec 23, 2019):

How are you planning on starting the bitwardenrs process? If you are using systemd, the you could also load the env file into the environment with it: https://serverfault.com/a/413408

<!-- gh-comment-id:568371372 --> @fbartels commented on GitHub (Dec 23, 2019): How are you planning on starting the bitwardenrs process? If you are using systemd, the you could also load the env file into the environment with it: https://serverfault.com/a/413408
Author
Owner

@Jungack commented on GitHub (Dec 23, 2019):

How are you planning on starting the bitwardenrs process? If you are using systemd, the you could also load the env file into the environment with it: https://serverfault.com/a/413408

Thanks for replying ! I first wanted to start bitwarden_rs using cargo run --features sqlite --release. However you are right, after being able to use the previous command, I planned to use systemd to start bitwarden_rs on boot !
So how can I load the .env file first without systemd ?

<!-- gh-comment-id:568603705 --> @Jungack commented on GitHub (Dec 23, 2019): > How are you planning on starting the bitwardenrs process? If you are using systemd, the you could also load the env file into the environment with it: https://serverfault.com/a/413408 Thanks for replying ! I first wanted to start bitwarden_rs using `cargo run --features sqlite --release`. However you are right, after being able to use the previous command, I planned to use systemd to start bitwarden_rs on boot ! So how can I load the` .env` file first without systemd ?
Author
Owner

@fbartels commented on GitHub (Dec 24, 2019):

Like you would source any other file in your shell ;-)

source .env

<!-- gh-comment-id:568677651 --> @fbartels commented on GitHub (Dec 24, 2019): Like you would source any other file in your shell ;-) `source .env`
Author
Owner

@Jungack commented on GitHub (Dec 25, 2019):

Like you would source any other file in your shell ;-)

source .env

Ok tanks all is working ! Thank you for your patience !

<!-- gh-comment-id:568934842 --> @Jungack commented on GitHub (Dec 25, 2019): > Like you would source any other file in your shell ;-) > > `source .env` Ok tanks all is working ! Thank you for your patience !
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#537
No description provided.