From 8960ae0ff47e13e5fc4f54bf43d6405c6c2d1fc2 Mon Sep 17 00:00:00 2001 From: perfectra1n Date: Wed, 10 Dec 2025 13:53:56 -0800 Subject: [PATCH] feat(docs): update docs about auto-generated admin password --- README.md | 22 +++++++++++++++++++--- docs/getting-started/installation.md | 25 ++++++++++++++----------- docs/getting-started/quickstart.md | 20 ++++++++++++++------ docs/index.md | 2 +- docs/installation.md | 22 +++++++++++++++++++--- docs/user-guide.md | 2 +- docs/user-management-guide.md | 2 +- 7 files changed, 69 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index c9bd1fc..97a78d1 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,27 @@ docker compose up --build -d open http://localhost:8000 ``` -**Default login credentials:** +**Admin credentials:** - Username: `admin` -- Password: `readur2024` +- Password: Auto-generated on first run (check container logs) -> ⚠️ **Important**: Change the default admin password immediately after first login! +On first startup, Readur generates a secure admin password and displays it in the logs: +``` +============================================== + READUR ADMIN USER CREATED +============================================== + +Username: admin +Password: [your-generated-password] + +⚠️ SAVE THESE CREDENTIALS IMMEDIATELY! +⚠️ This password will not be shown again. +============================================== +``` + +View the logs with: `docker compose logs readur` + +To reset the admin password later, run: `readur reset-admin-password` ## 📚 Documentation diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 713d59c..1ea223b 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -225,17 +225,20 @@ docker logs -f readur http://localhost:8000 ``` -2. **Login with Default Credentials** +2. **Login with Admin Credentials** - Username: `admin` - - Password: `readur2024` - - ⚠️ **Security**: Change the admin password immediately after first login + - Password: Check the container logs for your auto-generated password -3. **Change Admin Password** - - Navigate to Settings → User Management - - Click on admin user - - Set a strong password - - Save changes + On first startup, Readur generates a secure admin password and displays it in the logs. + View the logs with `docker compose logs readur` and look for "READUR ADMIN USER CREATED". + + **Save this password immediately - it won't be shown again.** + +3. **Resetting Admin Password** + If you lose your password, reset it with: + ```bash + docker exec readur readur reset-admin-password + ``` ### Essential Configuration @@ -484,10 +487,10 @@ deploy: Upload your first document: ```bash -# 1. Login to get token +# 1. Login to get token (use your generated password from the logs) TOKEN=$(curl -s -X POST http://localhost:8000/api/auth/login \ -H "Content-Type: application/json" \ - -d '{"username":"admin","password":"readur2024"}' | jq -r .token) + -d '{"username":"admin","password":"YOUR_GENERATED_PASSWORD"}' | jq -r .token) # 2. Upload a PDF curl -X POST http://localhost:8000/api/documents/upload \ diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md index 8507f0d..6ed667e 100644 --- a/docs/getting-started/quickstart.md +++ b/docs/getting-started/quickstart.md @@ -39,9 +39,11 @@ Open your browser and navigate to: http://localhost:8000 ``` -Login with default credentials: +Login with your admin credentials: - **Username**: `admin` -- **Password**: `readur2024` +- **Password**: Check the container logs for the auto-generated password + +On first startup, Readur generates a secure admin password and displays it in the logs. View the logs with `docker-compose logs` and look for the "READUR ADMIN USER CREATED" section. Save this password immediately - it won't be shown again. ### Step 4: Upload Your First Document @@ -54,10 +56,10 @@ Now you can test Readur's core functionality by uploading a document. Click the If you prefer working with APIs or want to automate document uploads, you can use Readur's REST API. First, authenticate to get an access token: ```bash -# Authenticate and get a session token +# Authenticate and get a session token (use your generated password from the logs) TOKEN=$(curl -s -X POST http://localhost:8000/api/auth/login \ -H "Content-Type: application/json" \ - -d '{"username":"admin","password":"readur2024"}' | jq -r .token) + -d '{"username":"admin","password":"YOUR_GENERATED_PASSWORD"}' | jq -r .token) # Upload a document using the API curl -X POST http://localhost:8000/api/documents/upload \ @@ -73,9 +75,15 @@ Once the OCR indicator shows green (processing complete), you can test Readur's ## Common First Tasks -### Change Admin Password +### Resetting Admin Password -Security should be your first priority after getting Readur running. The default admin password is publicly documented, so change it immediately to protect your installation. Navigate to **Settings** → **User Management**, click on the admin user entry, enter a strong new password, and save your changes. This single step prevents unauthorized access to your document collection. +If you lose your admin password or need to reset it, you can use the built-in CLI command: + +```bash +docker exec readur readur reset-admin-password +``` + +This generates a new secure password and displays it. You can also set a specific password using the `ADMIN_PASSWORD` environment variable. ### Add Your First Source diff --git a/docs/index.md b/docs/index.md index 3d5537e..0ef6f80 100644 --- a/docs/index.md +++ b/docs/index.md @@ -90,7 +90,7 @@ docker-compose up -d open http://localhost:8000 ``` -Log in with the default credentials (admin / readur2024) and change the password immediately. Then upload a document and watch Readur extract the text automatically. +Check the container logs (`docker compose logs readur`) for your auto-generated admin password - look for "READUR ADMIN USER CREATED" and save the password immediately. Log in with username `admin` and your generated password, then upload a document and watch Readur extract the text automatically. ## How People Use Readur diff --git a/docs/installation.md b/docs/installation.md index 53162e3..6014142 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -28,11 +28,27 @@ docker compose up --build -d open http://localhost:8000 ``` -**Default login credentials:** +**Admin credentials:** - Username: `admin` -- Password: `readur2024` +- Password: Auto-generated on first run (check container logs) -> ⚠️ **Important**: Change the default admin password immediately after first login! +On first startup, Readur generates a secure admin password and displays it in the logs: +``` +============================================== + READUR ADMIN USER CREATED +============================================== + +Username: admin +Password: [your-generated-password] + +⚠️ SAVE THESE CREDENTIALS IMMEDIATELY! +⚠️ This password will not be shown again. +============================================== +``` + +View the logs with: `docker compose logs readur` + +To reset the admin password later, run: `readur reset-admin-password` ### What You Get diff --git a/docs/user-guide.md b/docs/user-guide.md index 55ecb6a..4a2fe9a 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -21,7 +21,7 @@ This guide walks you through everything you need to know to effectively use Read ## Getting Started -When you first access Readur, navigate to your installation URL (typically `http://localhost:8000` for local installations) and log in with the default admin credentials: username `admin` and password `readur2024`. The very first thing you should do is change this default password to something secure. +When you first access Readur, navigate to your installation URL (typically `http://localhost:8000` for local installations) and log in with the admin credentials. The username is `admin` and the password is auto-generated on first startup - check your container logs (`docker compose logs readur`) and look for "READUR ADMIN USER CREATED" to find your password. Save this password immediately as it won't be shown again. Take a moment to configure your user preferences through the settings menu. If you work with documents in languages other than English, set your preferred OCR language now - this will improve text extraction accuracy for your documents. You can also adjust search settings and display preferences to match how you like to work. diff --git a/docs/user-management-guide.md b/docs/user-management-guide.md index 214aa88..50ebb13 100644 --- a/docs/user-management-guide.md +++ b/docs/user-management-guide.md @@ -104,7 +104,7 @@ See the [OIDC Setup Guide](oidc-setup.md) for detailed configuration instruction **Default Admin Account:** - Username: `admin` -- Default Password: `readur2024` ⚠️ **Change immediately in production!** +- Password: Auto-generated on first startup (check container logs for "READUR ADMIN USER CREATED") ## Admin User Management