Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

OpenHands 1.0 Self‑Hosting Guide

说明与用途

在本地机器上安全自托管 OpenHands 1.0 的指南,使用 Docker 沙箱、确认策略和完整事件日志记录。

问题

Running an autonomous coding agent on a local machine risks accidental code changes, credential leaks, and uncontrolled resource usage.

结果

Self‑hosting OpenHands 1.0 with Docker sandboxing and confirmation policies reduces risk of destructive actions, limits network exposure, and provides deterministic replay via event logs, enabling safe autonomous coding on local hardware.

工作流

  • Install OpenHands CLI or binary installer
  • Configure LLM settings and save to ~/.openhands/settings.json
  • Run the agent in Docker sandbox using the provided docker run command
  • Set SANDBOX_USER_ID to match host user
  • Define SANDBOX_VOLUMES to mount only the target project folder
  • Enable ConfirmRisky policy via SDK
  • Disable network with SANDBOX_NETWORK_DISABLED=true for non‑internet tasks
  • Apply Docker security options (--security-opt no-new-privileges, --read-only)
  • Mount secrets read‑only or via env vars
  • Set LOG_ALL_EVENTS=true for full audit trail
  • Review event logs after each session
  • Iterate: move from CLI to Docker, tighten policies, and monitor costs

证据

OpenHands 1.0 is a ground‑up rebuild around a Software Agent SDK…

来源

SecurityAnalyzer rates every tool call as low, medium, or high risk…

来源

The official Docker launch command looks like this…

来源

  • 记录日期: 2026-09-15T05:00:34.657Z