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 — автономный менеджер стека и веб-панель управления для операторов, держащих сайты на одном Linux-сервере. Он разворачивает Caddy, выделенный пул PHP-FPM и админский интерфейс на SQLite, а затем позволяет по мере надобности добавлять веб-серверы, базы данных, кэш, почту, Node.js и rootless Docker.
Это библиотека для кода или отдельное серверное приложение?Это отдельное селф-хостед веб-приложение плюс соответствующий CLI (azerioid), построенное на Laravel 13 + Livewire 4 с базой панели на SQLite, а не библиотека для импорта в другой проект.
Как запустить его на своём сервере?Запустите интерактивный установщик с root-правами (sudo ./stack-manager.sh): он спросит режим доступа (туннель или публичный), порт панели, TOTP, файрвол и fail2ban; для установки скриптами поддерживаются и неинтерактивные флаги.
Что нужно серверу перед установкой?Нужны root-доступ, исходящий HTTPS и git. Работает на Ubuntu 24.04, Debian 12/13, AlmaLinux/Rocky/CentOS Stream 9+ и RHEL/Oracle Linux 9+; Fedora явно не поддерживается.
Каковы текущие ограничения?Мультипользовательского RBAC пока нет (только один админ), распаковка архивов намеренно не включена в Файловый менеджер, а комплектный почтовый сервер поставляется без веб-почты, спам-фильтра, квот и catch-all адресов.
Для кого это создано?Для операторов VPS и «железных» серверов с одной Linux-машиной, которым нужны чистый начальный разворот и настоящий интерфейс «второго дня» для сайтов, баз, почты и процессов, вместо ручного писания конфигов.
Работает ли он на любом Linux-дистрибутиве?Нет — проверено на Ubuntu 24.04, Debian 12/13, AlmaLinux 9+, Rocky Linux 9+, CentOS Stream 9+ и RHEL/Oracle Linux 9+ (EL-путь с принудительным SELinux); установщик явно отказывается работать с Fedora.
Секреты вроде DNS-токенов и паролей в безопасности?API-токены DNS-01 и секреты почты/smarthost хранятся только для root и никогда не принимаются через аргументы командной строки; остальные секреты передаются через окружение или одноразовый stdout.
Что можно доустановить по запросу сверх базового стека?Со страницы Components или через CLI azerioid можно добавить Nginx или Apache, MariaDB/PostgreSQL/MongoDB, Redis/Memcached, рантаймы PHP 8.1-8.3 или Node.js 20/22/24, Supervisor, полный почтовый стек (Postfix+Dovecot+OpenDKIM) и rootless Docker.
Как настраивается HTTPS для моих сайтов?TLS терминируется Caddy, которая поддерживает автоматический Let's Encrypt HTTP-01, самоподписанный/внутренний TLS и DNS-01 через Cloudflare или DigitalOcean (протестировано слабее, чем внутренний TLS).
Может ли каждый сайт работать на своём движке или рантайме?Да — каждый виртуальный хост независимо выбирает Caddy, Apache или Nginx как движок и может вместо стандартного PHP-FPM включить Laravel Octane (FrankenPHP), cluster-режим PM2 для Node или rootless Docker.
Панель по умолчанию открыта в интернет?Нет, режим доступа по умолчанию — туннель на localhost (127.0.0.1:3169); публичный HTTPS на IP хоста — явный выбор при установке.
Какие есть похожие проекты?caprover, mailcow-dockerized, acme.sh, docker-mailserver, speedtest, dokploy, all-in-one, openship
Автор
azerioid
Размер
7 MB
Звёзды
674
Возраст
3 мес
Коммиты · 90 дней