# Environment variable could not be parsed

**URL:** <https://vaultwarden.discourse.group/t/environment-variable-could-not-be-parsed/1350>\
**Category:** Help\
**Created:** [December 30, 2021, 7:59am UTC](https://vaultwarden.discourse.group/t/environment-variable-could-not-be-parsed/1350 "2021-12-30T07:59:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Worlock](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@Worlock](https://vaultwarden.discourse.group/u/Worlock)\
**Post date:** [December 30, 2021, 7:59am UTC](https://vaultwarden.discourse.group/t/environment-variable-could-not-be-parsed/1350/1 "2021-12-30T07:59:44Z")

</div>

After installing Vaultwarden I could not create an account because there was no secure connection. So I am trying to get this working with Rocket. I know a reverse proxy is recommended, but I am not planning on exposing anything to the internet so I want to use Rocket. Unfortunately I get an error:

```auto
[INFO] No .env file found.
Logger failed to initialize: attempted to set a logger after the logging system was already initialized
[2021-12-26 20:03:34.859][rocket::config::error][ERROR] environment variable ROCKET_TLS={certs="/ssl/vaultwarden.mydomain.local.pem,key="/ssl/vaultwarden.mydomain.local.key"} could not be parsed

```

This is the command I use:

```auto
docker run -d --name bitwarden \
  -e ROCKET_TLS='{certs="/ssl/vaultwarden.mydomain.local.pem,key="/ssl/vaultwarden.mydomain.local.key"} \
  -v /ssl/keys/:/ssl/ \
  -v /vw-data/:/data/ \
  -p 443:80 \
  vaultwarden/server:latest

```

When I remove the ROCKET\_TLS line, the container deploys and I can open vaultwarden, but I do have the first error (No .env file found.)

So it must be somewhere in that ROCKET\_TLS line, but I have no idea what I am doing wrong. The certificate and key both are in PEM format. I read something about symlinks, but I have no idea how to check for that.

Oh yeah, I’ve created the cert and key with easyrsa.

---

<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:** [December 30, 2021, 8:04am UTC](https://vaultwarden.discourse.group/t/environment-variable-could-not-be-parsed/1350/2 "2021-12-30T08:04:02Z")

</div>

You are missing a `"` before the `key` argument. This causes the string to be quoted incorrectly.

The message regarding `.env` is an info message. Just letting you know it’s not using a .env loading the variables. So nothing to worry about.

---

<div class="post-metadata">

**Author:** ![Worlock](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@Worlock](https://vaultwarden.discourse.group/u/Worlock)\
**Post date:** [December 30, 2021, 8:39am UTC](https://vaultwarden.discourse.group/t/environment-variable-could-not-be-parsed/1350/3 "2021-12-30T08:39:28Z")

</div>

I must have deleted that by accident during my struggle to get this working. I also see I miss a ’ at the end. Now I have this:

```auto
docker run -d --name bitwarden \
  -e ROCKET_TLS='{certs="/ssl/vaultwarden.mydomain.local.pem",key="/ssl/vaultwarden.mydomain.local.key"}' \
  -v /ssl/keys/:/ssl/ \
  -v /vw-data/:/data/ \
  -p 443:80 \
  vaultwarden/server:latest

```

And now I get the same error as I remember I had in the beginning:

```auto
[INFO] No .env file found.
Logger failed to initialize: attempted to set a logger after the logging system was already initialized
[2021-12-30 08:37:17.628][rocket::config::error][ERROR] I/O error while setting tls.certs:

```

---

<div class="post-metadata">

**Author:** ![Worlock](https://avatars.discourse-cdn.com/v4/letter/w/c77e96/32.png) [@Worlock](https://vaultwarden.discourse.group/u/Worlock)\
**Post date:** [December 30, 2021, 11:14am UTC](https://vaultwarden.discourse.group/t/environment-variable-could-not-be-parsed/1350/4 "2021-12-30T11:14:49Z")

</div>

I solved it. When I entered my docker container via console I saw that the ssl/keys folder was empty, while the pem files where present on my host. Also the data folder was filled in the container, but it was empty on my host. So it came clear to me that the volume mapping wasn’t right.

After some investigation I saw that it had to do with the fact that I used VS Code to create the folders, and I needed to add “sftpSudo”: true to my settings.json file. After doing that it worked.

I do have a issue now that Chrome doesn’t want to open the page, even if I add the certificate to my browser. But I will look at that later, in Firefox it works after ignoring the warning.
