Debian10-Bitwarden密码保存和dropbox-备份
apt-get remove docker docker-engine docker.io containerd runc
    apt-get update
    apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
    curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
    apt-key fingerprint 0EBFCD88
    add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/debian \
    $(lsb_release -cs) \
    stable"
    apt-get update
    apt-get install docker-ce docker-ce-cli containerd.io
    docker run hello-world
  • Caddy2
echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" \
        |  tee -a /etc/apt/sources.list.d/caddy-fury.list
    apt install -y ca-certificates
    apt update
    apt install -y caddy
    apt install -y curl wget
    nano /etc/caddy/Caddyfile
    ***.com  #你的域名
    file_server
    encode gzip
      header {
           # Enable cross-site filter (XSS) and tell browser to block detected attacks
           X-XSS-Protection "1; mode=block"
           # Disallow the site to be rendered within a frame (clickjacking protection)
           X-Frame-Options "DENY"
           # Prevent search engines from indexing (optional)
           X-Robots-Tag "none"
           # Server name removing
           -Server
       }
    @websockets {
    header Connection Upgrade
    header Upgrade websocket
    path /notifications/hub
    }
      # The negotiation endpoint is also proxied to Rocket
      reverse_proxy  /notifications/hub/negotiate 127.0.0.1:889
  
      # Notifications redirected to the websockets server
      reverse_proxy  @websockets  127.0.0.1:3012
  
      # Proxy the Root directory to Rocket
      reverse_proxy  127.0.0.1:889
  • Bitwarden_rs
是否开启注册 启动websocket
docker run -d --name bitwarden \
  -e SIGNUPS_ALLOWED=true \
   -e WEBSOCKET_ENABLED=true \
   -e LOG_FILE=/data/bitwarden.log \
   -v /bw-data/:/data/ \
   -p 889:80 \
   -p 3012:3012 \
   bitwardenrs/server:latest
自己drop创建应用生成Access Token 复制下来
    curl "https://raw.githubusercontent.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh" -o dropbox_uploader.sh
    chmod +x dropbox_uploader.sh
    ./dropbox_uploader.sh
    /root为例
    apt install -y p7zip-full  cron
    nano /root/auto.sh 
    #!/usr/bin/env bash
    /usr/lib/p7zip/7z  a -tzip -p你的密码 -mem=aes256 /root/bitwarden-backup-$(date +%Y%m%d_%H%M%S).7z /bw-data/
    cd /root && ./dropbox_uploader.sh upload /root/bitwarden-backup-*.7z /
    rm -f /root/bitwarden-backup-*
chmod +x auto.sh
crontab -e
0 6 * * *  /root/auto.sh
0 23 * * * /root/auto.sh
  • 关闭注册
docker stop bitwarden
    docker  rm bitwarden
    docker run -d --name bitwarden \
  -e SIGNUPS_ALLOWED=false \
   -e WEBSOCKET_ENABLED=true \
   -e LOG_FILE=/data/bitwarden.log \
   -v /bw-data/:/data/ \
   -p 889:80 \
   -p 3012:3012 \
   bitwardenrs/server:latest
开机启动
   systemctl enable docker.service
   docker run --restart=always bitwarden
   docker ps -a
   docker update --restart=always bitwarden
  • 套cloudflare
套cf利用规则阻止其他国家访问
Last modification:October 3rd, 2020 at 05:18 am