Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f3c2d63
docs: rework README with value-first intro, grouped features and badges
ZingerLittleBee May 31, 2026
3125af3
docs: soften footprint claim and document install methods (docker for…
ZingerLittleBee May 31, 2026
3c75f51
fix(server): restrict docker container logs websocket to admins
ZingerLittleBee May 31, 2026
6683260
fix(server): restrict file read/download endpoints to admins
ZingerLittleBee May 31, 2026
2d3d893
fix(server): unify password policy and revoke sessions on password ch…
ZingerLittleBee May 31, 2026
8b5c9ce
docs: expand cn/en guides for oauth, mobile, architecture and reverse…
ZingerLittleBee May 31, 2026
67b4344
chore: sync bun.lock to web 1.0.0-alpha.5
ZingerLittleBee May 31, 2026
e021adb
refactor(docs): rename Chinese locale from cn to zh and point README …
ZingerLittleBee May 31, 2026
4674483
docs: correct terminal transport to JSON text with base64 data field
ZingerLittleBee May 31, 2026
9dcdedd
docs: drop the removed SERVERBEE_FEATURE__CUSTOM_THEMES env var
ZingerLittleBee May 31, 2026
d861102
docs(architecture): expand internals and update terminal transport
ZingerLittleBee May 31, 2026
785ae60
docs(index): correct status page to single page and JSON terminal tra…
ZingerLittleBee May 31, 2026
f07c786
docs(terminal): rewrite transport, limits and security sections
ZingerLittleBee May 31, 2026
832a3e3
docs(monitoring): document retention tiers and server management
ZingerLittleBee May 31, 2026
85d89c7
docs(configuration): restructure config reference into tables
ZingerLittleBee May 31, 2026
7e8a6fd
docs(deployment): add upgrade guide, TLS note and backup strategy
ZingerLittleBee May 31, 2026
818cfce
docs(agent): expand install, registration and metrics reference
ZingerLittleBee May 31, 2026
74e466c
docs(alerts): regroup metric types and document notification channels
ZingerLittleBee May 31, 2026
2d2f775
docs(ping): add probe type, interval and API query reference
ZingerLittleBee May 31, 2026
b86a86d
docs: proofread and polish wording across guides
ZingerLittleBee May 31, 2026
198e115
docs(env): sync ENV.md/docs with code, fix cn→zh paths and ipapi_is e…
ZingerLittleBee May 31, 2026
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
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Agent → WebSocket (JSON) → Server → SQLite (sea-orm)
- **Agent→Server**: `AgentMessage` variants (SystemInfo, Report, PingResult, TaskResult, SecurityEvent, CapabilityDenied, file/terminal/network results)
- **Server→Agent**: `ServerMessage` variants (Welcome, Ack, Exec, TerminalOpen, PingTasksSync, NetworkProbeSync, file ops)
- **Server→Browser**: `BrowserMessage` variants (FullSync, Update, ServerOnline/Offline, CapabilitiesChanged, SecurityEvent)
- Terminal data uses Binary WebSocket frames (session_id prefix + payload)
- Terminal data is carried in JSON text messages (`Message::Text`); the raw PTY byte stream rides in a base64-encoded `data` field. The protocol uses no binary WebSocket frames.

### AppState

Expand All @@ -90,7 +90,7 @@ RBAC: Admin (full access) vs Member (read-only). `require_admin` middleware on w
- **Errors**: `AppError` enum → automatic HTTP status code mapping via `IntoResponse`
- **API responses**: All endpoints return `Json<ApiResponse<T>>` wrapping data in `{ data: T }`
- **OpenAPI**: Every endpoint annotated with `#[utoipa::path]`, every DTO with `#[derive(ToSchema)]`. Swagger UI at `/swagger-ui/`
- **Config**: Figment loads TOML then env vars. Prefix `SERVERBEE_`, nested separator `__` (double underscore). Example: `SERVERBEE_ADMIN__PASSWORD` → `admin.password`. **When adding/changing env vars, update `ENV.md` and `apps/docs/content/docs/{en,cn}/configuration.mdx` simultaneously.**
- **Config**: Figment loads TOML then env vars. Prefix `SERVERBEE_`, nested separator `__` (double underscore). Example: `SERVERBEE_ADMIN__PASSWORD` → `admin.password`. **When adding/changing env vars, update `ENV.md` and `apps/docs/content/docs/{en,zh}/configuration.mdx` simultaneously.**
- **Capabilities**: u32 bitmask per server, defined in `crates/common/src/constants.rs` — `CAP_TERMINAL=1, CAP_EXEC=2, CAP_UPGRADE=4, CAP_PING_ICMP=8, CAP_PING_TCP=16, CAP_PING_HTTP=32, CAP_FILE=64, CAP_DOCKER=128, CAP_SECURITY_EVENTS=256, CAP_FIREWALL_BLOCK=512, CAP_IP_QUALITY=1024`. Default `CAP_DEFAULT=1852` (upgrade + ICMP/TCP/HTTP ping + security events + firewall blocklist + IP quality). Effective caps = `server_caps & agent_local_caps`; defense-in-depth validated on both sides.
- **Migrations**: sea-orm migrations in `crates/server/src/migration/`. Run automatically on startup. **Only implement `up()` — leave `down()` as a no-op (`Ok(())`).** Migrations are not reversible to avoid accidental data loss.

Expand Down Expand Up @@ -119,7 +119,7 @@ E2E manual verification checklists are in `tests/` directory, organized by featu

## Documentation

- **Fumadocs site**: `apps/docs/content/docs/{cn,en}/` — 16 MDX pages per language
- **Fumadocs site**: `apps/docs/content/docs/{en,zh}/` — 16 MDX pages per language
- **OpenAPI**: Auto-generated at `/swagger-ui/` and `/api-docs/openapi.json`
- **Architecture spec**: `docs/superpowers/specs/2026-03-12-serverbee-architecture-design.md`
- **Progress tracking**: `docs/superpowers/plans/PROGRESS.md`
Expand Down
5 changes: 2 additions & 3 deletions ENV.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Example: TOML `server.listen` → env var `SERVERBEE_SERVER__LISTEN`

> **First-run admin account**: There is no admin username/password env var. On first start (when no users exist) the server auto-creates an admin account with a randomly generated password and prints it once to the server/container logs as a highlighted credentials banner — capture it from the logs. You must change this password on first login, and may optionally choose a different username at that time.

> **Maintainer Note**: When adding or modifying environment variables, update both this file and `apps/docs/content/docs/{en,cn}/configuration.mdx`.
> **Maintainer Note**: When adding or modifying environment variables, update both this file and `apps/docs/content/docs/{en,zh}/configuration.mdx`.

## Developer Workflow Env Vars

Expand Down Expand Up @@ -36,7 +36,6 @@ These variables are for local repo tooling and development workflows. They are n
| `SERVERBEE_SERVER__DATA_DIR` | `server.data_dir` | string | `./data` | Data directory for SQLite and backups |
| `SERVERBEE_AUTH__MAX_SERVERS` | `auth.max_servers` | u32 | `0` | Maximum servers allowed via enrollment (0 = no limit). Best-effort soft cap |
| `SERVERBEE_SCHEDULER__TIMEZONE` | `scheduler.timezone` | string | `UTC` | Timezone for daily traffic aggregation and cron scheduling (e.g. `Asia/Shanghai`) |
| `SERVERBEE_FEATURE__CUSTOM_THEMES` | `feature.custom_themes` | bool | `true` | Disable user-defined themes when false. Custom refs are read-coerced to `preset:default` |
| `SERVERBEE_LOG__LEVEL` | `log.level` | string | `info` | Log level: `trace`, `debug`, `info`, `warn`, `error` |
| `SERVERBEE_LOG__FILE` | `log.file` | string | `""` | Log file path. Empty means stdout only |

Expand Down Expand Up @@ -122,7 +121,7 @@ Default risk-scoring works out of the box via [ipapi.is](https://ipapi.is) (no A
| `SERVERBEE_IP_QUALITY__RISK_PROVIDER` | `ip_quality.risk_provider` | string | `"ipapi_is"` | Primary risk provider. One of: `none`, `ipapi_is`, `ip-api`. |
| `SERVERBEE_IP_QUALITY__RISK_PROVIDER_FALLBACK` | `ip_quality.risk_provider_fallback` | string | `"ip-api"` | Fallback provider triggered on primary failure. Set to `none` to disable. |
| `SERVERBEE_IP_QUALITY__IPAPI_IS__API_KEY` | `ip_quality.ipapi_is.api_key` | string | - | Optional. Configure for higher per-account rate limits. |
| `SERVERBEE_IP_QUALITY__IPAPI_IS__ENDPOINT` | `ip_quality.ipapi_is.endpoint` | string | `https://api.ipapi.is` | Override for self-hosted mirrors or testing. |
| `SERVERBEE_IP_QUALITY__IPAPI_IS__ENDPOINT` | `ip_quality.ipapi_is.endpoint` | string | `""` | Override for self-hosted mirrors or testing. Empty falls back to the built-in default `https://api.ipapi.is`. |

**Migration from older versions:** Earlier releases supported four paid providers (Scamalytics, IPQualityScore, ProxyCheck, AbuseIPDB) configured via `SERVERBEE_IP_QUALITY__{SCAMALYTICS,IPQS,PROXYCHECK,ABUSEIPDB}__*`. These env vars are silently ignored. To restore equivalent functionality, fork or vendor the provider implementation from a tag prior to 2026-05-25.

Expand Down
Loading
Loading