zeabur-server-list

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Zeabur Server List & Get

Zeabur 服务器列表、详情查询与管理操作

Always use
npx zeabur@latest
to invoke Zeabur CLI.
Never use
zeabur
directly or any other installation method. If
npx
is not available, install Node.js first.
请始终使用
npx zeabur@latest
调用 Zeabur CLI。
切勿直接使用
zeabur
或其他安装方式。如果未安装
npx
,请先安装 Node.js。

List All Servers

列出所有服务器

bash
npx zeabur@latest server list -i=false
bash
npx zeabur@latest server list -i=false

Output Example

输出示例

     ID              NAME        IP              PROVIDER   LOCATION         STATUS   VM STATUS
-----------------+-------------+---------------+----------+----------------+--------+----------
 6989b00fd42b...   my-server    103.45.67.89    Hetzner    Singapore, SG    Online   RUNNING
 6989b00fd42b...   dev-box      45.67.89.12     Vultr      Tokyo, JP        Online   RUNNING
     ID              NAME        IP              PROVIDER   LOCATION         STATUS   VM STATUS
-----------------+-------------+---------------+----------+----------------+--------+----------
 6989b00fd42b...   my-server    103.45.67.89    Hetzner    Singapore, SG    Online   RUNNING
 6989b00fd42b...   dev-box      45.67.89.12     Vultr      Tokyo, JP        Online   RUNNING

Get Server Details

获取服务器详情

bash
undefined
bash
undefined

By server ID

通过服务器ID

npx zeabur@latest server get <server-id> -i=false

Shows detailed info: CPU/memory/disk usage, provider, location, managed status, creation time.
npx zeabur@latest server get <server-id> -i=false

显示详细信息:CPU/内存/磁盘使用率、服务商、位置、托管状态、创建时间。

Reboot a Server

重启服务器

bash
npx zeabur@latest server reboot <server-id> -y
-y
skips confirmation prompt
— required for non-interactive use.
bash
npx zeabur@latest server reboot <server-id> -y
-y
参数跳过确认提示
— 非交互式场景下必需。

Servers and Projects

服务器与项目

Each dedicated server can have Zeabur projects bound to it. A project's
Region.ID
will be
server-<server-id>
when it is deployed on a dedicated server.
  • To deploy a service to a server, use the
    zeabur-deploy
    skill with the project bound to that server — do NOT SSH in and manually set up web servers or copy files.
  • SSH is for low-level debugging only (e.g. checking kubectl, inspecting disk, network diagnostics). It is not needed for deploying or managing services.
每个专属服务器可绑定Zeabur项目。当项目部署在专属服务器上时,其
Region.ID
将为
server-<server-id>
  • 如需将服务部署到服务器,请使用与该服务器绑定的项目对应的
    zeabur-deploy
    技能 — 请勿通过SSH登录手动搭建Web服务器或复制文件。
  • SSH仅用于底层调试(例如检查kubectl、磁盘检测、网络诊断)。部署或管理服务无需使用SSH。

SSH into a Server (Debugging Only)

SSH登录服务器(仅用于调试)

bash
npx zeabur@latest server ssh <server-id>
For managed servers, the password is fetched automatically. If
sshpass
is installed, login is fully automatic; otherwise the password is printed for manual entry.
bash
npx zeabur@latest server ssh <server-id>
对于托管服务器,密码会自动获取。若已安装
sshpass
,则可完全自动登录;否则会打印密码供手动输入。

Non-Interactive SSH (Running Remote Commands)

非交互式SSH(执行远程命令)

In non-interactive environments (e.g. Claude Code, CI/CD), you cannot use an interactive SSH session. Instead, pipe commands via stdin with
-i=false
:
bash
echo 'kubectl get pods -A' | npx zeabur@latest server ssh <server-id> -i=false
For multiple commands, separate them with
;
or
&&
:
bash
echo 'kubectl get pods -A; kubectl get svc -A' | npx zeabur@latest server ssh <server-id> -i=false
Important notes:
  • The output includes the server's MOTD (Message of the Day) banner. Filter it out when parsing results:
    bash
    echo 'kubectl get pods -A' | npx zeabur@latest server ssh <server-id> -i=false 2>&1 \
      | grep -v "Welcome\|Documentation\|Management\|Support\|System load\|Usage of /\|Memory usage\|Swap usage\|Strictly\|just raised\|https://ubuntu\|Expanded\|updates can\|To see these\|Enable ESM\|See https://ubuntu\|New release\|Run 'do-release\|restart required\|INFO.*Connecting\|Pseudo-terminal\|^ \*"
  • If the remote command has a non-zero exit code (e.g.
    grep
    with no matches), the CLI will print
    ERROR exit status 1
    . This does not necessarily mean the SSH connection failed.
  • Heredoc syntax (
    <<'EOF'
    ) does not work reliably with this command. Always use
    echo '...' |
    instead.
在非交互式环境中(例如Claude Code、CI/CD),无法使用交互式SSH会话。此时请通过标准输入管道传递命令并添加
-i=false
参数:
bash
echo 'kubectl get pods -A' | npx zeabur@latest server ssh <server-id> -i=false
若需执行多条命令,请用
;
&&
分隔:
bash
echo 'kubectl get pods -A; kubectl get svc -A' | npx zeabur@latest server ssh <server-id> -i=false
重要说明:
  • 输出内容包含服务器的MOTD(每日消息)横幅。解析结果时请将其过滤掉:
    bash
    echo 'kubectl get pods -A' | npx zeabur@latest server ssh <server-id> -i=false 2>&1 \
      | grep -v "Welcome\|Documentation\|Management\|Support\|System load\|Usage of /\|Memory usage\|Swap usage\|Strictly\|just raised\|https://ubuntu\|Expanded\|updates can\|To see these\|Enable ESM\|See https://ubuntu\|New release\|Run 'do-release\|restart required\|INFO.*Connecting\|Pseudo-terminal\|^ \*"
  • 若远程命令返回非零退出码(例如
    grep
    未匹配到内容),CLI会输出
    ERROR exit status 1
    。这并不一定表示SSH连接失败。
  • 此处命令无法可靠支持Heredoc语法(
    <<'EOF'
    )。请始终使用
    echo '...' |
    方式替代。