diff --git a/README.md b/README.md index fde296b..6c242b5 100644 --- a/README.md +++ b/README.md @@ -61,12 +61,14 @@ NextWks/ ### Prerequisites -- Go 1.22+ -- Authelia v4.38 (install with `bash scripts/install-authelia.sh`) +- Linux (amd64) — tested on Debian/Ubuntu, Proxmox LXC +- Go 1.22+ (installed automatically if missing) +- `git`, `curl`, `openssl` (standard tools) -### Production Install (recommended) +### Production Install ```bash +# One command — downloads, builds, deploys curl -fsSL https://git.lohmar.co.uk/lexton-it/NextWks/raw/main/install.sh | bash ``` diff --git a/install.sh b/install.sh index 14859d1..adf9235 100755 --- a/install.sh +++ b/install.sh @@ -381,6 +381,8 @@ AUTHEOF # Create initial users_database.yml (needed for Authelia to start) if [ ! -f "${AUTHELIA_DIR}/users_database.yml" ]; then info "Creating initial users database..." + # Remove old DB if encryption key changed + find "${AUTHELIA_DIR}/db.sqlite3" -delete 2>/dev/null || true ADMIN_HASH=$("${AUTHELIA_DIR}/authelia" crypto hash generate --password "$(openssl rand -base64 16)" 2>/dev/null | awk '{print $NF}' || echo "\$argon2id\$v=19\$m=65536,t=3,p=4\$placeholder") cat > "${AUTHELIA_DIR}/users_database.yml" << USERSDB users: