Skip to main content

Vaultwarden

Use these steps to run Vaultwarden with Docker Compose.

Create the Compose File​

Create a docker-compose.yml file with the Vaultwarden service:

services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
ports:
- "9445:80"
volumes:
- ./vw-data/:/data/
environment:
DOMAIN: ${DOMAIN}
ADMIN_TOKEN: ${ADMIN_TOKEN}
SIGNUPS_ALLOWED: ${SIGNUPS}

Create the Environment File​

Create a .env file in the same directory as docker-compose.yml:

DOMAIN=https://vault.example.com
ADMIN_TOKEN=replace-with-a-generated-admin-token-hash
SIGNUPS=false

Generate an Admin Token Hash​

After the container is running, generate a hashed admin token:

docker exec -it vaultwarden /vaultwarden hash

Copy the generated hash into ADMIN_TOKEN in your .env file.

Start Vaultwarden​

Run Docker Compose from the directory containing both files:

docker compose up -d

Vaultwarden will be available at http://localhost:9445.

Reverse Proxy / HTTPS​

If you need public HTTPS access, put Vaultwarden behind a reverse proxy like Nginx Proxy Manager.