项目的 README,来自 github.com/azerioid/azerioid-stack-manager。合并为一个 markdown 文件:README.md。
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.
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 |
|---|---|
![]() |
![]() |
| Virtual hosts · row actions | Docker runtime filter |
|---|---|
![]() |
![]() |
| Databases | |
|---|---|
![]() |
![]() |
| Terminal | File Manager + editor |
|---|---|
![]() |
![]() |
| Components | Security |
|---|---|
![]() |
![]() |
| 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 |
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) |
| 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) |
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.
:80/:443. The runtime (PHP-FPM, Octane, PM2 or Docker) is chosen at creation or switched later.X-Hub-Signature-256 or GitLab token; the secret is shown once; a push to
any other branch is ignored).REPLACE-MTA; deleting a site that has mail needs DROP-MAIL..env lines; enforce per-site users when every site
that uses Redis has its own.azerioid calls the same broker actions as the dashboard (logged as origin=cli).azerioid panel update check|apply installs only tags on main,
refuses a dirty source tree, deploys only the release you were shown, and rolls back if an update fails
midway.:443; IP:3169 and an SSH tunnel stay available.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.
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:
tunnel (default, 127.0.0.1:3169) or public (HTTPS on the host IP)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.
azerioid-panel, the only account with the sudoers entry for the
broker. The broker accepts a fixed list of actions and re-validates every input.registry/components/ can be installed. Every
third-party repository trusts only a signing key pinned by fingerprint, and no vendor setup script is
piped into a shell. PM2 is installed from a lockfile shipped in this repository.docker.service/docker.socket are masked and there is no docker
group.mynetworks is localhost only and SASL is on submission ports only. There is
an open-relay self-test.main.Design decisions and their reasoning: docs/DECISIONS.md (ADRs), docs/SPEC.md,
docs/port-ownership.md. Reporting a vulnerability: SECURITY.md.
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.
General
Sites and runtimes
memory_limit) plus concurrency (pm.max_children), not a total cap..htaccess cannot use rewrite, redirect, handler or proxy directives (they are ignored). PHP
sites route through FallbackResource /index.php; custom RewriteRules belong in the vhost, not .htaccess.app.down alert, but does not prevent it.mail(),
sendmail, loopback SMTP, the Mail page's test message) is relayed unsigned.From: header is not checked against it.Caches and search
php artisan cache:clear on
a Redis store fails because FLUSHDB is refused.Backups
Web and updates
azerioid panel default-site).Not yet exercised on a live host (covered by tests only):
mongodump;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.
The code in this repository is written by an AI coding agent, Claude Code (Anthropic), working under the maintainer's direction. The maintainer:
docs/DECISIONS.md;Every change also goes through the automated test suite and CI.
MIT — see LICENSE.
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.