// 开始使用get started

三步,把 AI 终端装进自己的机器 Three steps to your own AI terminal

准备一个 omts 服务端(自建,或先用官方免费版)→ 安装客户端 → 添加设备。 Get an omts server (self-hosted, or the free tier) → install the client → add a machine.

1服务端:自建,或先用免费版Server: self-host, or start free

Free · P2P only

官方免费 omtsOfficial free omts

零部署直接用,实例部署在美国:只支持设备与客户端之间的 P2P 直连,不含中继转发——网络条件差时无法回落。客户端 Server 栏填:Zero setup, hosted in the US: devices and clients connect peer-to-peer only. No relay forwarding, so weak networks have no fallback. Set it as the Server in the client:

https://public-us.ohmyterm.com

Recommended

自建 omts(推荐)Self-host omts (recommended)

数据完全在自己手里,解锁中继回退(弱网也能连)、企业登录与多节点扩容。分单机和集群两种形态,见下。Your data stays yours. Unlocks the relay fallback for weak networks, enterprise sign-in, and multi-node scaling. Single-node or cluster, below.

01

单机部署Single node

一台 Linux 服务器:docker compose 拉起 omts + MySQL,nginx 做 TLS 反代公网入口。omts 只听 loopback,容器非 root、无 capability 运行。适合个人与小型团队。One Linux host: a docker compose file brings up omts + MySQL, with nginx in front as the TLS ingress. omts listens on loopback only; containers run non-root, no capabilities. For individuals and small teams.

02

集群部署(高可用)Cluster (high availability)

需要高可用时:云商 LB 挂多个 omts 实例,后端接高可用 MySQL(如 RDS)。节点无状态共享会话数据,滚动升级时在线任务不中断、客户端自动重连。For HA: put a cloud LB in front of several omts instances backed by a managed HA MySQL (e.g. RDS). Nodes are stateless and share session data — rolling upgrades keep live tasks attached while clients reconnect automatically.

your-agent@any-shell
# 部署交给 agent:把这段贴给你的 Claude Code / Codex(推荐 docker 部署)hand it to your agent — paste this into Claude Code / Codex (docker is the recommended path)
用 docker 在这台服务器上部署 omts(oh-my-term 服务端):Deploy omts (the oh-my-term server) on this host with docker:
1. docker 起 MySQL 8(数据落卷),创建 omts 数据库与用户Start MySQL 8 in docker (data on a volume), create the omts database and user
2. 从 github.com/oh-my-term/release-omts 取最新 omts 发行版,核对 SHA256SUMSFetch the latest omts release from github.com/oh-my-term/release-omts and verify SHA256SUMS
3. omts 以容器运行:非 root、只监听 127.0.0.1,数据库连接走环境变量注入Run omts in a container: non-root, listening on 127.0.0.1 only, DB injected via environment
4. nginx 以 TLS 反代 443 到 omtsPut nginx in front with TLS on :443, proxying to omts
5. 验证 Verify https://<my-domain>/api/v1/version 返回 200returns 200
6. 放行 P2P STUN 端口(UDP 3478):iptables 与云防火墙/安全组两层都要放Open the P2P STUN port (UDP 3478) in BOTH the host iptables and the cloud firewall / security group

集群部署同理:把第 1 步换成托管高可用 MySQL,第 3 步在每台节点重复,入口换成云商 LB。详细 runbook 随发行版提供。注意:每个节点的 STUN 端口(UDP 3478)都要在云商防火墙/安全组放行,只改 iptables 不够。The cluster path is the same recipe: managed HA MySQL in step 1, repeat step 3 per node, and swap the ingress for your cloud LB. The detailed runbook ships with each release. Mind the STUN port (UDP 3478) per node: it must be open in the cloud firewall / security group too — iptables alone is not enough.

2客户端:桌面直接下,移动端即将上架Clients: desktop today, mobile soon

下载源Source

Windows

x64(x86_64)构建,zip 压缩包,附 SHA-256 校验和。x86_64 build as a zip, with SHA-256 checksum.

桌面产物在 GitHub 与 Gitee 镜像同步发布,文件名一致;下载后可用对应仓的 SHA256SUMS.txt 校验。Desktop artifacts ship to GitHub and the Gitee mirror in sync, with identical filenames; verify against the repo's SHA256SUMS.txt after download.

3添加设备,创建会话Add a machine, open a session

1客户端里点「添加机器」:它生成一条安装命令(一次性令牌,1 小时有效),复制下来In the client, click "Add a machine": it generates an install command (one-time token, valid 1 hour) — copy it
2在要纳管的机器上执行这条命令完成注册;设备的 16 位指纹就在机器上:~/.omt/bootstrap-commit(或运行 omtc init --bootstrap-only)Run that command on the machine you want to manage; its 16-character fingerprint is on the machine: ~/.omt/bootstrap-commit (or run omtc init --bootstrap-only)
3回到客户端创建会话:首次连接时填入机器上展示的指纹,完成 TOFU 信任锚定(防中间人)Back in the client, create a session: on first connect, enter the fingerprint shown on the machine — TOFU anchoring against man-in-the-middle

在设备上查看指纹:Reading the fingerprint on the device:

omtc@build-server
# 在要纳管的机器上,运行客户端「添加机器」给出的安装命令,然后:on the machine you are adding, run the install command from the client, then:
$ cat ~/.omt/bootstrap-commit
a3f9 27c1 88b4 0e6d   # 16-character device fingerprint
✓ registered — omtc is up and will start on boot

首次连接的 TOFU 对话里有三选:填入指纹(推荐)、跳过验证(浏览器将信任看到的第一个公钥,有中间人风险)、拒绝(安全默认)。如果你没有动过这台设备而指纹对不上,请拒绝并排查。The first-connect TOFU dialog offers three choices: enter the fingerprint (recommended), skip verification (the browser will trust the first key it sees — MITM risk), or reject (safe default). If you have not touched the machine and the fingerprint does not match, reject and investigate.