Skip to content

Instantly share code, notes, and snippets.

@dnno
Created May 10, 2021 11:18
Show Gist options
  • Save dnno/b85845c43c59ca93f1eb215ecda4640f to your computer and use it in GitHub Desktop.
Save dnno/b85845c43c59ca93f1eb215ecda4640f to your computer and use it in GitHub Desktop.
Docker-compose setup for Vaultwarden
version: '3'
services:
bitwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
- WEBSOCKET_ENABLED=true
- SIGNUPS_ALLOWED=false
- DOMAIN=<domain_name>
- SMTP_HOST=<smtp_host>
- SMTP_FROM=<sender_address>
- SMTP_PORT=587
- SMTP_SSL=true
- SMTP_USERNAME=<sender_username>
- SMTP_PASSWORD=<sender_password>
- ADMIN_TOKEN=<admin token>
volumes:
- ./bw-data:/data
caddy:
image: caddy:2
container_name: caddy
restart: always
ports:
- 80:80 # Needed for the ACME HTTP-01 challenge.
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy-config:/config
- ./caddy-data:/data
environment:
- DOMAIN=<domain_name>
- EMAIL=<[email protected]> # The email address to use for ACME registration.
- LOG_FILE=/data/access.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment