[SOLVED] Docker and MySQL

If I’m going to run bitwarden_rs and mysql in separate containers (using docker compose), do I use the server-mysql image, or do I use the server image and just change the DATABASE_URL setting?

Related confusion:

Docker Hub images have the same dockerfile

I’m pretty new to Docker, etc, so maybe this isn’t an issue.

When I look at the individual Docker Hub pages for the bitwarden_rs images with different back ends, I expect to see different contents on the “Dockerfile” tab. This makes me think that the mysql and postgres images aren’t built correctly.

Compare:



The PostgreSQL one is the same, but as a new user I can only post two links.

I figured it out: I need the server-mysql image.

Actually, I had trouble getting the MySQL and MariaDB images to work right, so I switched to Postgres and I’m not looking back.

hi, could you explain what your excact command was to install the bitwardenrs/server-postgresql docker container?
I can’t make it work, it doesn’t start up. it just says container is restarting.
this is my command:

mkdir -p /home/bitwarden_rs/

docker run -d --name bitwarden_rs \
  -e ADMIN_TOKEN="password" \
  -e SIGNUPS_VERIFY=true \
  -e DOMAIN="https://domain.tld" \
  -e SIGNUPS_ALLOWED=false \
  -p 1024:1024 \
  -e ROCKET_PORT=1024 \
  -e WEBSOCKET_ENABLED=true \
  -p 3012:3012 \
  -e LOG_FILE=/data/bitwarden.log \
  -e LOG_LEVEL=warn \
  -v /home/bitwarden_rs/:/data/ \
  -v /etc/timezone:/etc/timezone:ro \
  -v /etc/localtime:/etc/localtime:ro \
  --restart always \
  bitwardenrs/server-postgresql:latest

Hello @szaimen,

I see you are still using the latest tag. That has been changed to testing.
Also, the most recent versions of the bitwardenrs/server:testing container has multi-database support now, and can be used for sqlite3, mysql/mariadb and postgresql.

I don’t see anything strange in this command. What do you see in the bitwarden.log file located at /home/bitwarden_rs/? Or try docker logs -f --details bitwarden_rs and see what output you get there.

Thanks for the reply! Actually, I havent tried again since then. Maybe using the testing tag would have already solved the problem but I think I will be fine using the sqllite version. Thanks!

Hi,
I’m trying to use bitwarden_rs and docker with MySQL support. I have an issue with MySQL, and I can’t find any server-mysql tags from Docker Hub.
Is this image still available ? Or I must use another image ?
Thank you !

You need https://hub.docker.com/r/bitwardenrs/server-mysql if you want to run the current release. The testing tag of https://hub.docker.com/r/bitwardenrs/server has unified support for all database backends; once the next release comes out, the latest tag will have that as well.

Thank you !
And is the testing version “stable” for everyday use ? And it will be possible to go from testing to latest when it will be available ?
Thank you !

See https://github.com/dani-garcia/bitwarden_rs/wiki/Which-container-image-to-use#image-tags. Yes, you can go from testing to latest once a new version is released. At the moment a new release is tagged, testing and latest are basically the same thing.

Thank you ! I’ll look at it.