首先需要有aws账号,如果没有就不用搭建了,可以直接用我的,我的仅供测试,不保证永久有效,还请主动备份您的密码(直接看最后)

这是项目 https://github.com/vvondra/bitwarden-serverless

安装npm

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - && apt-get install -y nodejs

下载aws安全凭证

img

安装AWSCLI

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install && /usr/local/bin/aws --version

输入凭证,根据需要选区

$ aws configure

AWS Access Key ID [None]: *****
AWS Secret Access Key [None]: *****
Default region name [None]: ap-east-1
Default output format [None]: json

默认搭在香港区,其他区自己改下面。

git clone https://github.com/vvondra/bitwarden-serverless.git && cd bitwarden-serverless
npm install -g serverless
npm install
# Feel free to deploy to an AWS region closer to your typical location
serverless deploy --region ap-east-1 --stage prod

img

具体的程序可以在aws控制面板Lambda看到,安装后所示的绿线上的链接即为自托管环境api,我们只需在设置中自托管环境填入该链接,保存,然后注册账号。

img

导入数据

由于这个只有api,没有web,因此不能在web导入数据,只能用cli命令,参考原文 https://github.com/vvondra/bitwarden-serverless#import-existing-data

其他

如果没有aws账号也可以用我搭建好的,我的仅供测试,不保证永久有效,还请主动备份您的密码,填入https://xedil903yd.execute-api.ap-east-1.amazonaws.com/prod/ ,也可以使用我自定义域名的链接https://bitwarden.liusy.eu.org/ ,这两个是同一个。 然后注册账号即可。

经测试 删除密码的功能不能用,但可以在原有条目上编辑,不知道是不是我的问题。

aws lambda具体额度说明,每月的免费请求数为100w,免费计算用量为400000GB-s,搭个密码管理器估计是非常够用的。

由于AWS的计费异常复杂,所以实际使用是否产生费用还需等待时间来验证。。。

经验证,API gateway的费用每个月需要零点零几刀。。。

完了

最后修改:2021 年 03 月 30 日 12 : 43 PM