Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,18 @@ jobs:

- name: Lint
run: bun x ultracite check

install-script:
name: Install Script Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dash & shellcheck
run: sudo apt-get update && sudo apt-get install -y dash shellcheck

- name: POSIX syntax check (dash -n)
run: dash -n deploy/install.sh

- name: Portability lint (shellcheck --shell=dash)
run: shellcheck --shell=dash --severity=warning deploy/install.sh
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ jobs:
- name: Generate checksums
run: |
cd artifacts
sha256sum * > checksums.txt
# install.sh fetches this exact filename for binary verification.
# Hash only the binaries to avoid self-including the sums file.
sha256sum serverbee-* > sha256sums.txt

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ServerBee watches all your servers from one place. A central **server** receives
### 1. Install the server

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server --method docker
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server --method docker
```

Open `http://your-server:9527`. The admin password is auto-generated and printed to the startup log — change it on first login.
Expand All @@ -47,7 +47,7 @@ Open `http://your-server:9527`. The admin password is auto-generated and printed
Sign in as admin → **Settings** → generate a one-time **enrollment code** (single-use, expires in ~10 min). Then on each node:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent --method binary \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent --method binary \
--server-url http://YOUR_SERVER:9527 --enrollment-code YOUR_ONE_TIME_CODE
```

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ServerBee 让你在一处掌控所有服务器。中心 **Server** 通过 WebSoc
### 1. 安装 Server

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server --method docker
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server --method docker
```

打开 `http://your-server:9527`。管理员密码会自动生成并打印在启动日志中 —— 首次登录后请修改。
Expand All @@ -47,7 +47,7 @@ curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/depl
以管理员登录 → **设置** → 生成一个一次性 **enrollment code**(单次使用,约 10 分钟后过期)。然后在每个节点上:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent --method binary \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent --method binary \
--server-url http://YOUR_SERVER:9527 --enrollment-code YOUR_ONE_TIME_CODE
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/en/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The ServerBee agent is a lightweight Rust binary that runs on each server you wa
The install script detects the architecture, downloads the binary, generates the config, and registers a systemd service automatically:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent \
--server-url http://your-server-ip:9527 \
--enrollment-code YOUR_ONE_TIME_CODE
```
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/en/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ On Linux hosts, the bootstrap installer is the quickest binary/systemd path:

```bash
# Install the server
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server

# Install an agent
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent \
--server-url http://your-server-ip:9527 \
--enrollment-code YOUR_ONE_TIME_CODE
```
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/content/docs/en/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ There are two quick ways to install the server — pick one based on whether you
Fastest to get going; use this when you don't have a domain. You'll reach it at `http://<server-ip>:9527`:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server -y
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server -y
```

The script writes `auth.secure_cookie = false` so browser login works over plain HTTP.
Expand All @@ -46,7 +46,7 @@ The script writes `auth.secure_cookie = false` so browser login works over plain
If you already have a domain whose DNS `A` record points to this server, add `--domain` and the script sets up Caddy and issues an HTTPS certificate for you. You'll reach it at `https://your-domain`:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server \
--domain monitor.example.com \
--email admin@example.com \
-y
Expand All @@ -55,7 +55,7 @@ curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/depl
The script first checks that the domain resolves to this server; if it doesn't resolve or points to a different IP, installation stops and tells you which DNS record to add. `--email` is for Let's Encrypt notices and can be omitted. To add a domain to an already-installed server, run `sudo serverbee domain setup --domain monitor.example.com --email admin@example.com`.

<Callout type="info">
You can also run it with no arguments for an interactive wizard that prompts for language, binary vs Docker, and whether to configure a domain: `curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash`.
You can also run it with no arguments for an interactive wizard that prompts for language, binary vs Docker, and whether to configure a domain: `curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh`.
</Callout>

Either way, the script automatically:
Expand All @@ -68,7 +68,7 @@ Either way, the script automatically:
6. Starts the service and enables it on boot

<Callout type="info">
If Docker is available, running the server in Docker is recommended — upgrades and isolation are easier. Just add `--method docker`: `... | sudo bash -s -- server --method docker -y`.
If Docker is available, running the server in Docker is recommended — upgrades and isolation are easier. Just add `--method docker`: `... | sudo sh -s -- server --method docker -y`.
</Callout>

### Step 2: Get the first-run admin password
Expand Down Expand Up @@ -125,7 +125,7 @@ The code is **single-use** and **short-lived** (10 minute default expiry), and i
On the machine you want to monitor, run the install script and pass the server URL and enrollment code as arguments:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent \
--server-url http://your-server-ip:9527 \
--enrollment-code YOUR_ONE_TIME_CODE
```
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/en/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ The easiest path is the one-line install script. It detects the architecture, do

```bash
# Option A: install with an IP (plain HTTP), reachable at http://<server-ip>:9527
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server -y
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server -y

# Option B: install with a domain (automatic Caddy + HTTPS), reachable at https://your-domain
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server \
--domain monitor.example.com --email admin@example.com -y
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/zh/agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Agent 是部署在被监控服务器上的轻量级 Rust 二进制程序,运
安装脚本会自动检测架构、下载二进制、生成配置并注册 systemd 服务:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent \
--server-url http://your-server-ip:9527 \
--enrollment-code YOUR_ONE_TIME_CODE
```
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/zh/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Dockerfile 通过 `ARG SERVERBEE_IMAGE_TAG=latest` 暴露这个开关。Railway

```bash
# 安装服务端
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server

# 安装 Agent
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent \
--server-url http://your-server-ip:9527 \
--enrollment-code YOUR_ONE_TIME_CODE
```
Expand Down
10 changes: 5 additions & 5 deletions apps/docs/content/docs/zh/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Server 有两种快速安装方式,按你是否有域名选一种即可。
最快上手,没有域名时用这种。装完通过 `http://<服务器IP>:9527` 访问:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server -y
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server -y
```

脚本会写入 `auth.secure_cookie = false`,让浏览器在普通 HTTP 下也能正常登录。
Expand All @@ -46,7 +46,7 @@ curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/depl
如果你已有域名,且 DNS `A` 记录已指向这台服务器,加上 `--domain` 即可让脚本自动装好 Caddy 并签发 HTTPS 证书,装完通过 `https://你的域名` 访问:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server \
--domain monitor.example.com \
--email admin@example.com \
-y
Expand All @@ -55,7 +55,7 @@ curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/depl
脚本会先校验域名是否解析到这台服务器;没解析或指向了别的 IP,安装会中止并提示你该加哪条 DNS 记录。`--email` 用于 Let's Encrypt 证书通知,可以省略。已经装好的 Server 想补配域名,单独执行 `sudo serverbee domain setup --domain monitor.example.com --email admin@example.com` 即可。

<Callout type="info">
也可以不带参数运行进入交互式向导,按提示选语言、二进制还是 Docker、是否配域名:`curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash`。
也可以不带参数运行进入交互式向导,按提示选语言、二进制还是 Docker、是否配域名:`curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh`。
</Callout>

无论哪种方式,脚本都会自动完成:
Expand All @@ -68,7 +68,7 @@ curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/depl
6. 启动服务并设置开机自启

<Callout type="info">
有 Docker 的环境推荐用 Docker 方式跑 Server,升级和隔离都更省心。加上 `--method docker` 即可:`... | sudo bash -s -- server --method docker -y`。
有 Docker 的环境推荐用 Docker 方式跑 Server,升级和隔离都更省心。加上 `--method docker` 即可:`... | sudo sh -s -- server --method docker -y`。
</Callout>

### 第二步:拿到首次管理员密码
Expand Down Expand Up @@ -125,7 +125,7 @@ Agent 是跑在被监控机器上的轻量探针,负责把 CPU、内存、磁
在被监控的机器上执行安装脚本,把 Server 地址和注册码作为参数传进去:

```bash
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- agent \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- agent \
--server-url http://your-server-ip:9527 \
--enrollment-code YOUR_ONE_TIME_CODE
```
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/zh/server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Server 是 ServerBee 的核心组件,负责接收 Agent 上报的数据、存

```bash
# 方式一:用 IP 安装(明文 HTTP),访问 http://<服务器IP>:9527
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server -y
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server -y

# 方式二:用域名安装(自动 Caddy + HTTPS),访问 https://你的域名
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server \
curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server \
--domain monitor.example.com --email admin@example.com -y
```

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/components/landing/translations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const INSTALL_COMMAND =
'curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo bash -s -- server'
'curl -fsSL https://raw.githubusercontent.com/ZingerLittleBee/ServerBee/main/deploy/install.sh | sudo sh -s -- server'

export type LandingLang = 'en' | 'zh'

Expand Down
Loading
Loading