|
| 1 | +# KeePass + LastPass Docker Compose Usage |
| 2 | + |
| 3 | +This directory provides a ready-to-use Docker Compose setup for exporting your LastPass vault and converting it to a KeePass database, with all scripts and binaries included in the official image. |
| 4 | + |
| 5 | +## Quick Start |
| 6 | + |
| 7 | +1. **Enter the directory:** |
| 8 | + ```sh |
| 9 | + cd keepass |
| 10 | + ``` |
| 11 | + |
| 12 | +2. **Export your LastPass vault:** |
| 13 | + - With interactive email prompt: |
| 14 | + ```sh |
| 15 | + docker compose run --rm lastpass-export |
| 16 | + ``` |
| 17 | + - Or by passing your email as a parameter: |
| 18 | + ```sh |
| 19 | + docker compose run --rm lastpass-export your@email.com |
| 20 | + ``` |
| 21 | + This will prompt for your LastPass password and export your vault to the `backup/` folder. |
| 22 | + |
| 23 | +3. **Convert the exported data to a KeePass database:** |
| 24 | + ```sh |
| 25 | + docker compose run --rm lastpass-processor |
| 26 | + ``` |
| 27 | + By default, this will: |
| 28 | + - Read the JSON export from `backup/lastpass-backup.json` |
| 29 | + - Use attachments from `backup/attachments/` |
| 30 | + - Write the KeePass database to `output/lastpass-export.kdbx` |
| 31 | + - All logs will be saved in `output/logs/` |
| 32 | + |
| 33 | + You can override the output file name by running the provided script `run_me.sh` and entering a custom name when prompted. |
| 34 | + |
| 35 | +4. **Manual/Debug Shell:** |
| 36 | + ```sh |
| 37 | + docker compose run --rm -it --entrypoint /bin/bash lastpass-cli |
| 38 | + ``` |
| 39 | + This gives you a shell inside the container with all tools and volumes mounted for advanced/manual operations. |
| 40 | + |
| 41 | +## Options and Defaults |
| 42 | + |
| 43 | +- **lastpass-export** |
| 44 | + - Argument: `[email@address.dom]` (optional) |
| 45 | + - If not provided, you will be prompted interactively. |
| 46 | + - Output: `backup/` directory (created if missing) |
| 47 | + |
| 48 | +- **lastpass-processor** |
| 49 | + - No arguments needed by default. |
| 50 | + - Reads: `backup/lastpass-backup.json` and `backup/attachments/` |
| 51 | + - Writes: `output/lastpass-export.kdbx` (default) |
| 52 | + - Logs: `output/logs/` |
| 53 | + - To change the output file name, use the `run_me.sh` script and enter a custom name when prompted. |
| 54 | + |
| 55 | +- **lastpass-cli** |
| 56 | + - Opens a bash shell for manual use. All volumes are mounted (`backup/`, `output/`). |
| 57 | + |
| 58 | +## Provided Script |
| 59 | + |
| 60 | +- `run_me.sh`: Interactive helper script to guide you through the full export and conversion process, allowing you to set the output KeePass file name (default: `lastpass-export.kdbx`). |
| 61 | + |
| 62 | +## Requirements |
| 63 | +- Docker and Docker Compose installed on your system. |
| 64 | + |
| 65 | +--- |
| 66 | +For advanced usage, you can pass additional arguments to the scripts inside the container using the manual shell. |
0 commit comments