Skip to content

Instantly share code, notes, and snippets.

@taufiqpsumarna
Last active September 6, 2022 02:27
Show Gist options
  • Save taufiqpsumarna/28e8eb7b28f2dc90442ea51602922923 to your computer and use it in GitHub Desktop.
Save taufiqpsumarna/28e8eb7b28f2dc90442ea51602922923 to your computer and use it in GitHub Desktop.
Vaultwarden Docker Compose
#Apps Setting
WEBSOCKET_ENABLED=true
LOG_FILE=./vw-data/log
LOG_LEVEL=Info
## Web vault settings
WEB_VAULT_FOLDER=./vw-data/web-vault/
WEB_VAULT_ENABLED=true
#Signup Rule
SIGNUPS_ALLOWED=true
SIGNUPS_DOMAINS_WHITELIST=example.com
[email protected]
SIGNUPS_VERIFY=true
SIGNUPS_VERIFY_RESEND_TIME=3600
SIGNUPS_VERIFY_RESEND_LIMIT=6
#Login Setting
ADMIN_RATELIMIT_SECONDS=100
ADMIN_RATELIMIT_MAX_BURST=3
#SMTP_Setting
SMTP_HOST=smtp.example.com
[email protected]
SMTP_FROM_NAME=Vaultwarden
SMTP_SECURITY=starttls
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=Password_Example
SMTP_TIMEOUT=15
#!/bin/bash
USER=<username>
source=/home/$USER/vaultwarden/vw-data/db.sqlite3
dest=/home/$USER/vaultwarden/backup/
backup_name=db-$(date '+%Y%m%d-%H%M').sqlite3
mkdir -p $dest
sqlite3 $source ".backup '$dest$backup_name'"
#Note: You can setup this for cron job example backup daily at midnight
#0 0 * * * /bin/bash /path/to/backup_vault.sh
#Install sqlite3 package first
#sudo apt-get install sqlite3
version: "3.9"
services:
vault:
image: vaultwarden/server:latest
volumes:
- ./vw-data/:/data
ports:
- 80:80
- 443:443
- 3012:3012
restart: on-failure
env_file:
- ./.env
environment:
- ADMIN_TOKEN=(Generate Your Own Token using command: openssl rand -base64 48)
- SIGNUPS_ALLOWED=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment