azerioid-stack-manager README

项目的 README,来自 github.com/azerioid/azerioid-stack-manager。合并为一个 markdown 文件:README.md。

AZERIOID Stack Manager

One host. One panel. A Linux web stack you control.

AZERIOID Stack Manager is a self-hosted control panel for running sites on a single Linux server. One installer sets up Caddy, the panel's own PHP 8.4 FPM service and a SQLite-backed admin UI on Laravel 13 + Livewire 4. Everything else — Nginx, Apache, databases, caches, more PHP versions, Node.js, Supervisor, mail, rootless Docker, Elasticsearch — is installed on demand from the dashboard or the azerioid CLI.

The web UI never runs package managers or touches the host itself. Every privileged change goes through a separate root broker that only accepts a fixed list of actions and re-validates every input. Each site runs under its own Unix account.

Star History

Star History Chart

Screenshots

Captured from the maintainer's Ubuntu 24.04 test host. Domain names and the host's IP address were replaced with documentation values (example.com, 203.0.113.x). The screenshots predate some newer pages (Redis, Firewall, Cron, SFTP) and show earlier wording in places, such as the Docker description on the Components page.

Overview Virtual hosts
Overview Virtual hosts
Virtual hosts · row actions Docker runtime filter
Virtual hosts actions Docker vhosts
Mail Databases
Mail Databases
Terminal File Manager + editor
Terminal File Manager
Components Security
Components Security

What the installer sets up vs what you add later

Installed by the bootstrap

Piece Role
Caddy Panel listener on port 3169; front door on :80/:443 for every site
PHP 8.4 FPM The panel's own php-fpm service, running as the dedicated azerioid-panel account
SQLite Panel state under /var/lib/azerioid-panel/
Broker Root helper reached through one sudoers entry that only azerioid-panel holds
Queue worker + scheduler Background jobs (installs, backups, deploys) and periodic convergence checks

Installed on demand (Components page or azerioid component install …)

Category Components
Web engines Nginx, Apache — bound to loopback behind Caddy, which terminates TLS
Databases MariaDB, PostgreSQL, MongoDB
Cache / search Redis (per-site users), Memcached (single-tenant, see limitations), Elasticsearch 9
Runtimes PHP 8.1–8.4 for sites (one FPM pool per site); Node.js 20 / 22 / 24 side by side, plus an optional system Node.js
Process manager Supervisor
Per-site app runtimes PHP-FPM (default), Laravel Octane on FrankenPHP, PM2 cluster for Node, rootless Docker (image, Dockerfile or compose)
Mail Postfix + Dovecot + OpenDKIM: authenticated submission, virtual mailboxes, DKIM/SPF/DMARC records, direct or smarthost outbound
Tools Adminer (MariaDB, PostgreSQL, SQLite; reachable only through the panel session)

Per-site isolation

Every site gets its own Unix account (az-vh-<site>) and its own group. Other sites' accounts are not members of that group (the web server is, so it can serve the files), so site A's code cannot read site B's files.

Workload Runs as
Site PHP Its own PHP-FPM pool, under the site's account. The socket is reachable only by the web server
Laravel Octane The site's account
PM2 The site's account, with its own PM2_HOME
Supervisor program bound to a site The site's account. Asking for any other account is refused
Supervisor program bound to no site The shared azerioid-supervised account (never root)
Docker One rootless Docker daemon per Docker site, run by the site's account, with its own subordinate ID range. Rootful docker.service is masked and there is no docker group
Terminal and File Manager The site's account. The File Manager rejects paths outside the site; the terminal is a normal, non-chrooted shell limited by file permissions
SFTP The site's account. Keys only, no shell, no forwarding, no chroot
Git deploy Root fetches with a root-only deploy key; checkout and build steps run as the site's account
Cron jobs The site's account. A root job needs a typed confirmation every time
Redis A Redis ACL user per site, limited to keys and channels under its own prefix
Databases One user per database. MariaDB grants cover only that database; PostgreSQL databases are closed to other roles

Sites are moved onto this layout automatically when an older install updates, one at a time, with an HTTP check after each move. A site that fails its check is put back on the shared pool or daemon and reported, not retried. The shared azerioid-supervised account and the shared Docker daemon are still used for such put-back sites and for programs bound to no site.

Features

Supported operating systems

The installer accepts these and refuses everything else (Fedora, older or newer Ubuntu releases, other distributions):

OS Versions
Ubuntu 24.04
Debian 12, 13
AlmaLinux, Rocky Linux, CentOS Stream, RHEL, Oracle Linux 9, 10

Every release is deployed to the maintainer's Ubuntu 24.04 host and checked with deploy/verify-release.sh; a Rocky Linux 9 host with SELinux enforcing is used for EL testing. Other accepted versions get less regular testing; release notes say what a release was tested on.

Requirements: root, outbound HTTPS, git.

Quick start

git clone https://github.com/azerioid/azerioid-stack-manager.git stack-manager && cd stack-manager
chmod +x stack-manager.sh
sudo ./stack-manager.sh

Interactive install (TTY) asks for:

Non-interactive example:

sudo ./stack-manager.sh --non-interactive --access=public --create-admin=true [email protected]
# Set ADMIN_PASSWORD in the environment. There is no default: it needs 12+ characters with upper and
# lower case, a number and a symbol, or the install stops at the admin step (use /setup in the browser instead).

Tunnel access after a default install:

ssh -L 3169:127.0.0.1:3169 user@host
# open http://127.0.0.1:3169/setup  (or /login if an admin was created)

Other flags: --firewall=true, --fail2ban=true, --require-totp=true, --domain=, --allowlist=, --port=, --dry-run. Full list: sudo ./stack-manager.sh --help.

Security model

Design decisions and their reasoning: docs/DECISIONS.md (ADRs), docs/SPEC.md, docs/port-ownership.md. Reporting a vulnerability: SECURITY.md.

CLI examples

azerioid status
azerioid vhost list --json
azerioid vhost add --domain=app.example.com --type=php --php=8.4 --root=/data/www/app.example.com --tls=auto
azerioid vhost add --domain=api.example.com --type=php --php=8.4 --runtime=octane --tls=auto
azerioid vhost octane enable --domain=api.example.com
azerioid vhost octane reload --domain=api.example.com
azerioid vhost pm2 enable --domain=node.example.com --instances=2 --entry=server.js
azerioid vhost docker enable --domain=app.example.com --mode=image --image=nginx:alpine --internal-port=80
azerioid vhost clone --source=app.example.com --domain=staging.example.com --db=appdb:appdb_staging
azerioid vhost limits --domain=app.example.com --php-memory=256 --max-children=10
azerioid vhost limits --domain=box.example.com --memory=512 --cpu=150   # --cpu applies to Docker only
azerioid db add --engine=mariadb --name=appdb --user=appdb
azerioid db clone --engine=mariadb --source=appdb --name=appdb_staging
azerioid component install redis
azerioid component install mail   # refuses another MTA unless --option=confirm=REPLACE-MTA
azerioid process create --vhost=app.example.com --command='node server.js' --name=app-node
azerioid mail hostname set --hostname=mail.example.com
azerioid mail domain enable --domain=app.example.com
azerioid mail mailbox add [email protected]   # password printed once
azerioid mail smarthost set --host=smtp.provider.example --port=587 --username=apikey
# relay password: AZERIOID_RELAY_PASSWORD=… in the environment (not a flag)
azerioid mail dns --domain=app.example.com
azerioid panel update check
azerioid panel update apply --confirm              # latest release
azerioid panel update apply --v=v2.15.7 --confirm  # a specific release

Further command groups: backup, deploy, cron, sftp, firewall, search, updates, totp, audit, service. Redis per-site users are managed on the Redis page. Full surface: azerioid help.

Known limitations

General

Sites and runtimes

Mail

Caches and search

Backups

Web and updates

Not yet exercised on a live host (covered by tests only):

Uninstall

Panel only:

sudo ./deploy/uninstall.sh --drop-db --remove-bootstrap

Full teardown — panel, broker-managed components, added repositories and the database engines' data directories:

sudo ./deploy/uninstall.sh --full

--full deletes every database on the host (/var/lib/mysql, /var/lib/mongodb, /var/lib/pgsql, /var/lib/postgresql). Back up first. It keeps site trees under /data/www and the logs under /var/log/azerioid-panel. sudo ./deploy/uninstall.sh --help lists the individual flags.

How this project is built

The code in this repository is written by an AI coding agent, Claude Code (Anthropic), working under the maintainer's direction. The maintainer:

Every change also goes through the automated test suite and CI.

License

MIT — see LICENSE.

Contributing

Issues and pull requests: azerioid/azerioid-stack-manager. Architecture decisions live in docs/DECISIONS.md; keep ADR history intact when proposing changes. Security issues: see SECURITY.md, not the public tracker.

azerioid-stack-manager (azerioid/azerioid-stack-manager)

正在搜索数据库…

这是什么?AZERIOID Stack Manager 是一个自包含的堆栈管理器和 Web 控制面板,面向在单台 Linux 服务器上运营网站的管理员。它会引导安装 Caddy、专用 PHP-FPM 池和基于 SQLite 的管理界面,之后你可以按需添加 Web 服务器、数据库、缓存、邮件、Node.js 和无根 Docker。
这是我装进代码里的库,还是独立的服务器应用?它是一个独立的自托管 Web 应用,外加配套的 CLI(azerioid),基于 Laravel 13 + Livewire 4 构建,面板数据库为 SQLite——不是要导入其他项目的库。
怎么在我的服务器上跑起来?用 root 权限运行交互式安装器(sudo ./stack-manager.sh),它会询问访问模式(tunnel 或 public)、面板端口、TOTP、防火墙和 fail2ban;也支持用非交互式标志进行脚本化安装。
安装之前我的服务器需要什么?你需要 root 权限、出站 HTTPS 和 git。它运行在 Ubuntu 24.04、Debian 12/13、AlmaLinux/Rocky/CentOS Stream 9+ 以及 RHEL/Oracle Linux 9+ 上;明确不支持 Fedora。
目前的限制有哪些?目前还没有多用户 RBAC(仅限单个管理员),文件管理器有意不提供压缩包解压功能,捆绑的邮件服务器也没有 webmail、垃圾邮件过滤、配额或 catch-all 地址。
这是为谁打造的?面向运营单台 Linux 机器的 VPS 和裸金属管理员,他们想要干净的开箱引导,加上一个真正可用的“第二天”界面来管理网站、数据库、邮件和进程,而不是手工堆砌服务器配置。
它在任何 Linux 发行版上都能用吗?不是——它只在 Ubuntu 24.04、Debian 12/13、AlmaLinux 9+、Rocky Linux 9+、CentOS Stream 9+ 和 RHEL/Oracle Linux 9+(启用 SELinux enforcing 的 EL 路径)上验证过;安装器会明确拒绝 Fedora。
DNS 令牌和密码等机密信息安全吗?DNS-01 API 令牌和邮件/smarthost 机密以仅 root 可读的方式存储,且绝不通过命令行参数接收;其他机密通过环境变量或一次性 stdout 传递。
除引导堆栈外还能按需安装什么?从 Components 页面或 azerioid CLI,你可以添加 Nginx 或 Apache、MariaDB/PostgreSQL/MongoDB、Redis/Memcached、PHP 8.1-8.3 或 Node.js 20/22/24 运行时、Supervisor、完整邮件堆栈(Postfix+Dovecot+OpenDKIM)以及无根 Docker。
我的网站的 HTTPS 是怎么配置的?由 Caddy 终结 TLS,支持自动的 Let's Encrypt HTTP-01、自签名/内部 TLS,以及通过 Cloudflare 或 DigitalOcean 的 DNS-01(与内部 TLS 相比测试较少)。
每个站点可以用自己的引擎或运行时吗?可以——每个虚拟主机独立选择 Caddy、Apache 或 Nginx 作为引擎,还可以选择 Laravel Octane(FrankenPHP)、Node 的 PM2 集群模式或无根 Docker,而不是默认的 PHP-FPM。
面板默认暴露到互联网吗?不。默认访问模式是 localhost 隧道(127.0.0.1:3169);通过主机 IP 的公网 HTTPS 访问是安装时需要明确选择的选项。
作者
azerioid
大小
7 MB
星标
674
时长
3个月
提交 · 90 天