Repository navigation
feat: ship astrbot CLI in Docker image for in-container password reset - #10442
Merged
Merged
Conversation
Install the project itself into the image so the `astrbot` console
script (including `astrbot password` and `astrbot conf set`) is
available inside the container, and mark /AstrBot as an initialized
AstrBot root via the .astrbot marker file.
This lets Docker users reset a forgotten dashboard password with:
docker exec -it astrbot astrbot password
Document the workflow in the zh/en Docker deployment guides, including
the required container restart for the new password to take effect.
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. The image now exposes a command that can persistently change the dashboard username and password, so a faulty packaging or CLI interaction could lock users out or alter authentication state in a way that reverting the image would not undo. Docker exec access limits who can invoke it, but the credential change itself outlives a revert.
Split the forgot-password FAQ entry into Docker, uv/pip package, and other deployment subsections. The Docker entry uses the in-container CLI shipped with the image; the uv/pip entry covers `astrbot password` and `astrbot run --reset-password`; the manual cmd_config.json edit remains as the universal fallback.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
astrbot-docs | 2d99044 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 03:41 PM |
Install the project with 'uv pip install -e .' so the astrbot console script always reflects the source tree baked into the image, avoiding drift between the CLI and the running server code.
9 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uv pip install -e . --no-deps) in the Docker image so theastrbotconsole script is available inside the container/AstrBot/.astrbotmarker so the CLI recognizes the container working directory as an initialized AstrBot rootMotivation
The
astrbot password/astrbot conf set dashboard.passwordcommands already existed, but the Docker image only installed third-party dependencies, not the project itself, so there was noastrbotentrypoint in the container. Additionally,.astrbotis excluded by.dockerignore, so the CLI refused to run with "not a valid AstrBot root directory".Docker users can now reset a forgotten dashboard password with:
Verification
Built the image locally and verified end-to-end in a running container:
which astrbot->/usr/local/bin/astrbot;/AstrBot/.astrbotexistsdocker exec -i <c> astrbot passwordwritespbkdf2_password+ legacy md5 hash todata/cmd_config.jsonand clearspassword_change_required/ setspassword_storage_upgradeddocker restart,POST /api/auth/loginwith the new password returns a JWT (wrong password is rejected)Image size impact is minimal (a small
.pth-based editable install pointing back to the baked-in source tree; deps are not reinstalled thanks to--no-deps). The editable install keeps the CLI in sync with the server code shipped in the image, so the two never drift apart within one image build.Summary by Sourcery
Enable dashboard password resets from Docker containers and document the workflow across deployment guides and FAQs.
New Features:
Build:
Documentation: