I am on Ubuntu server 20.0.4 and have installed Vaultwarden using docker as described in the wiki. I also have a Let’s Encrypt certificate and run Vaultwarden behind an Apache reverse proxy and basically it is working fine already.
However, what I did not manage is to set some essential environment variables. Consequently, I could not make Vaultwarden save its log files outside of the container - which however seems to be a requirement for properly setting up fail2ban.
For instance I tried to make Vaultwarden save it’s logs to a log file in my host directory /usr/vw-data with this (as recommended here):
docker run -d --name vaultwarden -e LOG_FILE=/data/vaultwarden.log
But I only get:
"docker run" requires at least 1 argument.
The same happens with all the other commands to set env vars which are listed in the wiki! What am I doing wrong here?
I am not exactly an expert in docker and unfortunately most of the tutorials I have found are pretty basic and only cover what I have already achieved - and learning docker from scratch is a bit above my head
Please note: I currently do not use portainer or docker-compose - just docker 20.10.8
I would really appreciate if someone could help me here!