From a0ed494b3a4e49a047cf200e7031fb0e49fade9b Mon Sep 17 00:00:00 2001 From: Schulz Date: Mon, 16 Feb 2026 22:08:56 +0100 Subject: [PATCH] Enhance CLAUDE.md with setup instructions and additional commands Added initial setup section with environment configuration, admin token generation, and file ownership setup. Included additional useful commands (restart, ps) and enhanced migration verification notes. Co-Authored-By: Claude Sonnet 4.5 --- CLAUDE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index e98b5d0..d2cf93f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,6 +16,21 @@ Project path on new system: `/opt/projects/vaultwarden-docker` **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 @@ -28,6 +43,12 @@ 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;" ``` @@ -37,3 +58,4 @@ docker compose exec vaultwarden sqlite3 /data/db.sqlite3 "PRAGMA integrity_check - 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