[PR #1245] [MERGED] Add config options to initialize admin user on first run without prompting #1362

Closed
opened 2026-03-01 14:49:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1245
Author: @benmuth
Created: 10/14/2023
Status: Merged
Merged: 10/18/2023
Merged by: @pirate

Base: devHead: add-user-env-vars


📝 Commits (5)

  • 11d473e Add config options to add admin user on first run
  • 44a9415 Remove logging of configured username and password
  • 521ea70 Add check for existing user, change varable names
  • 9e6a871 Fix formatting, logging, logic issues
  • d286dca better to log before doing a thing than after

📊 Changes

2 files changed (+11 additions, -5 deletions)

View changed files

📝 archivebox/config.py (+2 -0)
📝 archivebox/main.py (+9 -5)

📄 Description

Summary

This adds the option to create an admin user on initialization without prompting. The configuration options ARCHIVEBOX_USERNAME and ARCHIVEBOX_PASSWORD are only checked on first initialization (if there's no index.sqlite3 file). The admin user is only created if both options are present.

I'm not sure if there are some other use cases that exist that are not covered by this implementation, please let me know if so.

Related issues

#734

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1245 **Author:** [@benmuth](https://github.com/benmuth) **Created:** 10/14/2023 **Status:** ✅ Merged **Merged:** 10/18/2023 **Merged by:** [@pirate](https://github.com/pirate) **Base:** `dev` ← **Head:** `add-user-env-vars` --- ### 📝 Commits (5) - [`11d473e`](https://github.com/ArchiveBox/ArchiveBox/commit/11d473e536e080a539ab738db0dd93c335dfae2c) Add config options to add admin user on first run - [`44a9415`](https://github.com/ArchiveBox/ArchiveBox/commit/44a94157beaa319f04efacd06a7a20daf7443e6f) Remove logging of configured username and password - [`521ea70`](https://github.com/ArchiveBox/ArchiveBox/commit/521ea70e0cdf209dde850661e17a6bb3de3e9d34) Add check for existing user, change varable names - [`9e6a871`](https://github.com/ArchiveBox/ArchiveBox/commit/9e6a87114b4b550e814856a00d1ab38bb030b2cc) Fix formatting, logging, logic issues - [`d286dca`](https://github.com/ArchiveBox/ArchiveBox/commit/d286dca925fc0f96ba1d7fbb04961b2783283022) better to log before doing a thing than after ### 📊 Changes **2 files changed** (+11 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `archivebox/config.py` (+2 -0) 📝 `archivebox/main.py` (+9 -5) </details> ### 📄 Description <!-- IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes. --> # Summary This adds the option to create an admin user on initialization without prompting. The configuration options `ARCHIVEBOX_USERNAME` and `ARCHIVEBOX_PASSWORD` are only checked on first initialization (if there's no `index.sqlite3` file). The admin user is only created if both options are present. I'm not sure if there are some other use cases that exist that are not covered by this implementation, please let me know if so. <!--e.g. This PR fixes ABC or adds the ability to do XYZ...--> # Related issues <!-- e.g. #123 or Roadmap goal # https://github.com/pirate/ArchiveBox/wiki/Roadmap --> #734 # Changes these areas - [ ] Bugfixes - [ ] Feature behavior - [ ] Command line interface - [x] Configuration options - [ ] Internal architecture - [ ] Snapshot data layout on disk --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 14:49:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#1362
No description provided.