Skip to content
Projects

About

Lightweight host and container monitoring service

Systems & Infrastructure

How these counts are measured

Measured star growth

in 24h
0
in 7 days
-1
in 15 days
-1
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

Beacon Logo

Beacon

An open-source, lightweight and modern host & Docker monitoring platform
开源、轻量、现代化的主机与 Docker 容器监控平台

GitHub Stars GitHub Release Go 1.25 Vue 3 MIT License

中文 · English


Introduction · Features · Architecture · Quick Start · Tech Stack · Project Structure · Documentation


📖 Introduction

Beacon is a Server-Agent platform for host monitoring and Docker container management, designed for individual developers and small teams. It is single-machine only: Beacon Server and the Collia Agent run on the same host, and the control channel rides on a local Unix Socket.

  • Beacon Server provides the Web UI, HTTP API, authentication, authorization, auditing, monitoring storage, and task orchestration.
  • Collia Agent collects host and Docker metrics, pushes monitoring batches to the Server over a reverse gRPC tunnel on the local Unix Socket, and serves Server-initiated control calls.
  • Query and control requests must explicitly select an Agent, preventing implicit fallback.

Website: beacon.amuluze.com · Repository: github.com/amuluze/beacon

✨ Features

🐳 Docker management

  • Inspect Docker versions and runtime status.
  • Create, start, stop, restart, delete, and inspect container logs.
  • Import, delete, and clean dangling images.
  • Create, delete, and inspect Docker networks.

🖥️ Host monitoring

  • Inspect host name, uptime, distribution, kernel, and operating system.
  • Track CPU, memory, disk IO, and network IO trends.
  • Configure CPU, memory, and disk usage thresholds with email or optionally signed DingTalk group robot Webhook notifications.
  • Perform container operations through an explicitly selected Agent.

🔐 Access control and auditing

  • User, role, and API permission management.
  • Login, logout, and system operation audit records.
  • Production checks for signing keys, Agent join tokens, and install tokens.

🔄 Agent lifecycle

  • Agent version reporting and online status tracking.
  • Collia amd64/arm64 packages are distributed by the Beacon image.
  • Automatic update, manual upgrade, uninstall, and reverse-tunnel control flows.

🏗️ Architecture

flowchart LR
    User["Web UI / API Client"] -->|"HTTP / WebSocket<br/>X-Agent-ID or agent_id"| Beacon["Beacon Server"]
    Beacon --> DB[("Server monitoring DB")]
    Collia["Collia Agent"] -->|"HTTP report (deprecated fallback)"| Beacon
    Collia <-->|"Reverse gRPC tunnel over Unix Socket"| Beacon
    Beacon -->|"Control call by Agent ID"| Collia
    Collia --> Runtime["Host OS / Docker Engine"]

Beacon keeps three paths distinct (single-machine deployment; the control and report channels both ride the local Unix Socket):

  1. Monitoring queries read the selected Agent's data from the Server-side monitoring database.
  2. Monitoring reports are atomically persisted in batches sent by Collia over the data stream of the control connection; the HTTP report endpoint remains as a deprecated compatibility fallback.
  3. Control calls target an Agent through the reverse gRPC tunnel opened by Collia.

See .docs/modules/beacon.md for the current Server module facts.

🚀 Quick Start

Online installer (recommended)

bash -c "$(curl -fsSL https://beacon.amuluze.com/release/latest/manager.sh)" -- install BEACON_PUBLIC_BASE_URL=https://beacon.example.com

Production mode accepts HTTPS only. First provide a trusted reverse proxy that forwards this HTTPS origin to Beacon's Web port. The installer then configures the Web port and control Socket path, and generates authentication, data-encryption, and bootstrap-administrator credentials. BEACON_DATA_ENCRYPTION_KEY is stored in the mode-0600 .env file and must be retained permanently.

The installer supports single-node mode only (the Agent control channel uses a Unix Socket and does not publish port 17000).

Images are published to both the Aliyun registry and Docker Hub (amd64: registry.cn-hangzhou.aliyuncs.com/amuluze/beacon, docker.io/amuluze/beacon; arm64 ships under the separate name amuluze/beacon-arm). The installer pulls from Aliyun by default and automatically falls back to Docker Hub when the primary source is unreachable.

Offline installation (air-gapped servers)

# On an internet-connected machine, download the offline package (amd64 / arm64 per target host)
curl -fsSLO https://beacon.amuluze.com/release/offline/<version>/beacon-offline-<version>-amd64.tar.gz
# Transfer to the target host, unpack and install (manager.sh is bundled in the package)
tar -xzf beacon-offline-<version>-amd64.tar.gz
sh beacon-offline-<version>-amd64/manager.sh install \
  OFFLINE_PACKAGE=/data/beacon-offline-<version>-amd64 \
  BEACON_PUBLIC_BASE_URL=https://beacon.example.com

The installer verifies the bundled SHA-256 manifest first, then loads the image and generates a .env under the same contract as online installation.

Run from source

Prerequisites:

  • Go 1.25 for local backend development.
  • Node.js, pnpm, and Task to build Web assets.
  • Docker >= 20.10.9 to build the image.
git clone https://github.com/amuluze/beacon.git
cd beacon

# Build frontend assets (embedded into the Server binary via go:embed)
task beacon-web:install
task beacon-web:build

# Development run: the development env does not enforce secrets (warnings only);
# local data and logs are written to beacon/data/
task beacon:dev

# Or build and run the image (production secrets are injected via environment
# variables, same contract as the online installer above)
docker build -f beacon/Dockerfile -t beacon:latest .
docker run -d --name beacon -p 8000:8000 beacon:latest

# Verify
curl http://127.0.0.1:8000/health

The development run writes its local database and logs under beacon/data/ (see beacon/configs/config.dev.toml). For production deployments use the online installer above.

If the administrator password is lost, reset it inside the running Server container (generates a temporary password and forces a change at the next login by default):

docker exec -it beacon ./beacon reset-admin -c /app/configs/config.toml

Use --password '<new-password>' or --password-stdin to supply one explicitly. The command enforces the password policy, stores a bcrypt hash, writes a system audit entry, and refuses to run when the admin account is missing.

After Beacon starts, install Collia on this host (replace the address, node number, and token with real values):

curl -fsSL 'https://<beacon-host>/api/v1/host/install?node=1' | sudo bash -s -- --token=<install-token>
  • node is the agent identity: it starts with a letter or digit and may contain letters, digits, dots, underscores and hyphens. Reinstalling on the same host overwrites the config and registers under the new identity.
  • The install token comes from the "Install Agent" dialog in the console (or the admin-only POST /api/v1/host/get_install_token). The script also sends it when downloading the package and config.
  • Agent auto-update is enabled by default: agents upgrade to the version bundled in the Server image on reconnect. Disable it under Settings → Probes, where a per-row manual upgrade is also available.
  • Uninstall with sudo collia remove: it stops the service first, then removes the systemd unit, binary, config, local data and logs; any residual collia daemon process not tracked by systemd is terminated as well.

Optional installation reporting

Installation reporting is disabled by default and sends nothing without explicit opt-in. Beacon sends one installation report only after an administrator sets Enable = true under [InstallReport] in beacon/configs/config.toml. The report is sent to the configured URL, which defaults to https://beacon.amuluze.com/api/v1/install/report.

The payload contains only install_id, image, version, public_base_url, install_dir, http_port, container_name, and hostname. install_id is a random identifier persisted locally. The request does not contain administrator accounts, passwords, authentication tokens, DingTalk Webhooks, SMTP passwords, or monitoring data.

🛠️ Tech Stack

Layer Technology
Web frontend Vue 3, TypeScript, Vite, Element Plus, Pinia, ECharts
Server Go 1.25, Fiber, GORM, WebSocket
Agent Go, gopsutil, Docker Engine API
Control channel Agent-initiated reverse gRPC tunnel over the local Unix Socket
Monitoring channel Batch reporting over the control-connection data stream (with HTTP compatibility fallback) and Server-side persistence
Storage SQLite, with other databases available through GORM
Deployment Docker, Docker Compose

📁 Project Structure

beacon/
├── assets/                 # Brand icon assets
├── beacon/                 # Server, Web UI, HTTP/WS API, and tunnel client
│   ├── cmd/beacon/         # Server process entrypoint
│   ├── service/            # Business services, routing, auth, and persistence
│   └── web/                # Vue 3 admin UI
├── collia/                 # Agent collection, host/Docker ops, tunnel client
├── common/                 # Shared schemas, database, and tunnel transport
├── scripts/                # Documentation gate scripts and the Go field-shape exporter
├── .docs/                  # Current implementation docs (modules, architecture, deployment, API)
├── .specs/domain/          # Domain Specs: durable behaviour constraints
├── DESIGN.md               # Design intent SSOT
└── Taskfile.yml            # Workspace command entrypoint

📚 Documentation

Document Contents
AGENTS.md AI collaboration entry: project summary, document map, constraints, and commands
DESIGN.md Design intent: visual tone, token system, layout and component specs, state models
Architecture Module boundaries, dependency direction, and the three runtime paths
Data flow Request lifecycle, data ownership boundaries, and atomic report writes
Deployment guide Environment requirements, build commands, configuration semantics, and release checks
API routes Server HTTP route index: method, path, name, and handler
OpenAPI contract Machine-readable contract of the Server HTTP API
Module docs Current implementation facts for Server, Agent, shared library, and console
Documentation system Document ownership, gate boundaries, and evidence maintenance rules
Website (docs and release notes) beacon.amuluze.com

🧑‍💻 Development and Contributing

Common commands:

task beacon:dev
task beacon-web:dev
task collia:amd64

cd beacon && go test ./...
cd collia && go test ./...
cd common && go test ./...
cd beacon/web && pnpm test:run && pnpm ts && pnpm build

task doc:check

Issues and pull requests are welcome:

  1. Fork this repository.
  2. Create a focused branch and run the relevant checks.
  3. Commit a clear, reviewable change.
  4. Push the branch and open a Pull Request.

☕ Support and Contact

Beacon is maintained in the author's spare time. If it helps you, please give the project a ⭐ or consider buying the author a coffee.

📄 License

Beacon is open source under the MIT License.

🙏 Acknowledgements

Special thanks to JetBrains for supporting open-source development tools.


Built with ❤️ and ☕

Explore related projects

Loading…