Bitwarden

junlan
10
2025-02-28

安装部署

创建一个专属的 bitwarden 账号

sudo useradd -m -s /bin/bash bitwarden
sudo passwd bitwarden
sudo usermod -aG docker bitwarden
sudo su - bitwarden

安装 bitwarden

[root@localhost ~]# curl -s -L -o bitwarden.sh \
    "https://func.bitwarden.com/api/dl/?app=self-host&platform=linux" \
    && chmod +x bitwarden.sh
./bitwarden.sh install
./bitwarden.sh start
 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2025, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 2025.2.0
Docker version 28.0.1, build 068a01e
Docker Compose version v2.33.1

(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): bitwarden.snimay.com

(!) Do you want to use Let's Encrypt to generate a free SSL certificate? (y/n): n

(!) Enter the database name for your Bitwarden instance (ex. vault): snimay

2025.2.0: Pulling from bitwarden/setup
Digest: sha256:20da6cf76105cfaec35d857801c90d10e484dc9e9784f1ab9b37bc8dd6c1e9a4
Status: Downloaded newer image for bitwarden/setup:2025.2.0
docker.io/bitwarden/setup:2025.2.0

(!) Enter your installation id (get at https://bitwarden.com/host): 514e99fc-5f6f-4205-b260-b291007c7818

(!) Enter your installation key: U1TSOHNUKnyUWlCh1YXN

(!) Enter your region (US/EU) [US]:

(!) Do you have a SSL certificate to use? (y/N): n

(!) Do you want to generate a self-signed SSL certificate? (y/N): y

!!!!!!!!!! WARNING !!!!!!!!!!
You are using an untrusted SSL certificate. This certificate will not be
trusted by Bitwarden client applications. You must add this certificate to
the trusted store on each device or else you will receive errors when trying
to connect to your installation.

Building nginx config.
Building docker environment files.
Building docker environment override files.
Building FIDO U2F app id.
Building docker-compose.yml.

Installation complete

If you need to make additional configuration changes, you can modify
the settings in `./bwdata/config.yml` and then run:
`./bitwarden.sh rebuild` or `./bitwarden.sh update`

Next steps, run:
`./bitwarden.sh start`

 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

Open source password management solutions
Copyright 2015-2025, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden

===================================================

bitwarden.sh version 2025.2.0
Docker version 28.0.1, build 068a01e
Docker Compose version v2.33.1                                                                                             

Creating directory /home/bitwarden/bwdata/core
Creating directory /home/bitwarden/bwdata/core/attachments
Creating directory /home/bitwarden/bwdata/logs
Creating directory /home/bitwarden/bwdata/logs/admin
Creating directory /home/bitwarden/bwdata/logs/api
Creating directory /home/bitwarden/bwdata/logs/events
Creating directory /home/bitwarden/bwdata/logs/icons
Creating directory /home/bitwarden/bwdata/logs/identity
Creating directory /home/bitwarden/bwdata/logs/mssql
Creating directory /home/bitwarden/bwdata/logs/nginx
Creating directory /home/bitwarden/bwdata/logs/notifications
Creating directory /home/bitwarden/bwdata/logs/sso
Creating directory /home/bitwarden/bwdata/logs/portal
Creating directory /home/bitwarden/bwdata/mssql/backups
Creating directory /home/bitwarden/bwdata/mssql/data
[+] Running 13/13
 ✔ Network docker_public              Created                                                                                                                                                            0.2s
 ✔ Network docker_default             Created                                                                                                                                                            0.1s
 ✔ Container bitwarden-mssql          Started                                                                                                                                                            1.4s
 ✔ Container bitwarden-identity       Started                                                                                                                                                            1.7s
 ✔ Container bitwarden-sso            Started                                                                                                                                                            2.9s
 ✔ Container bitwarden-attachments    Started                                                                                                                                                            2.2s
 ✔ Container bitwarden-icons          Started                                                                                                                                                            3.0s
 ✔ Container bitwarden-web            Started                                                                                                                                                            1.4s
 ✔ Container bitwarden-events         Started                                                                                                                                                            1.6s
 ✔ Container bitwarden-api            Started                                                                                                                                                            2.4s
 ✔ Container bitwarden-notifications  Started                                                                                                                                                            1.0s
 ✔ Container bitwarden-admin          Started                                                                                                                                                            2.8s
 ✔ Container bitwarden-nginx          Started                                                                                                                                                            4.6s
2025.2.0: Pulling from bitwarden/setup
Digest: sha256:20da6cf76105cfaec35d857801c90d10e484dc9e9784f1ab9b37bc8dd6c1e9a4
Status: Image is up to date for bitwarden/setup:2025.2.0
docker.io/bitwarden/setup:2025.2.0


Bitwarden is up and running!
===================================================

visit https://bitwarden.snimay.com
to update, run `./bitwarden.sh updateself` and then `./bitwarden.sh update`

访问登录

https://bitwarden.snimay.com/

image-20250227162156302

image-20250227162304397