Overview
Thestack command is used to install, manage, and remove server stack components (Nginx, PHP, MySQL/MariaDB) and related tools.
Syntax:
Installation Options
-html / -nginx
Install Nginx web server.
Example:
-php
Install PHP-FPM.
Example:
-mysql
Install MySQL or MariaDB server.
Example:
-lemp
Install complete LEMP stack (Linux, Nginx, MySQL/MariaDB, PHP).
Example:
light- Minimal installation without additional toolsbasic- Standard installation with essential tools (default)
Additional Tools
-letsencrypt
Install Let’s Encrypt (Certbot) for SSL certificates.
Example:
-backups
Install backup tools (duplicity, duply).
Example:
-postfix
Install Postfix mail server for PHP mail() function.
Example:
-redis
Install Redis with PHP Redis extension.
Example:
-memcached
Install Memcached with PHP Memcached extension.
Example:
-pma
Install phpMyAdmin.
Example:
Version Management
-php-ver
Change PHP version.
Example:
- Installed PHP tools (Postfix, Redis, Memcached)
- phpMyAdmin installation
- SMTP configuration
- Site configurations
-mysql-ver
Change MySQL/MariaDB version.
For MariaDB:
- Downgrading MySQL/MariaDB is not supported
- phpMyAdmin is preserved during version changes
- Data is kept during version upgrades
- Cannot mix MySQL and MariaDB data
Removal Options
-purge
Remove stack components.
Remove Nginx:
-purge-server-all
Remove entire Webinoly stack.
Example:
- Nginx and all sites
- PHP-FPM and all extensions
- MySQL/MariaDB and all databases
- Let’s Encrypt certificates
- Backup tools
- Postfix
- Redis
- Memcached
- phpMyAdmin
- Pre-installed packages (pwgen, unzip)
- Swap (if created by Webinoly)
- All configuration files
Information
-info
Display stack information.
Example:
- Installed components and versions
- Service status
- Resource usage
- Configuration details
Arguments
-build
Specify build mode for installations.
Available modes:
light mode:
- Minimal installation
- No additional tools
- Suitable for containers or minimal setups
- Standard installation
- Includes recommended tools
- Postfix (for PHP mail)
- Redis (for object caching)
- Memcached (for session storage)
-purge
Control removal behavior.
Values:
- No value - Standard removal with confirmation
force- Skip confirmation promptskeep-data- Remove packages but keep data and configuration
Component Details
Nginx Installation
When installing Nginx, the following is configured:- Official Nginx repository
- Optimized nginx.conf
- FastCGI cache setup
- Security headers
- Default site
- Admin tools site
- SSL certificate for default site
- kTLS module support
- Gzip compression
- Brotli compression (if available)
/etc/nginx/nginx.conf- Main configuration/etc/nginx/sites-available/- Site configurations/etc/nginx/sites-enabled/- Enabled sites/etc/nginx/common/- Common configuration includes/var/www/- Web root directory/var/run/nginx-cache/- FastCGI cache directory
PHP Installation
When installing PHP, the following is configured:- Ondřej Surý’s PHP PPA (Ubuntu)
- PHP-FPM with optimized settings
- Required PHP extensions:
- php-fpm - FastCGI Process Manager
- php-common - Common files
- php-cli - Command-line interface
- php-curl - cURL support
- php-gd - GD graphics library
- php-imap - IMAP support
- php-readline - Readline support
- php-mysql - MySQL/MariaDB support
- php-mbstring - Multibyte string support
- php-bcmath - BCMath arbitrary precision mathematics
- php-zip - ZIP archive support
- php-xml - XML support
- php-soap - SOAP support
- php-imagick - ImageMagick support
- php-msgpack - MessagePack support
- php-igbinary - Igbinary support
- php-intl - Internationalization support
- php-opcache - Zend OPcache (PHP 5.6-8.4)
- Pool configuration at
/etc/php/{ver}/fpm/pool.d/www.conf - php.ini at
/etc/php/{ver}/fpm/php.ini - PHP info page at tools site
- PHP status page at tools site
MySQL/MariaDB Installation
MariaDB (default):- Official MariaDB repository
- Secure installation
- Root and admin users created
- Optimized configuration
- Official MySQL repository
- Secure installation
- Root and admin users created
- Optimized configuration
/etc/mysql/my.cnf- Main configuration/etc/mysql/conf.d/- Additional configurations/var/lib/mysql/- Data directory
- Root password stored in Webinoly config
- Admin user for Webinoly operations
- MySQL client login file at
~/.my.cnf
Let’s Encrypt Installation
Installs Certbot snap package with:- Automatic certificate renewal
- Cron job for renewals (runs twice daily)
- DNS plugins available
- HTTP-01 and DNS-01 challenge support
Backup Tools Installation
Installs:- Duplicity - Encrypted bandwidth-efficient backup
- Duply - Frontend for duplicity
- python3-boto3 - AWS S3 support
- Profiles stored at
~/.duply/ - Supports local and S3 backups
- Encryption supported
Postfix Installation
Installs Postfix configured as:- Internet Site mode
- Local delivery disabled
- SMTP relay support
- Sendmail compatibility
- Main config at
/etc/postfix/main.cf - Enables PHP mail() function
Redis Installation
Installs:- Redis server (latest from Redis PPA)
- PHP Redis extension
- Persistent storage configuration
- Unix socket for PHP-FPM
- Config at
/etc/redis/redis.conf - Socket at
/var/run/redis/redis-server.sock - Default maxmemory policy: allkeys-lru
Memcached Installation
Installs:- Memcached server
- PHP Memcached extension
- PHP Memcache extension (legacy, PHP 5.6-8.4)
- Config at
/etc/memcached.conf - Default memory: 64MB
- Unix socket support
phpMyAdmin Installation
Installs:- Latest phpMyAdmin
- Blowfish secret configured
- TempDir configured
- Access via tools site
/var/www/{tools-site}/htdocs/pma/- Access at
https://{tools-site}/pma/
Common Usage Examples
Install complete LEMP stack
Install Nginx and PHP only
Add Redis to existing installation
Upgrade PHP version
Upgrade MariaDB version
Install minimal stack (for Docker)
Remove Nginx keeping sites data
Remove entire stack
Install backup tools
Install phpMyAdmin
Version Compatibility
PHP Version Support
| Version | Status | Ubuntu Support |
|---|---|---|
| 5.6 | Legacy | All versions |
| 7.0 | Legacy | All versions |
| 7.1 | Legacy | All versions |
| 7.2 | Legacy | All versions |
| 7.3 | Legacy | All versions |
| 7.4 | Maintenance | All versions |
| 8.0 | Security | All versions |
| 8.1 | Active | All versions |
| 8.2 | Active | All versions |
| 8.3 | Active | All versions |
| 8.4 | Active | All versions |
| 8.5 | Current | All versions |
MySQL Version Support
| Version | Status | Architecture |
|---|---|---|
| 8.0 | LTS | x86_64 only |
| 8.4 | Innovation | x86_64 only |
| 9.1 | Innovation | x86_64 only |
| 9.2 | Innovation | x86_64 only |
MariaDB Version Support
| Version | Status | Support Until |
|---|---|---|
| 10.5 | Maintenance | June 2025 |
| 10.6 | LTS | July 2026 |
| 10.11 | LTS | February 2028 |
| 11.4 | LTS | May 2029 |
| 11.8 | Current | - |
Stack Removal Behavior
Nginx Removal
Standard removal:- Removes all sites
- Removes Let’s Encrypt certificates
- Removes phpMyAdmin
- Removes backup tools
- Removes all configuration
- Removes
/var/www/directory
- Removes Nginx package
- Keeps sites data in
/var/www/ - Keeps site configurations
- Keeps SSL certificates
- Can be reinstalled later
PHP Removal
Removes:- PHP-FPM and all extensions
- Postfix (if installed)
- Redis (if installed)
- Memcached (if installed)
- phpMyAdmin (depends on PHP)
- SMTP configuration
- PHP configuration files
MySQL/MariaDB Removal
Standard removal:- Removes all databases
- Removes all users
- Removes configuration files
- Removes phpMyAdmin
- Cannot be recovered
- Removes packages
- Keeps data directory (
/var/lib/mysql/) - Keeps configuration
- Can be reinstalled later
- Important: Make backups before reinstalling