以无root权限方式运行Home Assistant的Docker镜像,注重安全性、自动更新和优化,基于1000:1000用户运行,支持只读模式、健康检查及CVE扫描,适合家庭自动化场景。
HOMEASSISTANT
无root权限运行Home Assistant
概述 📢https://github.com/home-assistant/core(由https://github.com/home-assistant/开发)是一款开源家庭自动化系统,优先考虑本地控制和隐私保护。由全球爱好者社区支持,适合在树莓派或本地服务器上运行。
用途 📖此镜像能做什么? 提供https://github.com/11notes/RTFM/blob/main/linux/container/image/rootless.md的Home Assistant安装环境。
核心价值 💶为何选择此镜像而非其他现有镜像? 因为:* 以1000:1000用户https://github.com/11notes/RTFM/blob/main/linux/container/image/rootless.md运行* 通过CI/CD自动更新至最新版本* 从源代码构建和编译* 包含健康检查* 支持只读模式运行* 发布前后自动扫描漏洞(CVE)* 通过安全且固定的CI/CD流程创建* 发布前执行基础集成测试(失败则不发布)
若您重视安全性、简洁性和极致优化,此镜像可能适合您。
卷 📁* /homeassistant/etc - 所有配置文件和自定义文件的目录
容器编排示例 ✂️```yamlname: "iot"
x-lockdown: &lockdown
防止对镜像本身的写访问
read_only: true
防止容器内进程获取更多权限
security_opt: - "no-new-privileges=true"
services: postgres: # 有关此镜像的更多信息,请查看: # https://github.com/11notes/docker-postgres image: "docker.xuanyuan.run/11notes/postgres:18" <<: *lockdown environment: TZ: "Europe/Zurich" POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}" networks: backend: volumes: - "postgres.etc:/postgres/etc" - "postgres.var:/postgres/var" - "postgres.backup:/postgres/backup" tmpfs: - "/postgres/run:uid=1000,gid=1000" - "/postgres/log:uid=1000,gid=1000" restart: "always"
homeassistant: depends_on: postgres: condition: "service_healthy" restart: true image: "docker.xuanyuan.run/11notes/homeassistant:2026.5.4" <<: *lockdown environment: TZ: "Europe/Zurich" volumes: - "homeassistant.etc:/homeassistant/etc" tmpfs: # 只读模式和UV缓存所需 - "/homeassistant/tmp:uid=1000,gid=1000" networks: frontend: backend: ports: - "3000:8123/tcp" restart: "always"
volumes: postgres.etc: postgres.var: postgres.backup: homeassistant.etc:
networks: frontend: backend: internal: true
## 默认设置 🗃️| 参数 | 值 | 描述 | | --- | --- | --- | | `user` | docker | 用户名 | | `uid` | 1000 | 用户标识符 | | `gid` | 1000 | 组标识符 | | `home` | /homeassistant | docker用户的主目录 | ## 环境变量 📝| 参数 | 说明 | 默认值 | | --- | --- | --- | | `TZ` | 时区 | 无 | | `DEBUG` | 激活容器镜像和应用的调试选项(若支持) | 无 | ## 主要标签 🏷️以下是镜像的主要标签,另有基于每个提交及其sha256短哈希值的标签。* https://hub.docker.com/r/11notes/homeassistant/tags?name=2026.5.4* https://hub.docker.com/r/11notes/homeassistant/tags?name=2026.5.4-unraid* https://hub.docker.com/r/11notes/homeassistant/tags?name=2026.5.4-nobody### 没有latest标签,如何处理更新?个人认为`:latest`标签是不良习惯,不应使用。许多开发者在新版本中引入**破坏性变更**,会影响使用`:latest`的用户。若不想手动更改标签至最新https://semver.org/,可使用语义化版本的短格式:无需使用`:2026.5.4`,可使用`:2026`或`:2026.5`。这些标签会随新版本更新,效果类似`:latest`但固定在主版本或次版本,理论上不会引入破坏性变更。 若坚持使用最新版本,可使用`:rolling`标签,但需注意:将立即获取应用的最新版本,无论是否存在破坏性变更或安全问题,风险自负! ## 仓库地址 ☁️``` docker pull docker.xuanyuan.run/11notes/homeassistant:2026.5.4 docker pull ***-ghcr.xuanyuan.run/11notes/homeassistant:2026.5.4 docker pull ***-quay.xuanyuan.run/11notes/homeassistant:2026.5.4
UNRAID版本 🟠此镜像默认支持unraid。只需在任何标签后添加**-unraid**,镜像将以99:100而非1000:1000运行。
NOBODY版本 👻此镜像默认支持nobody用户。只需在任何标签后添加**-nobody**,镜像将以65534:65534而非1000:1000运行。
源代码 💾* https://github.com/11notes/docker-homeassistant
基础镜像 🏛️* https://hub.docker.com/r/11notes/alpine
构建工具 🧰* https://github.com/home-assistant/core* https://github.com/11notes/docker-util
通用提示 📌* 使用反向代理(如Traefik、Nginx、HAproxy)终止TLS并保护端点* 使用Let’s Encrypt DNS-01挑战获取服务的有效SSL证书
注意事项 ⚠️* 此镜像包含默认配置及示例设置。生产环境中请使用自定义配置。
ElevenNotes™️此镜像仅供参考,风险自负。更新镜像版本前请务必备份。查看https://github.com/11notes/docker-homeassistant/releases了解破坏性变更。使用中遇到问题请提交https://github.com/11notes/docker-homeassistant/issues,有疑问或建议请创建https://github.com/11notes/docker-homeassistant/discussions而非issue。所有仓库可在https://github.com/11notes?tab=repositories查看。
创建于 27.05.2026, 23:43:59 (CET)
11notes 命名空间的其他可用镜像:
更多相关 Docker 镜像与资源
以下是 11notes/homeassistant 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 homeassistant 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务