Created Reset Admin Password (Offline Tool) (markdown)

rustmailer
2026-01-22 13:54:49 +08:00
parent 6717b60523
commit eb055c8835
+117
@@ -0,0 +1,117 @@
This guide explains how to reset the **admin login password** for Bichon.
⚠️ **This recovery tool is NOT included in the Docker image.**
It is distributed **together with `bichonctl` inside the official release archive**,
and must be executed manually on the host system.
You can download it from the **GitHub Releases** page.
---
## Important Notice
* This tool **does NOT stop bichon-service automatically**
* You must stop the service manually before running it
* The database cannot be opened while the service is running
```bash
docker stop bichon
```
or:
```bash
docker compose down
```
---
## Requirements
* Access to the host machine
* Bichon release package (same archive as `bichonctl`)
* Original database encryption password
---
## Locate `bichon_root_dir`
This is the directory mounted into Docker.
The directory must contain:
```
meta.db
```
---
## Run the Tool
Ensure that `bichon-admin` is on the **same machine** where `meta.db` resides, so it can access the database file.
Extract the release archive:
```bash
tar -xzf bichon-<version>-linux-amd64.tar.gz
```
Run the tool:
```bash
./bichon-admin
```
The tool will prompt you for the absolute path to `bichon_root_dir` (the directory containing `meta.db`).
It must be able to read and write `meta.db` for the password reset to succeed.
---
## Reset Procedure
1. Select **Reset Admin Password**
2. Enter absolute path of `bichon_root_dir`
3. Provide the database encryption key
(same value used by the server)
4. Confirm admin account information
5. Enter the new admin password
6. Confirm database update
On success:
```
Success! Admin password has been updated.
```
---
## Restart Service
```bash
docker start bichon
```
or:
```bash
docker compose up -d
```
Log in using the new admin password.
---
## Common Errors
### DatabaseAlreadyOpen
**Cause:** bichon-service is still running
**Fix:** stop the service before executing the tool.
---
### Decryption failed
**Cause:** incorrect encryption password
**Fix:** use the same encryption key configured during initialization.