Add initial bitwarden docs
This commit is contained in:
parent
8ab8773edc
commit
3f33b8e73f
|
@ -0,0 +1,76 @@
|
|||
# Bitwarden
|
||||
|
||||
bitwarden_rs inside a container. This is a re-implementation of the main [Bitwarden](https://bitwarden.com/) server in rust. It is meant to replace the main Bitwarden server and provide a better self-hosting alternative. This server *is compatible* with the official Bitwarden clients. This image also contains the main Bitwarden web ui.
|
||||
|
||||
## Inspiration / Sources
|
||||
|
||||
- [https://bitwarden.com/](https://bitwarden.com/)
|
||||
- [https://github.com/dani-garcia/bitwarden_rs](https://github.com/dani-garcia/bitwarden_rs)
|
||||
|
||||
## Install / Update / Run Script
|
||||
|
||||
Setup a generic script that'll auto update bitwarden, build a container and launch it. You should only run this script at first launch and/or when you're looking for updates.
|
||||
|
||||
``` bash
|
||||
|
||||
mkdir -p /var/bitwarden
|
||||
|
||||
cat > /scratch/docker/bitwarden.sh <<EOF
|
||||
#!/bin/bash
|
||||
|
||||
##########
|
||||
# For postgresql instead of sqlite run the following commands
|
||||
#docker exec -it postgres psql -U postgres
|
||||
#create role bitwarden nocreatedb nocreaterole login PASSWORD 'password';
|
||||
#create database bitwarden owner=bitwarden encoding=UTF8;
|
||||
|
||||
# Setup using the above database/username/role and ip of 172.30.12.12
|
||||
##########
|
||||
|
||||
ARCH=\`arch\`
|
||||
if [ \$ARCH == "aarch64" ]
|
||||
then
|
||||
ARCH="arm64v8"
|
||||
else
|
||||
ARCH="arm32v7"
|
||||
fi
|
||||
|
||||
docker pull registry.lollipopcloud.solutions/\$ARCH/bitwarden_rs
|
||||
|
||||
docker container stop bitwarden
|
||||
docker container rm bitwarden
|
||||
|
||||
docker run \\
|
||||
--name nextcloud \\
|
||||
--restart unless-stopped \\
|
||||
--net docker-private \\
|
||||
--ip 172.30.7.7 \\
|
||||
-e TZ=UTC \\
|
||||
-e DEBUG=1 \\
|
||||
-e SIGNUPS_ALLOWED=false \\
|
||||
-e WEBSOCKET_ENABLED=true \\
|
||||
-v /var/bitwarden:/data \\
|
||||
registry.lollipopcloud.solutions/\$ARCH/bitwarden_rs
|
||||
|
||||
EOF
|
||||
|
||||
chmod a+x /scratch/docker/bitwarden.sh
|
||||
|
||||
```
|
||||
|
||||
## Run Bitwarden
|
||||
|
||||
Simply execute ```/scratch/docker/bitwarden.sh``` to update/run Bitwarden.
|
||||
|
||||
## Update Unbound
|
||||
|
||||
``` bash
|
||||
|
||||
cat > /etc/unbound/local_zone/bitwarden.conf <<EOF
|
||||
local-data: "bitwarden A 172.30.0.1"
|
||||
local-data: "bitwarden.domain.tld A 172.30.0.1"
|
||||
local-data-ptr: "172.30.0.1 bitwarden"
|
||||
local-data-ptr: "172.30.0.1 bitwarden.domain.tld"
|
||||
EOF
|
||||
|
||||
```
|
Reference in New Issue