From 16c4cc73abf170eafbabbf4eb0e62be92e61e78b Mon Sep 17 00:00:00 2001 From: xizhuomengcontin Date: Tue, 15 Sep 2026 16:21:42 +0800 Subject: [PATCH] docs: name the dashboard host/port environment variables and their precedence --- astrbot/dashboard/server.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/astrbot/dashboard/server.py b/astrbot/dashboard/server.py index 01388ddd34..8c4fb298ea 100644 --- a/astrbot/dashboard/server.py +++ b/astrbot/dashboard/server.py @@ -510,6 +510,14 @@ def _resolve_dashboard_ssl_config( def run(self): ip_addr = [] dashboard_config = self.core_lifecycle.astrbot_config.get("dashboard", {}) + # Environment beats config for both. Each accepts two names -- the unprefixed one first, + # then the ASTRBOT_-prefixed one -- so DASHBOARD_HOST wins over ASTRBOT_DASHBOARD_HOST if + # both are set. Unset everywhere, the dashboard binds 0.0.0.0:6185, i.e. every interface. + # + # The host chain is also read by AuthService.can_skip_default_password_auth, which only + # allows that skip when the resolved host is 127.0.0.1, localhost or ::1. So these + # variables decide where the dashboard listens and, indirectly, whether the default + # password gate can be waived. port = ( os.environ.get("DASHBOARD_PORT") or os.environ.get("ASTRBOT_DASHBOARD_PORT")