Note: This repository is deprecated, use bwgc_backup in conjunction with vaultwarden instead (see this commit). This repo and docker image will continue to be built with the latest vaultwarden/server:alpine
image, but it won't get updates to the backup scripts.
Bitwarden on Google Cloud Docker Image - Vaultwarden
This is the vaultwarden container repository for the Bitwarden self-hosted on Google Cloud for Free project.
Changes
Base Image: vaultwarden/server:alpine
Changes to Base Image: Add backup feature to e-mail, local directory, and rclone
Environment Variables
Environment Variable | Description |
---|---|
BACKUP | Backup method to use - <local, email, rclone> |
BACKUP_SCHEDULE | How often to run the backup script, in cron format (e.g.: 0 0 * * *) |
BACKUP_DAYS | How many days of backups to keep (for local or rclone) |
BACKUP_DIR | Directory to place backups in (for local or rclone) |
BACKUP_EMAIL_FROM_NAME | Emails can be sent for either email backup or notifying of rclone or local backup |
BACKUP_EMAIL_TO | Email address to send backup (`BACKUP=email`) or notifications (`BACKUP_NOTIFY=true`) |
BACKUP_ENCRYPTION_KEY | Optional encryption phrase for backup (e.g.: "this is my encryption phrase") |
BACKUP_EMAIL_NOTIFY | Send email notification for rclone or local backup jobs |
BACKUP_RCLONE_CONF | Set to your desired rclone config file location (e.g.: /data/rclone.conf )With the container running, follow these steps to configure rclone: 1. sudo docker exec -it bitwarden ash -c 'rclone config --config $BACKUP_RCLONE_CONF' 2. Follow the prompts and instructions at https://rclone.org/remote_setup/ - you will most likely need to download a rclone on another computer (it is portable) to authorize. 3. rclone will generate a working config file in the location provided. |
BACKUP_RCLONE_DEST | Name of directory that rclone will sync the backups to. |
SMTP_HOST | SMTP Server |
SMTP_FROM | From email address to use |
SMTP_PORT | SMTP port |
SMTP_SECURITY | starttls, force_tls, or off |
SMTP_USERNAME | SMTP username |
SMTP_PASSWORD | SMTP password |