exe-dev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseexe.dev
exe.dev
exe.dev provides Linux VMs with persistent disks, instant HTTPS, and built-in auth.
exe.dev提供搭载持久化磁盘、即时HTTPS和内置身份验证功能的Linux虚拟机。
Documentation
文档
- Docs index: https://exe.dev/docs.md
- All docs in one page (big!): https://exe.dev/docs/all.md
- HTTPS API: https://blog.exe.dev/apis-for-the-restless
- 文档索引:https://exe.dev/docs.md
- 单页全量文档(内容较多!):https://exe.dev/docs/all.md
- HTTPS API:https://blog.exe.dev/apis-for-the-restless
Two interfaces: HTTPS API and SSH
两种交互接口:HTTPS API和SSH
HTTPS API (preferred for lobby commands)
HTTPS API(平台管理命令首选)
The HTTPS API at is the reliable way to manage VMs. SSH to the exe.dev lobby is intermittently unreliable (connection timeouts).
POST https://exe.dev/execMint a bearer token from your registered SSH key:
bash
PERMS='{"cmds":["ls","new","rm","whoami"]}'
PAYLOAD=$(printf '%s' "$PERMS" | base64 | tr -d '\n=' | tr '+/' '-_')
SIG=$(printf '%s' "$PERMS" | ssh-keygen -Y sign -f ~/.ssh/exe_dev.pub -n v0@exe.dev 2>/dev/null | sed '1d;$d' | tr -d '\n' | tr '+/' '-_' | tr -d '=')
TOKEN="exe0.$PAYLOAD.$SIG"The works with 1Password's SSH agent — pass the public key file and the agent handles signing.
ssh-keygen -Y signUse the token:
bash
undefinedPOST https://exe.dev/exec从你已注册的SSH密钥生成Bearer令牌:
bash
PERMS='{"cmds":["ls","new","rm","whoami"]}'
PAYLOAD=$(printf '%s' "$PERMS" | base64 | tr -d '\n=' | tr '+/' '-_')
SIG=$(printf '%s' "$PERMS" | ssh-keygen -Y sign -f ~/.ssh/exe_dev.pub -n v0@exe.dev 2>/dev/null | sed '1d;$d' | tr -d '\n' | tr '+/' '-_' | tr -d '=')
TOKEN="exe0.$PAYLOAD.$SIG"ssh-keygen -Y sign使用令牌示例:
bash
undefinedList VMs
列出所有虚拟机
curl -s -X POST https://exe.dev/exec -H "Authorization: Bearer $TOKEN" -d "ls"
curl -s -X POST https://exe.dev/exec -H "Authorization: Bearer $TOKEN" -d "ls"
Create VM
创建虚拟机
curl -s -X POST https://exe.dev/exec -H "Authorization: Bearer $TOKEN" -d "new --name myvm --image ubuntu:24.04"
curl -s -X POST https://exe.dev/exec -H "Authorization: Bearer $TOKEN" -d "new --name myvm --image ubuntu:24.04"
Delete VM
删除虚拟机
curl -s -X POST https://exe.dev/exec -H "Authorization: Bearer $TOKEN" -d "rm myvm"
Token permissions control which commands are allowed. The `cmds` array in the permissions JSON must include every command the token needs. Response is always JSON.curl -s -X POST https://exe.dev/exec -H "Authorization: Bearer $TOKEN" -d "rm myvm"
令牌权限控制允许使用的命令范围。权限JSON中的`cmds`数组必须包含令牌所需的所有命令。接口响应始终为JSON格式。SSH (for VM access)
SSH(用于访问虚拟机)
Direct VM access uses standard SSH:
bash
ssh <vm>.exe.xyz # shell
scp file.txt <vm>.exe.xyz:~/ # transfer fileEvery VM gets with automatic TLS.
https://<vm>.exe.xyz/直接访问虚拟机使用标准SSH协议:
bash
ssh <vm>.exe.xyz # 进入shell
scp file.txt <vm>.exe.xyz:~/ # 传输文件每个虚拟机都会自动获得带有TLS证书的地址。
https://<vm>.exe.xyz/VM defaults
虚拟机默认配置
- Default user is root with no sudo installed. If you need a non-root user, install sudo first:
bash
ssh <vm>.exe.xyz "apt-get update -qq && apt-get install -y -qq sudo && useradd -m -s /bin/bash myuser && echo 'myuser ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/myuser" - Image: is the standard choice. exe.dev also offers
ubuntu:24.04.boldsoftware/exeuntu
- 默认用户为root,未安装sudo。如果需要非root用户,请先安装sudo:
bash
ssh <vm>.exe.xyz "apt-get update -qq && apt-get install -y -qq sudo && useradd -m -s /bin/bash myuser && echo 'myuser ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/myuser" - 镜像: 是标准选择,exe.dev也提供
ubuntu:24.04镜像。boldsoftware/exeuntu
VM naming rules
虚拟机命名规则
- Names cannot end with (e.g.
-<digits>is rejected,test-123works)test-abc - Hyphens are allowed elsewhere in the name
- The name becomes the subdomain:
<name>.exe.xyz
- 名称不能以结尾(例如
-<数字>会被拒绝,test-123符合要求)test-abc - 名称其他位置可以使用连字符
- 名称会成为子域名:
<name>.exe.xyz
SSH config
SSH配置
The exe.dev SSH key must be pinned to avoid 1Password's agent offering wrong keys:
Host exe.dev *.exe.xyz
IdentitiesOnly yes
IdentityFile ~/.ssh/exe_dev.pubThe private key lives in 1Password ("SSH Key - exe.dev" in Employee vault). Only the public key is on disk at .
~/.ssh/exe_dev.pub必须固定exe.dev的SSH密钥,避免1Password的Agent提供错误的密钥:
Host exe.dev *.exe.xyz
IdentitiesOnly yes
IdentityFile ~/.ssh/exe_dev.pub私钥存储在1Password中(员工 vault 中的「SSH Key - exe.dev」),磁盘上仅保留公钥,路径为。
~/.ssh/exe_dev.pubWorking in scripts and agents
在脚本和Agent中使用
- Prefer HTTPS API for lobby commands (,
ls,new). SSH tormis unreliable in automated contexts.exe.dev - Use SSH multiplexing for repeated VM access to avoid connection overhead:
bash
ssh -o ControlMaster=auto -o ControlPath=/tmp/ssh-%r@%h-%p -o ControlPersist=300 <vm>.exe.xyz - Accept new host keys non-interactively:
-o StrictHostKeyChecking=accept-new - Connection timeout: Use for VM SSH — new VMs take a few seconds to become reachable.
-o ConnectTimeout=30
- 优先使用HTTPS API执行平台管理命令(、
ls、new)。在自动化场景中SSH连接rm可靠性较低。exe.dev - 使用SSH多路复用进行重复的虚拟机访问,减少连接开销:
bash
ssh -o ControlMaster=auto -o ControlPath=/tmp/ssh-%r@%h-%p -o ControlPersist=300 <vm>.exe.xyz - 非交互式接受新主机密钥:添加参数
-o StrictHostKeyChecking=accept-new - 连接超时: 虚拟机SSH连接使用参数——新创建的虚拟机需要几秒钟时间才能正常访问。
-o ConnectTimeout=30