Skip to content

Commit 8ab5137

Browse files
committed
docs(install): add E2EE warning about encrypted Private rooms in Element
When E2EE is disabled, Element's Private rooms still enable encryption by default. Agents cannot read those encrypted messages, so users should use Public rooms or turn off room encryption instead. - hiclaw-install.sh: update zh/en E2EE description with warning - hiclaw-install.ps1: add full E2EE config section (messages, interactive prompt, env file output) with the same warning
1 parent 4bf806b commit 8ab5137

2 files changed

Lines changed: 52 additions & 2 deletions

File tree

install/hiclaw-install.ps1

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# HICLAW_ADMIN_PASSWORD Admin password (auto-generated if not set, min 8 chars)
2121
# HICLAW_MATRIX_DOMAIN Matrix domain (default: matrix-local.hiclaw.io:18080)
2222
# HICLAW_MOUNT_SOCKET Mount container runtime socket (default: 1)
23+
# HICLAW_MATRIX_E2EE Matrix E2EE (default: 0, disabled)
2324
# HICLAW_DATA_DIR Docker volume name for persistent data (default: hiclaw-data)
2425
# HICLAW_WORKSPACE_DIR Host directory for manager workspace (default: ~/hiclaw-manager)
2526
# HICLAW_VERSION Image tag (default: latest)
@@ -356,6 +357,18 @@ $script:Messages = @{
356357
"worker_runtime.choice" = @{ zh = "请选择 [1/2]"; en = "Enter choice [1/2]" }
357358
"worker_runtime.selected" = @{ zh = "默认 Worker 运行时: {0}"; en = "Default Worker runtime: {0}" }
358359

360+
# --- Matrix E2EE ---
361+
"matrix_e2ee.title" = @{ zh = "--- Matrix 端到端加密(E2EE)---"; en = "--- Matrix End-to-End Encryption (E2EE) ---" }
362+
"matrix_e2ee.desc" = @{
363+
zh = "E2EE 会对 Manager 与 Worker 之间的 Matrix 消息进行端到端加密。`n 启用后,即使 Matrix 服务器被入侵,消息内容也无法被窃取。`n 但 E2EE 会增加首次握手耗时,且要求所有 Agent 都支持 matrix-sdk-crypto。`n 如果不确定,建议保持禁用。`n ⚠ 注意:禁用 E2EE 后,请勿在 Element 上创建默认启用加密的 Private 房间,`n 否则 Agent 将无法读取该房间中的加密消息。请改用 Public 房间或关闭房间加密。"
364+
en = "E2EE encrypts Matrix messages between Manager and Workers end-to-end.`n When enabled, message content stays private even if the Matrix server is compromised.`n However, E2EE adds overhead to the initial handshake and requires all Agents`n to support matrix-sdk-crypto. If unsure, keep it disabled.`n ⚠ Note: When E2EE is disabled, do NOT create Private rooms in Element (which`n enable encryption by default) — Agents cannot read encrypted messages without`n E2EE support. Use Public rooms or turn off room encryption instead."
365+
}
366+
"matrix_e2ee.enable" = @{ zh = "启用 E2EE"; en = "Enable E2EE" }
367+
"matrix_e2ee.disable" = @{ zh = "禁用 E2EE(推荐)"; en = "Disable E2EE (recommended)" }
368+
"matrix_e2ee.choice" = @{ zh = "请选择 [1/2]"; en = "Enter choice [1/2]" }
369+
"matrix_e2ee.selected_enabled" = @{ zh = "Matrix E2EE: 已启用"; en = "Matrix E2EE: enabled" }
370+
"matrix_e2ee.selected_disabled" = @{ zh = "Matrix E2EE: 已禁用(默认)"; en = "Matrix E2EE: disabled (default)" }
371+
359372
# --- Worker idle timeout ---
360373
"idle_timeout.prompt" = @{ zh = "Worker 空闲自动停止超时(分钟)[720]"; en = "Worker idle auto-stop timeout in minutes [720]" }
361374
"idle_timeout.selected" = @{ zh = "Worker 空闲超时: {0} 分钟"; en = "Worker idle timeout: {0} minutes" }
@@ -699,6 +712,9 @@ HICLAW_COPAW_WORKER_IMAGE=$($Config.COPAW_WORKER_IMAGE)
699712
# Default Worker runtime (openclaw | copaw)
700713
HICLAW_DEFAULT_WORKER_RUNTIME=$($Config.DEFAULT_WORKER_RUNTIME)
701714
715+
# Matrix E2EE (0=disabled, 1=enabled; default: 0)
716+
HICLAW_MATRIX_E2EE=$($Config.MATRIX_E2EE)
717+
702718
# Worker idle timeout in minutes (default: 720 = 12 hours)
703719
HICLAW_WORKER_IDLE_TIMEOUT=$($Config.WORKER_IDLE_TIMEOUT)
704720
@@ -1648,6 +1664,40 @@ function Install-Manager {
16481664
}
16491665
Write-Log (Get-Msg "worker_runtime.selected" -f $config.DEFAULT_WORKER_RUNTIME)
16501666

1667+
# Matrix E2EE (shown in manual mode for fresh install; always shown during upgrade)
1668+
if (-not $script:HICLAW_NON_INTERACTIVE -and (-not $script:HICLAW_QUICKSTART -or $script:HICLAW_UPGRADE)) {
1669+
Write-Host ""
1670+
Write-Log (Get-Msg "matrix_e2ee.title")
1671+
Write-Host ""
1672+
Write-Host " $(Get-Msg 'matrix_e2ee.desc')"
1673+
Write-Host ""
1674+
Write-Host " 1) $(Get-Msg 'matrix_e2ee.disable')"
1675+
Write-Host " 2) $(Get-Msg 'matrix_e2ee.enable')"
1676+
Write-Host ""
1677+
if ($script:HICLAW_UPGRADE -and $env:HICLAW_MATRIX_E2EE) {
1678+
Write-Log (Get-Msg "prompt.upgrade_keep" -f "HICLAW_MATRIX_E2EE", $env:HICLAW_MATRIX_E2EE)
1679+
$e2eeChoice = Read-Host (Get-Msg "matrix_e2ee.choice")
1680+
if ($e2eeChoice) {
1681+
$config.MATRIX_E2EE = if ($e2eeChoice -eq "2") { "1" } else { "0" }
1682+
} else {
1683+
$config.MATRIX_E2EE = $env:HICLAW_MATRIX_E2EE
1684+
}
1685+
} elseif (-not $env:HICLAW_MATRIX_E2EE) {
1686+
$e2eeChoice = Read-Host (Get-Msg "matrix_e2ee.choice")
1687+
$e2eeChoice = if ($e2eeChoice) { $e2eeChoice } else { "1" }
1688+
$config.MATRIX_E2EE = if ($e2eeChoice -eq "2") { "1" } else { "0" }
1689+
} else {
1690+
$config.MATRIX_E2EE = $env:HICLAW_MATRIX_E2EE
1691+
}
1692+
} else {
1693+
$config.MATRIX_E2EE = if ($env:HICLAW_MATRIX_E2EE) { $env:HICLAW_MATRIX_E2EE } else { "0" }
1694+
}
1695+
if ($config.MATRIX_E2EE -eq "1") {
1696+
Write-Log (Get-Msg "matrix_e2ee.selected_enabled")
1697+
} else {
1698+
Write-Log (Get-Msg "matrix_e2ee.selected_disabled")
1699+
}
1700+
16511701
# Worker idle timeout (minutes, default: 720 = 12 hours)
16521702
if (-not $script:HICLAW_NON_INTERACTIVE -and (-not $script:HICLAW_QUICKSTART -or $script:HICLAW_UPGRADE)) {
16531703
if ($script:HICLAW_UPGRADE -and $env:HICLAW_WORKER_IDLE_TIMEOUT) {

install/hiclaw-install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ msg() {
457457
# --- Matrix E2EE ---
458458
"matrix_e2ee.title.zh") text="--- Matrix 端到端加密(E2EE)---" ;;
459459
"matrix_e2ee.title.en") text="--- Matrix End-to-End Encryption (E2EE) ---" ;;
460-
"matrix_e2ee.desc.zh") text="E2EE 会对 Manager 与 Worker 之间的 Matrix 消息进行端到端加密。\n 启用后,即使 Matrix 服务器被入侵,消息内容也无法被窃取。\n 但 E2EE 会增加首次握手耗时,且要求所有 Agent 都支持 matrix-sdk-crypto。\n 如果不确定,建议保持禁用。" ;;
461-
"matrix_e2ee.desc.en") text="E2EE encrypts Matrix messages between Manager and Workers end-to-end.\n When enabled, message content stays private even if the Matrix server is compromised.\n However, E2EE adds overhead to the initial handshake and requires all Agents\n to support matrix-sdk-crypto. If unsure, keep it disabled." ;;
460+
"matrix_e2ee.desc.zh") text="E2EE 会对 Manager 与 Worker 之间的 Matrix 消息进行端到端加密。\n 启用后,即使 Matrix 服务器被入侵,消息内容也无法被窃取。\n 但 E2EE 会增加首次握手耗时,且要求所有 Agent 都支持 matrix-sdk-crypto。\n 如果不确定,建议保持禁用。\n ⚠ 注意:禁用 E2EE 后,请勿在 Element 上创建默认启用加密的 Private 房间,\n 否则 Agent 将无法读取该房间中的加密消息。请改用 Public 房间或关闭房间加密。" ;;
461+
"matrix_e2ee.desc.en") text="E2EE encrypts Matrix messages between Manager and Workers end-to-end.\n When enabled, message content stays private even if the Matrix server is compromised.\n However, E2EE adds overhead to the initial handshake and requires all Agents\n to support matrix-sdk-crypto. If unsure, keep it disabled.\n ⚠ Note: When E2EE is disabled, do NOT create Private rooms in Element (which\n enable encryption by default) — Agents cannot read encrypted messages without\n E2EE support. Use Public rooms or turn off room encryption instead." ;;
462462
"matrix_e2ee.enable.zh") text="启用 E2EE" ;;
463463
"matrix_e2ee.enable.en") text="Enable E2EE" ;;
464464
"matrix_e2ee.disable.zh") text="禁用 E2EE(推荐)" ;;

0 commit comments

Comments
 (0)