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 <noreply@anthropic.com>
This commit is contained in:
Schulz 2026-02-16 22:08:56 +01:00
parent bbfbc56a2c
commit a0ed494b3a
1 changed files with 22 additions and 0 deletions

View File

@ -16,6 +16,21 @@ Project path on new system: `/opt/projects/vaultwarden-docker`
**SECURITY**: Never commit vw-data/, .env, or any sensitive files. **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 ## Commands
```bash ```bash
@ -28,6 +43,12 @@ docker compose logs -f
# Stop # Stop
docker compose down docker compose down
# Restart
docker compose restart
# Status
docker compose ps
# Check DB integrity # Check DB integrity
docker compose exec vaultwarden sqlite3 /data/db.sqlite3 "PRAGMA integrity_check;" 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) - DOMAIN in .env must match old VM (for session preservation)
- Volume maps ./vw-data to /data in container - Volume maps ./vw-data to /data in container
- Ports: 8080 (HTTP), 3012 (Websocket) - Ports: 8080 (HTTP), 3012 (Websocket)
- After migration, verify DB integrity and test login before shutting down old VM