d86e25662f
Vaultwarden treats defined-but-empty SMTP_HOST/SMTP_FROM as "set"; with upstream _enable_smtp defaulting true its validation errors out and the container crash-loops on every fresh deploy with app-email off (the default). Gate the SMTP group with _ENABLE_SMTP: compose default false (clean boot, mail off), flipped "true" by the app-email injection via smtp_mapping.extra. Proven on the pinned 1.33.2-alpine image (P1 repro exit 12 / P2 off boots / P3 on boots). REUSE.md: strict-image TRAP row. Sweep note: the other 5 smtp-mapped templates are campaign-boot-proven tolerant; no edits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
75 lines
2.9 KiB
YAML
75 lines
2.9 KiB
YAML
# Vaultwarden - Password Manager (Bitwarden-compatible)
|
|
# Domain: ${SUBDOMAIN}.${DOMAIN}
|
|
# Database: None (SQLite, built-in)
|
|
# RAM: ~50MB (mem_limit: 256M) | Pi-compatible: Yes
|
|
#
|
|
# Environment variables:
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
# ADMIN_TOKEN - Admin panel token (auto-generated)
|
|
# SIGNUPS_ALLOWED - Set to "false" after creating your account(s)
|
|
#
|
|
# First-time setup:
|
|
# 1. Visit https://${SUBDOMAIN}.${DOMAIN} and create an account
|
|
# 2. Set SIGNUPS_ALLOWED=false via the controller
|
|
# 3. Admin panel at https://${SUBDOMAIN}.${DOMAIN}/admin (if ADMIN_TOKEN set)
|
|
#
|
|
# Clients:
|
|
# Use any Bitwarden client (desktop, mobile, browser extension)
|
|
# Set server URL to: https://${SUBDOMAIN}.${DOMAIN}
|
|
|
|
services:
|
|
vaultwarden:
|
|
image: vaultwarden/server:1.33.2-alpine
|
|
container_name: vaultwarden
|
|
restart: unless-stopped
|
|
environment:
|
|
- DOMAIN=https://${SUBDOMAIN}.${DOMAIN}
|
|
- SIGNUPS_ALLOWED=${SIGNUPS_ALLOWED:-true}
|
|
- ADMIN_TOKEN=${ADMIN_TOKEN:-}
|
|
- WEBSOCKET_ENABLED=true
|
|
- TZ=Europe/Budapest
|
|
# App-email (managed relay). Injected by the controller only when app-email is on
|
|
# (global + per-app); see .felhom.yml smtp_mapping.
|
|
# TRAP (campaign finding F1, 2026-07-06): Vaultwarden treats a defined-but-EMPTY env var as
|
|
# "set" — with SMTP_HOST/SMTP_FROM both defined-empty its config validation errors out and
|
|
# the container crash-loops. The whole SMTP group is therefore gated by _ENABLE_SMTP
|
|
# (default false = validation skipped, mail off); the controller's app-email injection flips
|
|
# it to true via smtp_mapping.extra. Note: a config.json saved from the admin panel would
|
|
# override these env values — not applicable to fresh deploys.
|
|
- _ENABLE_SMTP=${_ENABLE_SMTP:-false}
|
|
- SMTP_HOST=${SMTP_HOST:-}
|
|
- SMTP_PORT=${SMTP_PORT:-587}
|
|
- SMTP_SECURITY=${SMTP_SECURITY:-off}
|
|
- SMTP_FROM=${SMTP_FROM:-}
|
|
- SMTP_FROM_NAME=${SMTP_FROM_NAME:-}
|
|
- SMTP_ACCEPT_INVALID_CERTS=${SMTP_ACCEPT_INVALID_CERTS:-false}
|
|
- SMTP_ACCEPT_INVALID_HOSTNAMES=${SMTP_ACCEPT_INVALID_HOSTNAMES:-false}
|
|
volumes:
|
|
- vaultwarden_data:/data
|
|
networks:
|
|
- traefik-public
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:80/alive"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.vaultwarden.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
|
- "traefik.http.routers.vaultwarden.entrypoints=websecure"
|
|
- "traefik.http.routers.vaultwarden.tls=true"
|
|
- "traefik.http.routers.vaultwarden.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.vaultwarden.loadbalancer.server.port=80"
|
|
|
|
volumes:
|
|
vaultwarden_data:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|