armbian docker 部署 homeassistant && 忘记密码重置密码

复制代码
docker run -d \
--name homeassistant \
--privileged \
--restart=unless-stopped \
-e TZ=MY_TIME_ZONE \
-v /etc/docker/ha:/config \
-v /run/dbus:/run/dbus:ro \
-p 8123:8123 \
ghcr.io/home-assistant/home-assistant:stable

重置用户的密码,通过容器命令行

如果您在容器中运行"家庭助理",则可以使用容器中的命令行和命令来更改密码。以下步骤是指 Docker 中名为 的 Home Assistant 容器。请注意,在容器中工作时,命令需要一些时间才能执行。hass``homeassistant

  1. docker exec -it homeassistant bash打开到容器命令行
  2. hass创建默认用户(如果这是您首次使用该工具)
  3. hass --script auth --config /config change_password existing_user new_password更改密码
  4. exit退出容器命令行
  5. docker restart homeassistant重新启动容器。

用户名密码存放位置

复制代码
find / -name auth_provider.homeassistant
/config/.storage/auth_provider.homeassistant


cat /config/.storage/auth_provider.homeassistant
{
  "version": 1,
  "minor_version": 1,
  "key": "auth_provider.homeassistant",
  "data": {
    "users": [
      {
        "username": "******",
        "password": "**********************************************************************"
      }
    ]
  }
}
~
~

重置密码

复制代码
docker exec -it homeassistant /bin/bash

hass --script auth --config /config change_password 用户名 新密码
相关推荐
cpolar技术支持18 小时前
用一份 YAML 画出家里的网络拓扑:哪个口通公网、哪几个容器藏在内网,一张图摊开,再用 cpolar 在外网随时翻这份图
docker·网络拓扑·内网穿透·cpolar·yaml
FriendshipT1 天前
YOLOE Docker 部署实战:三模式推理、掩码输出与跨图视觉的完整实现
运维·人工智能·python·深度学习·docker·容器
the局外人1 天前
Docker 部署:从镜像构建到容器上线
后端·docker·容器
方便面不加香菜2 天前
Docker Compose 文件 -- docker-compose.yml
spring cloud·docker·容器
lambo mercy2 天前
04Docker_Container_容器
docker
Wellijohn2 天前
Docker 瘦身、手写 MCP、异步并发:被问得最多的 12 个问题,一次答完
python·docker·mcp
隔窗听雨眠3 天前
KWDB容器化部署的形态选择与参数细节
docker·时序数据库·kwdb
SeanQhl3 天前
openEuler 下 Docker 镜像操作与多阶段构建瘦身
docker·容器·镜像·openeuler·dockerfile
新*3 天前
ES 7.17 三节点 Docker 集群的自动备份:从 NFS 被拦住到用 ACL 根治权限
运维·elasticsearch·docker·slm·快照备份
Wellijohn3 天前
Docker 镜像从 1.2GB 压到 180MB:按这个顺序改,别一上来就 multistage
docker