exe-dev

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

exe.dev

exe.dev

exe.dev provides Linux VMs with persistent disks, instant HTTPS, and built-in auth.
exe.dev提供搭载持久化磁盘、即时HTTPS和内置身份验证功能的Linux虚拟机。

Documentation

文档

Two interfaces: HTTPS API and SSH

两种交互接口:HTTPS API和SSH

HTTPS API (preferred for lobby commands)

HTTPS API(平台管理命令首选)

The HTTPS API at
POST https://exe.dev/exec
is the reliable way to manage VMs. SSH to the exe.dev lobby is intermittently unreliable (connection timeouts).
Mint 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
ssh-keygen -Y sign
works with 1Password's SSH agent — pass the public key file and the agent handles signing.
Use the token:
bash
undefined
POST https://exe.dev/exec
端点的HTTPS API是管理虚拟机的可靠方式。通过SSH连接exe.dev主控端偶尔会出现不稳定的情况(连接超时)。
从你已注册的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
命令可以与1Password的SSH Agent配合使用——只需传入公钥文件,Agent会负责处理签名逻辑。
使用令牌示例:
bash
undefined

List 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 file
Every VM gets
https://<vm>.exe.xyz/
with automatic TLS.
直接访问虚拟机使用标准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:
    ubuntu:24.04
    is the standard choice. exe.dev also offers
    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"
  • 镜像:
    ubuntu:24.04
    是标准选择,exe.dev也提供
    boldsoftware/exeuntu
    镜像。

VM naming rules

虚拟机命名规则

  • Names cannot end with
    -<digits>
    (e.g.
    test-123
    is rejected,
    test-abc
    works)
  • 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.pub
The 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.pub

Working in scripts and agents

在脚本和Agent中使用

  • Prefer HTTPS API for lobby commands (
    ls
    ,
    new
    ,
    rm
    ). SSH to
    exe.dev
    is unreliable in automated contexts.
  • 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
    -o ConnectTimeout=30
    for VM SSH — new VMs take a few seconds to become reachable.
  • 优先使用HTTPS API执行平台管理命令(
    ls
    new
    rm
    )。在自动化场景中SSH连接
    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
    参数——新创建的虚拟机需要几秒钟时间才能正常访问。