Bitwarden · Vaultwarden · Docker · Cloudflare Tunnel · Self-Hosted · Security
Overview
A self-hosted Bitwarden password manager server deployed through Docker Compose and Cloudflare Tunnel. The host opens no inbound ports and the host IP is not exposed. All encryption and decryption happens on the client side; the server stores only ciphertext (zero-knowledge architecture), so the vault security is identical across all three deployment options. Vaultwarden (community edition) is the default recommendation: it is compatible with all official Bitwarden clients, has the lowest resource footprint, and all features are free. The official Lite and Standard editions are available for situations that require official vendor support or organizational compliance guarantees.Core features
- Cloudflare Tunnel reverse tunnel: no inbound ports, host IP not exposed
- Cloudflare Edge handles TLS termination, WAF, and DDoS protection; no self-managed certificates needed
- Three configurations covering personal, small-team, and organizational needs, each with a separate Docker Compose file and environment variable template
- Compatible with all official Bitwarden clients (desktop, browser extension, mobile)
- Vaultwarden Admin Panel included, with optional Cloudflare Access restriction
- Client-side encryption: zero-knowledge architecture, the server never sees plaintext passwords
Architecture
bitwarden-server
docker-compose.yml · Vaultwarden (default) + Cloudflared
.env.template · environment variable template
lite · official Lite edition
docker-compose.yml
.env.template
standard · official Standard edition (microservices, 10 containers)
docker-compose.yml
.env.template
Configuration options
Quick start
1
Configure the Cloudflare Tunnel
Create a tunnel in the Zero Trust dashboard and copy the Tunnel Token. Set the Public Hostname service URL to the container name (e.g.
http://bitwarden:80), not localhost.2
Set environment variables
3
Start the service
cd into the lite/ or standard/ directory first, then run the same command.4
Configure the client
Open an official Bitwarden client, enter your self-hosted server’s Cloudflare URL in the server settings, then create an account and sign in.
Notes
In practice
Suited for individuals or small teams who want full control over their vault data without relying on a third-party cloud service. The Cloudflare Tunnel makes an instance running on a NAS or home server securely reachable from anywhere, without firewall rules or a static IP.Links
- GitHub: felimet/bitwarden-server
- Vaultwarden project: github.com/dani-garcia/vaultwarden
- Cloudflare Tunnel docs: developers.cloudflare.com/cloudflare-one/connections/connect-networks
- Bitwarden self-host docs: bitwarden.com/help/self-host-an-organization