[GH-ISSUE #142] Can't enable HTTPS (error while setting tls.certs) #70

Closed
opened 2026-03-03 01:24:30 +03:00 by kerem · 2 comments
Owner

Originally created by @EnriqCG on GitHub (Aug 17, 2018).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/142

Good day. I'm having some issues setting up HTTPS while testing bitwarden_rs on a VM.

I'm running

docker run -d --name bitwarden -e ROCKET_TLS='{certs="/home/ubuntu/certs/certs.pem",key="/home/ubuntu/certs/key.pem"}' -v /home/ubuntu/bitwarden-rs/ssl/:/ssl/ -v /home/ubuntu/bitwarden-rs/bw-data/:/data/ -p 443:80 mprasil/bitwarden:latest

where the certificate + privkey are placed in /home/ubuntu/certs.

The container does not start correctly and when retrieving logs this is the error

Error: I/O error while setting tls.certs:
    => No such file or directory (os error 2)

I've tried several things, including permissions, relative and absolute paths, etc. I don't know what is causing this.

Thanks for your time.

Originally created by @EnriqCG on GitHub (Aug 17, 2018). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/142 Good day. I'm having some issues setting up HTTPS while testing bitwarden_rs on a VM. I'm running ``` docker run -d --name bitwarden -e ROCKET_TLS='{certs="/home/ubuntu/certs/certs.pem",key="/home/ubuntu/certs/key.pem"}' -v /home/ubuntu/bitwarden-rs/ssl/:/ssl/ -v /home/ubuntu/bitwarden-rs/bw-data/:/data/ -p 443:80 mprasil/bitwarden:latest ``` where the certificate + privkey are placed in `/home/ubuntu/certs`. The container does not start correctly and when retrieving logs this is the error ``` Error: I/O error while setting tls.certs: => No such file or directory (os error 2) ``` I've tried several things, including permissions, relative and absolute paths, etc. I don't know what is causing this. Thanks for your time.
kerem 2026-03-03 01:24:30 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@mprasil commented on GitHub (Aug 17, 2018):

Hi, when you run docker with this parameter:

-v /home/ubuntu/bitwarden-rs/ssl/:/ssl/

You're mapping /home/ubuntu/bitwarden-rs/ssl/ on your server to /ssl/ in the container. The ROCKET_TLS needs to point to the files inside your container, not where they are on the server. (bitwarden_rs obviously can't see files outside the container)

So most likely you just need to set the variable to something like this:

 -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}'

And make sure the volume mapping is correct. From what you provided, it should be:

-v /home/ubuntu/certs/:/ssl/

(I'm assuming your certs are stored in /home/ubuntu/certs/ directory on your server.)

<!-- gh-comment-id:413862968 --> @mprasil commented on GitHub (Aug 17, 2018): Hi, when you run docker with this parameter: ``` -v /home/ubuntu/bitwarden-rs/ssl/:/ssl/ ``` You're mapping `/home/ubuntu/bitwarden-rs/ssl/` on your server to `/ssl/` in the container. The `ROCKET_TLS` needs to point to the files inside your container, not where they are on the server. (`bitwarden_rs` obviously can't see files outside the container) So most likely you just need to set the variable to something like this: ``` -e ROCKET_TLS='{certs="/ssl/certs.pem",key="/ssl/key.pem"}' ``` And make sure the volume mapping is correct. From what you provided, it should be: ``` -v /home/ubuntu/certs/:/ssl/ ``` (I'm assuming your certs are stored in `/home/ubuntu/certs/` directory on your server.)
Author
Owner

@mprasil commented on GitHub (Aug 17, 2018):

@EnriqCG I'm going to close this, feel free to re-open if you still have issues with getting it working.

<!-- gh-comment-id:413886708 --> @mprasil commented on GitHub (Aug 17, 2018): @EnriqCG I'm going to close this, feel free to re-open if you still have issues with getting it working.
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#70
No description provided.