# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview Simple Vaultwarden Docker setup for migration from old VM to new VM. Project path on new system: `/opt/projects/vaultwarden-docker` ## Critical Data Files in vw-data/ - `db.sqlite3` - Database (all accounts, vaults, encrypted passwords) - `rsa_key.*` - Encryption keys (CRITICAL - loss = unrecoverable data) - `attachments/` - File attachments - `icon_cache/` - Website icons **SECURITY**: Never commit vw-data/, .env, or any sensitive files. ## Initial Setup ```bash # Create .env from example cp .env.example .env # Generate admin token openssl rand -base64 48 # Set proper ownership for data directory sudo chown -R 1000:1000 vw-data ``` Edit `.env` and set DOMAIN and ADMIN_TOKEN. ## Commands ```bash # Start docker compose up -d # Logs docker compose logs -f # Stop docker compose down # Restart docker compose restart # Status docker compose ps # Check DB integrity docker compose exec vaultwarden sqlite3 /data/db.sqlite3 "PRAGMA integrity_check;" ``` ## Migration Notes - DOMAIN in .env must match old VM (for session preservation) - Volume maps ./vw-data to /data in container - Ports: 8080 (HTTP), 3012 (Websocket) - After migration, verify DB integrity and test login before shutting down old VM