AstrBot icon indicating copy to clipboard operation
AstrBot copied to clipboard

[Bug]强制启用https无需配置证书导致报错关闭

Open 1rua opened this issue 8 months ago • 1 comments

What happened / 发生了什么

系统配置启用https后,若未配置证书则容器会在启动后立即报错关闭,无法进入webui

Reproduce / 如何复现?

系统配置启用https且未配置证书

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

docker部署

OS

Linux

Logs / 报错日志

raise ValueError( ValueError: dashboard.ssl.enable 为 true 时,必须配置 cert_file 和 key_file。 sys:1: RuntimeWarning: coroutine 'AstrBotCoreLifecycle.start' was never awaited

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • [x] Yes!

Code of Conduct

1rua avatar Mar 27 '26 20:03 1rua

Hi @1rua! I'm Dosu and I’m helping the AstrBot team.

这是一个已知问题。当 dashboard.ssl.enable 设置为 true 但未配置证书时,服务器启动会失败。

临时解决方案:编辑 data/cmd_config.json,禁用 SSL:

{
  "dashboard": {
    "ssl": {
      "enable": false
    }
  }
}

PR #5516 已经实现了前后端验证,可以在保存配置时阻止用户设置无效的 SSL 配置。如果你愿意提交 PR,可以参考该 PR 的实现方式添加更优雅的处理逻辑。

To reply, just mention @dosu.


Share context across your team and agents. Try Dosu.

Leave Feedback Learn about AstrBot with Dosu Add Dosu to your team

dosubot[bot] avatar Mar 27 '26 20:03 dosubot[bot]