docs: update README configuration section to reflect .env-based setup

- Replace config.yml references with .env variables
- Document single-quote requirement for AUTH_PASSWORD_HASH
- Fix dev mode setup to copy from root .env.example
This commit is contained in:
Pouzor
2026-03-09 11:57:11 +01:00
parent 5078f4af92
commit 2de5a5b3aa
+16 -13
View File
@@ -18,9 +18,11 @@ docker compose up -d
Open **http://localhost:3000** — login with `admin` / `admin`. Open **http://localhost:3000** — login with `admin` / `admin`.
> Change the password before exposing to a network: edit `backend/config.yml` and replace `password_hash` with a new bcrypt hash. > Change the password before exposing to a network: edit `.env` and update `AUTH_USERNAME` / `AUTH_PASSWORD_HASH`.
> >
> Generate a hash: `docker compose exec backend python -c "from passlib.context import CryptContext; print(CryptContext(schemes=['bcrypt']).hash('yourpassword'))"` > Generate a new hash: `docker compose exec backend python -c "from passlib.context import CryptContext; print(CryptContext(schemes=['bcrypt']).hash('yourpassword'))"`
>
> ⚠️ Keep the single quotes around the hash value in `.env` — bcrypt hashes contain `$` characters that Docker Compose would otherwise misinterpret.
--- ---
@@ -38,19 +40,20 @@ This installs the backend as a systemd service and serves the frontend via nginx
## Configuration ## Configuration
`backend/config.yml`: All configuration is done via `.env` (copied from `.env.example`):
```yaml ```env
auth: SECRET_KEY=change_me_in_production
username: admin
password_hash: "$2b$12$..." # bcrypt hash
scanner: # Auth — default: admin / admin
ranges: AUTH_USERNAME=admin
- "192.168.1.0/24" # CIDR ranges to scan AUTH_PASSWORD_HASH='$2b$12$...' # bcrypt hash — keep single quotes
status_checker: # CIDR ranges to scan
interval_seconds: 60 # how often to check node status SCANNER_RANGES=["192.168.1.0/24"]
# How often to check node status (seconds)
STATUS_CHECKER_INTERVAL=60
``` ```
All settings are also editable in-app via the **Scan Network** button. All settings are also editable in-app via the **Scan Network** button.
@@ -130,7 +133,7 @@ Proxmox nodes render as a resizable group container. VM and LXC nodes can be pla
cd backend cd backend
python3.13 -m venv .venv && source .venv/bin/activate python3.13 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt pip install -r requirements.txt
cp .env.example .env # edit SECRET_KEY cp ../.env.example .env # edit SECRET_KEY and review defaults
uvicorn app.main:app --reload --port 8000 uvicorn app.main:app --reload --port 8000
``` ```