搭建自用密码存储工具bitwarden

该文详细描述了如何在Centos7.9操作系统上安装Docker和docker-compose,以及如何通过官方脚本下载并配置Bitwarden,包括设置安装ID、安装密钥,选择不使用LetsEncryptSSL证书,并提供自定义SSL证书的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、前提条件

1、操作系统:Centos7.9

2、docker、docker-compose、加速器

二、开始部署

1、安装docker

[root@bitwarden ~]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
[root@bitwarden ~]# systemctl enable docker && systemctl start docker

2、安装docker-compose

<访问github搜索docker>
在这里插入图片描述
<点击compose>
在这里插入图片描述

在这里插入图片描述
<Show all 26 assets>
在这里插入图片描述
<linux-x86_64>
在这里插入图片描述
<上传到服务器中>

[root@bitwarden ~]# mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
[root@bitwarden ~]# chmod +x /usr/local/bin/docker-compose
[root@bitwarden ~]# docker-compose version
Docker Compose version v2.19.0


3、首先获取install id和install key点击这里获取,然后开启加速器,安装bitwarden

在这里插入图片描述

[root@bitwarden ~]# mkdir /bitwarden
[root@bitwarden ~]# cd /bitwarden/
[root@bitwarden bitwarden]# curl -Lso bitwarden.sh https://go.btwrdn.co/bw-sh && chmod 700 bitwarden.sh
[root@bitwarden bitwarden]# ./bitwarden.sh install
 _     _ _                         _
| |__ (_) |___      ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V  V / (_| | | | (_| |  __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_|  \__,_|\___|_| |_|

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

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

bitwarden.sh version 2023.5.1
Docker version 23.0.1, build a5ee5b1
Docker Compose version v2.19.0

(!) Enter the domain name for your Bitwarden instance (ex. bitwarden.example.com): bitwarden.devonl.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): passwdvault

2023.5.1: Pulling from bitwarden/setup
759700526b78: Pull complete
cafd06d60458: Extracting [==================================================>]  14.97MB/14.97MB
9e65f86790b6: Download complete
217953d5b220: Download complete
9abf5ceb3cbb: Download complete
9329b249c111: Download complete
2524a5e4ba4b: Download complete
7795fb6077aa: Download complete
359f96e31341: Download complete
0f85d445c245: Download complete
Digest: sha256:c279acf57dd7462a63e6ce1921c8339f8b31460aa361d96c0b11e359b9db5574
Status: Downloaded newer image for bitwarden/setup:2023.5.1
docker.io/bitwarden/setup:2023.5.1

(!) Enter your installation id (get at https://bitwarden.com/host):d84xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxf

(!) Enter your installation key:xXxxxxxxxxXxxxJ

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

!!!!!!!!!! NOTE !!!!!!!!!!
Make sure 'certificate.crt' and 'private.key' are provided in the
appropriate directory before running 'start' (see docs for info).

(!) Is this a trusted SSL certificate (requires ca.crt, see docs)? (y/n): n

Generating key for IdentityServer.
Generating a RSA private key
.............................................................................................++++
...++++
writing new private key to 'identity.key'
-----

!!!!!!!!!! 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`


4、然后再谷哥应用商城找到Bitwarden扩展插件,将配置的域名写入本地hosts文件,访问域名注册账号,再谷歌插件中选择自托管,填写域名登录即可。

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

DevonL77

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值