Updating bitwarden with no script

hi all,

so here it says to update bitwarden using the script, but i cant see it

root@bw:~# ls -lah /bitwarden/bwdata/
total 56K
drwxr-xr-x 14 root root 4.0K Apr 3 16:45 .
drwxr-xr-x 3 root root 4.0K May 26 21:25 …
drwxr-xr-x 2 nobody nogroup 4.0K Apr 3 16:05 ca-certificates
drwxr-xr-x 5 nobody nogroup 4.0K Apr 3 16:05 core
drwxr-xr-x 2 root root 4.0K Apr 3 16:29 docker
drwxr-xr-x 2 root root 4.0K Apr 3 16:30 env
drwxr-xr-x 2 nobody nogroup 4.0K Apr 3 16:05 identity
drwxr-xr-x 2 nobody nogroup 4.0K Apr 3 16:05 letsencrypt
drwxr-xr-x 10 root root 4.0K Apr 3 16:05 logs
drwxr-xr-x 4 root root 4.0K Apr 3 16:05 mssql
drwxr-xr-x 2 nobody nogroup 4.0K Apr 3 16:05 nginx
drwxr-xr-x 4 nobody nogroup 4.0K Apr 3 16:05 ssl
drwxr-xr-x 2 nobody nogroup 4.0K Apr 3 16:05 web

probably because i have installed bitwarden via the “manual docker installations” way

is the only option to build a new server again and copy “.bwdata” folder over?

or copy over the 1.34 stub folder to the .bwdata folder?

thanks,
rob

i have noticed 1.34 compared to 1.33 doesnt come with these dirs in bwdata

core
letsencrypt
logs
mssql

do i need all these or do i just need to copy the data dir over ie the “mssql”?

Not sure If I understand your question.

In case you just want to update your bitwarden server, you can just update the image version in docker-compose.yml file. Like so:

...
web:
    image: bitwarden/web:${BITWARDEN_WEB_VERSION}
...
attachments:
    image: bitwarden/attachments:${BITWARDEN_VERSION}
...

The ${BITWARDEN_VERSION} and ${BITWARDEN_WEB_VERSION} can be variables in an .env file or just put the version 1.34.0 and 2.14.0 accordingly.

Then run docker-compose up -d and it should download the newer images and run. Just in case something goes wrong, I suggest you first backup your volumes (default bwdata) then upddate. That way you are safe, if the update, for any reason does not work, you put back the older versions.

I hope it helps :slight_smile:

1 Like

it says im on the latest docker…

web:
image: bitwarden/web:latest
container_name: bitwarden-web
restart: always
volumes:
- …/web:/etc/bitwarden/web
env_file:
- global.env
- …/env/uid.env

attachments:
image: bitwarden/attachments:latest
container_name: bitwarden-attachments
restart: always
volumes:
- …/core/attachments:/etc/bitwarden/core/attachments
env_file:
- global.env
- …/env/uid.env

so then do i just run this…

docker-compose -f /bitwarden/bwdata/docker/docker-compose.yml up -d

then will it update to the latest version?

Yes, the script actually downloads the newer version of itself (which has the new versions written in it) and does the equivalent of docker-compose up -d.

I have a running server myself and update it recently :slight_smile:

wierd…

it didnt work, i know this as i go back to the web admin page of bw and it says im still on 1.33.1 and 2.13.2

root@bw:~# docker-compose -f /bitwarden/bwdata/docker/docker-compose.yml up -d
bitwarden-web is up-to-date
bitwarden-notifications is up-to-date
bitwarden-events is up-to-date
bitwarden-identity is up-to-date
bitwarden-icons is up-to-date
bitwarden-api is up-to-date
bitwarden-mssql is up-to-date
bitwarden-attachments is up-to-date
bitwarden-admin is up-to-date
bitwarden-nginx is up-to-date
root@bw:~#

maybe i need to download the latest dockers again?

#!/bin/bash

mkdir /dockers

cd /dockers

docker pull bitwarden/web
docker save bitwarden/web:latest > bitwarden.web:latest.tar
docker load < bitwarden.web:latest.tar
docker pull bitwarden/mssql
docker save bitwarden/mssql:latest > bitwarden.mssql:latest.tar
docker load < bitwarden.mssql:latest.tar
docker pull bitwarden/nginx
docker save bitwarden/nginx:latest > bitwarden.nginx:latest.tar
docker load < bitwarden.nginx:latest.tar
docker pull bitwarden/admin
docker save bitwarden/admin:latest > bitwarden.admin:latest.tar
docker load < bitwarden.admin:latest.tar
docker pull bitwarden/events
docker save bitwarden/events:latest > bitwarden.events:latest.tar
docker load < bitwarden.events:latest.tar
docker pull bitwarden/notifications
docker save bitwarden/notifications:latest > bitwarden.notifications:latest.tar
docker load < bitwarden.notifications:latest.tar
docker pull bitwarden/icons
docker save bitwarden/icons:latest > bitwarden.icons:latest.tar
docker load < bitwarden.icons:latest.tar
docker pull bitwarden/attachments
docker save bitwarden/attachments:latest > bitwarden.attachments:latest.tar
docker load < bitwarden.attachments:latest.tar
docker pull bitwarden/identity
docker save bitwarden/identity:latest > bitwarden.identity:latest.tar
docker load < bitwarden.identity:latest.tar
docker pull bitwarden/api
docker save bitwarden/api:latest > bitwarden.api:latest.tar
docker load < bitwarden.api:latest.tar
docker pull bitwarden/setup
docker save bitwarden/setup:latest > bitwarden.setup:latest.tar
docker load < bitwarden.setup:latest.tar
docker pull bitwarden/server
docker save bitwarden/server:latest > bitwarden.server:latest.tar
docker load < bitwarden.server:latest.tar

If you use the image tag latest then you need to run docker-compose pull then docker-compose up -d. I would still recommend to use specific tags, because then you know which was the latest version running well, in case of something goes wrong.

I personally have them in .env file (same folder where docker-compose.yml) is. My file looks like this:

# Bitwarden
# BITWARDEN_VERSION=1.32.0
BITWARDEN_VERSION=1.34.0
# BITWARDEN_WEB_VERSION=2.12.0
BITWARDEN_WEB_VERSION=2.14.0

whats the exact syntax for docker compose pull, is it

docker-compose pull bitwarden/web
docker-compose pull bitwarden/attachments

and then this

docker-compose -f /bitwarden/bwdata/docker/docker-compose.yml up -d

Just docker-compose pull on the folder where the **docker-compose.yml` file is, like this:

cd /home/user/bitwarden
docker-compose pull
# Then
docker-compose up -d

or

cd /home/user/bitwarden
docker-compose pull && docker-compose up -d
1 Like

cool done

root@bw:/bitwarden/bwdata/docker# docker-compose pull && docker-compose up -d
Pulling mssql … done
Pulling web … done
Pulling attachments … done
Pulling api … done
Pulling identity … done
Pulling admin … done
Pulling icons … done
Pulling notifications … done
Pulling events … done
Pulling nginx … done

luckily i backed up my bwdata before this as i wasnt sure it would overright the mssql file

still says in my admin page i have 1.33.1 and 2.13.2

maybe because, i have noticed im on the production

ASPNETCORE_ENVIRONMENT=Production
globalSettings__selfHosted=true
globalSettings__baseServiceUri__vault=http://localhost
globalSettings__baseServiceUri__api=http://localhost/api
globalSettings__baseServiceUri__identity=http://localhost/identity
globalSettings__baseServiceUri__admin=http://localhost/admin
globalSettings__baseServiceUri__notifications=http://localhost/notifications
globalSettings__baseServiceUri__internalNotifications=http://notifications:5000
globalSettings__baseServiceUri__internalAdmin=http://admin:5000
globalSettings__baseServiceUri__internalIdentity=http://identity:5000
globalSettings__baseServiceUri__internalApi=http://api:5000
globalSettings__baseServiceUri__internalVault=http://web:5000
globalSettings__pushRelayBaseUri=https://push.bitwarden.com
globalSettings__installation__identityUri=https://identity.bitwarden.com

To be sure, try this:
docker image ls | grep "bitwarden"
you should see something like this:

bitwarden/web                            2.14.0              8fe12e915c97        9 days ago          221MB
bitwarden/mssql                          1.34.0              1f5ed9d614df        9 days ago          1.4GB
bitwarden/admin                          1.34.0              726ae86eb0ac        9 days ago          282MB
bitwarden/events                         1.34.0              086920aec14c        9 days ago          263MB
bitwarden/notifications                  1.34.0              dfadf84c582c        9 days ago          264MB
bitwarden/icons                          1.34.0              f87c70a6d539        9 days ago          264MB
bitwarden/attachments                    1.34.0              3a463364fe35        9 days ago          209MB
bitwarden/identity                       1.34.0              8750acc4f7f7        9 days ago          356MB
bitwarden/api                            1.34.0              86f509874ec3        9 days ago          358MB
bitwarden/nginx                          1.32.0              7feb963f6c79        4 months ago        134MB
bitwarden/nginx                          1.34.0              7feb963f6c79        4 months ago        134MB
bitwarden/web                            2.12.0              d9cb8eae5562        8 months ago        308MB
bitwarden/mssql                          1.32.0              d92a09dce472        8 months ago        1.39GB
bitwarden/admin                          1.32.0              4d158aa7d9d1        8 months ago        298MB
bitwarden/events                         1.32.0              abb2acd7bc0b        8 months ago        321MB
bitwarden/notifications                  1.32.0              eb43e98b4135        8 months ago        289MB
bitwarden/icons                          1.32.0              53b8984377c7        8 months ago        323MB
bitwarden/attachments                    1.32.0              51e7de910b78        8 months ago        297MB
bitwarden/identity                       1.32.0              a4ca753ee423        8 months ago        321MB
bitwarden/api                            1.32.0              85fd381456cf        8 months ago        331MB

bingo!!!

root@bw:/bitwarden/bwdata/docker# docker-compose pull && docker-compose up -d
Pulling mssql … done
Pulling web … done
Pulling attachments … done
Pulling api … done
Pulling identity … done
Pulling admin … done
Pulling icons … done
Pulling notifications … done
Pulling events … done
Pulling nginx … done
Recreating bitwarden-mssql … done
Recreating bitwarden-web … done
Recreating bitwarden-attachments … done
Recreating bitwarden-icons … done
Recreating bitwarden-notifications … done
Recreating bitwarden-events … done
Recreating bitwarden-identity … done
Recreating bitwarden-api … done
Recreating bitwarden-admin … done
Recreating bitwarden-nginx … done

now when i go to the web i can see the web has changed

1 Like

Perfect :slight_smile:

1 Like

thank you Pulsar very much your a star!!!