Skip to content

Commit 774cc94

Browse files
docs: name the dashboard host/port environment variables and their precedence (#10095)
1 parent b13338d commit 774cc94

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎astrbot/dashboard/server.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,14 @@ def _resolve_dashboard_ssl_config(
621621
def run(self):
622622
ip_addr = []
623623
dashboard_config = self.core_lifecycle.astrbot_config.get("dashboard", {})
624+
# Environment beats config for both. Each accepts two names -- the unprefixed one first,
625+
# then the ASTRBOT_-prefixed one -- so DASHBOARD_HOST wins over ASTRBOT_DASHBOARD_HOST if
626+
# both are set. Unset everywhere, the dashboard binds 0.0.0.0:6185, i.e. every interface.
627+
#
628+
# The host chain is also read by AuthService.can_skip_default_password_auth, which only
629+
# allows that skip when the resolved host is 127.0.0.1, localhost or ::1. So these
630+
# variables decide where the dashboard listens and, indirectly, whether the default
631+
# password gate can be waived.
624632
port = (
625633
os.environ.get("DASHBOARD_PORT")
626634
or os.environ.get("ASTRBOT_DASHBOARD_PORT")

0 commit comments

Comments
 (0)