# /rsa\_key.pem" for writing, No such file or directory

**URL:** <https://vaultwarden.discourse.group/t/rsa-key-pem-for-writing-no-such-file-or-directory/742>\
**Category:** Help\
**Created:** [March 20, 2021, 10:00am UTC](https://vaultwarden.discourse.group/t/rsa-key-pem-for-writing-no-such-file-or-directory/742 "2021-03-20T10:00:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sepphod](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Sepphod](https://vaultwarden.discourse.group/u/Sepphod)\
**Post date:** [March 20, 2021, 10:00am UTC](https://vaultwarden.discourse.group/t/rsa-key-pem-for-writing-no-such-file-or-directory/742/1 "2021-03-20T10:00:20Z")

</div>

Hello all

I wanted to integrate Bitwarden\_rs in my docker environment on a raspi4 behind a traefik as reverse proxy together with a Postgres db.  
but the Bitwarden\_rs container is in a reset loop with the following log:  
[INFO] No .env file found.

OpenSSL 1.1.1d 10 Sep 2019  
genrsa: Can’t open “/mnt/ext/bitwardenrs/data/rsa\_key.pem” for writing, No such file or directory  
Can’t open /mnt/ext/bitwardenrs/data/rsa\_key.pem for reading, No such file or directory  
3069739024:error:02001002:system library:fopen:No such file or directory:…/crypto/bio/bss\_file.c:69:fopen(’/mnt/ext/bitwardenrs/data/rsa\_key.pem’,‘r’)  
3069739024:error:2006D080:BIO routines:BIO\_new\_file:no such file:…/crypto/bio/bss\_file.c:76:  
unable to load Private Key  
Can’t open /mnt/ext/bitwardenrs/data/rsa\_key.der for reading, No such file or directory  
3070078992:error:02001002:system library:fopen:No such file or directory:…/crypto/bio/bss\_file.c:69:fopen(’/mnt/ext/bitwardenrs/data/rsa\_key.der’,‘rb’)  
3070078992:error:2006D080:BIO routines:BIO\_new\_file:no such file:…/crypto/bio/bss\_file.c:76:  
unable to load Private Key

Any idea what could be the issue?

thnx

here my docker-compose.yaml with PORT=8443  
services:  
bitwarden:  
image: bitwardenrs/server:latest  
restart: unless-stopped  
container\_name: bitwardenrs  
env\_file:  
- config.env  
user: 1000:1000  
environment:  
- ROCKET\_PORT=80  
labels:  
- “traefik.enable=true”  
- “traefik.http.routers.bitwarden.rule=Host(`${DOMAIN_NAME}`)”  
- “traefik.http.routers.bitwarden.entrypoints=websecure”  
- “traefik.http.routers.bitwarden.tls=true”  
- “traefik.http.routers.bitwarden.tls.certresolver=myresolver”  
- “traefik.docker.network=mytraefik”  
- "traefik.http.services.bitwarden.loadbalancer.server.port={PORT}" volumes: - {DATA\_FOLDER}:/data  
ports:  
- ${PORT}:80  
networks:  
- mytraefik  
- backend

bitwardendb:  
image: postgres:12.6-alpine  
restart: unless-stopped  
environment:  
- POSTGRES\_USER={POSTGRES\_USER} - POSTGRES\_PASSWORD={POSTGRES\_PASSWORD}  
- POSTGRES\_DB={POSTGRES\_DB} networks: - backend volumes: - {DATABASE\_VOLUME}:/var/lib/postgresql/data  
- ${BACKUP\_DIR}:/dump  
- /etc/localtime:/etc/localtime:ro

networks:  
mytraefik:  
external:  
name: mytraefik  
backend:  
internal: true

---

<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:** [March 20, 2021, 3:51pm UTC](https://vaultwarden.discourse.group/t/rsa-key-pem-for-writing-no-such-file-or-directory/742/2 "2021-03-20T15:51:42Z")

</div>

It looks like your {DATA\_FOLDER} isn’t writable or doesn’t exists.  
I think something is overwriting what you want, or some other misconfigured settings which is causing the volume not to exists or writable at all.

It also looks like the `volume` key is not places correctly, that could be a copy/paste issue, but not sure.  
And, should all the ENV variables started with ${} instead of only {}? Never tried that before actually.

---

<div class="post-metadata">

**Author:** ![Sepphod](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Sepphod](https://vaultwarden.discourse.group/u/Sepphod)\
**Post date:** [March 20, 2021, 3:58pm UTC](https://vaultwarden.discourse.group/t/rsa-key-pem-for-writing-no-such-file-or-directory/742/3 "2021-03-20T15:58:07Z")

</div>

Seems to be an paste-copy issue - the same with ${}.  
Anyway in the meantime I found that there is a relation to the DB. With SQLITE the issue doesn’t appear. As soon as I enable the db =\> it crashes.  
As I understand the configuration those files the Bitwarden\_rs wants to write are from the rocket crate which I don’t enable as I am behind a proxy.

---

<div class="post-metadata">

**Author:** ![Sepphod](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@Sepphod](https://vaultwarden.discourse.group/u/Sepphod)\
**Post date:** [March 20, 2021, 4:13pm UTC](https://vaultwarden.discourse.group/t/rsa-key-pem-for-writing-no-such-file-or-directory/742/4 "2021-03-20T16:13:54Z")

</div>

I found the issue =\> the volume path was not correct - anyway thx
