Trouble getting fail2ban to read log files

Just getting started with self hosting. I have a Ubuntu 22.04 server in my home lab. I followed the official installation instructions meaning running the shell script as the bitwarden user. Everything is running fine and I was able to migrate from my previous password manager.

I want to improve security by enabling fail2ban. I have multiple docker containers for various services and typically just create a new filter/jail pointing to the log files.

Since I run the installation as the bitwarden user, fail2ban (root) cannot access the log files found in /opt/bitwarden/bwdata/logs

I found on this forum link but the key difference is that the OP did not install with a different user (bitwarden).

So I’m wondering if the only way to make this work is to re-install using my default user (non-root) as I typically do for all docker containers.

Hi @alaint, welcome to Community! :wave:

It’s intentional that root can’t access those files. We would recommend configuring Docker to log to file and pointing fail2ban at that copy rather than the log files in the bwdata directory.

I hope this helps, but please feel free to follow up if you have more questions. :slightly_smiling_face: