Remap docker volumes

I’m running Bitwarden on a Synology DS1618+ over http, and I have a Raspberry PI setup as my reverse proxy, that anything internet facing is forwarded to. I also have Fail2ban setup on the Raspberry PI.

Currently I have mounted the current location that Bitwarden uses for its log file to my Raspberry PI, and setup Polling on Fail2ban. This allows my PI to check the Bitwarden logs and ban accordingly.

The Issue that I am running into is hosting other apps and having to mount their log file location to the PI and that becomes tedious. I was able to move Apache/Guacamole’s log file easily to a central place on my NAS. I cannot seem to do this with Bitwarden. My goal is to have one location mounted called logs and subdirectories under each one like Bitwarden, Guacamole, etc and that is where the log file is kept. This way I only have to mount one directory to my PI

I know that I can just change the docker-compose file, but it could break future updates. I currently tried to use a docker-compose.override. It has sort of worked, because I can see that in the “Identity” Image /etc/bitwarden/logs is now mapped to the new location, but the log.txt file isn’t showing up there.

any help in this situation would be greatly appreciated

Hello @plainlytbrown,
you can use rsync to copy the log directory to the place you want to.

The other way (which I do) is to modify the biwardens docker-compose file.
As I’ve seen how they run their installation over script, I’ve done (in my opinion) a simpler (and faster) version of it. You can check it out here:

In my case the update is very simple. Just open the .env file put the number to update to. Then run docker-compose up -d and you are set :slight_smile:.

I’ve also proposed a contribution:

Hope this helps :slight_smile:

Hey @Pulsar,

Thanks for the information! I was actually just reading some about rsync, and thinking about that as a solution as well, glad to know I might have been going down the correct path.

As far as modifying the docker-compose file I feel that I’m still to new to do that and figure out how to fix it when an update comes. I have a Synology DS 220+ that I use to tinker with maybe I will host a backup copy of bitwarden there and wait for an update and see if I will be able to fix it when as update occurs.