Overview
Envloom manages the lifecycle of all runtime services automatically, with options for manual control and auto-start configuration.PHP-FPM
Per-version FastCGI processes
Nginx
Web server with auto-reload
MariaDB
Database server with graceful shutdown
Service Status Monitoring
Real-Time Status Display
The Dashboard shows live service status with automatic updates:Service status structure
Status States
- Running
- Stopped
- Starting
- Error
Service is active and responding
- Process is running (e.g.,
nginx.exe,php-cgi.exe,mariadbd.exe) - Port is listening (verified via TCP connection)
- Status badge shows green/success state
PHP-FPM Service Management
Multi-Version Architecture
Envloom runs all installed PHP versions simultaneously as separatephp-cgi.exe processes:
PHP-FPM processes
Automatic Startup
Start Each Version
For each installed PHP version:
- Calculate port:
base_port + (major * 10 + minor) - Verify
php-cgi.exeexists - Launch hidden process:
php-cgi.exe -b {port} -c {php.ini} - Wait up to 3 seconds for port to open
PHP-FPM processes run as hidden windows (
CREATE_NO_WINDOW flag) to avoid console popups.Graceful Shutdown
When stopping PHP-FPM (or when Envloom closes):Shutdown sequence (src-tauri/src/lib.rs:439-462)
Restart Behavior
Restart = Stop → Start:- Kill all PHP-FPM processes (via shutdown sequence)
- Wait for confirmation that processes stopped
- Re-launch each installed version
- Verify each port is listening
Nginx Service Management
Automatic Configuration
Before starting, Nginx configuration is validated:Nginx startup (src-tauri/src/lib.rs:2502-2550)
If Nginx exits immediately after start, Envloom displays the last 80 lines of
logs/nginx/error.log.Reload on Configuration Change
When site configs change (e.g., SSL toggle, PHP version switch), Nginx is reloaded without downtime:Graceful reload (src-tauri/src/lib.rs:2575-2596)
- New site created
- Site deleted/unlinked
- SSL enabled/disabled for a site
- PHP version changed for a site
- Manual Reload All action
Graceful Shutdown
Nginx stop sequence (src-tauri/src/lib.rs:2552-2573)
MariaDB Service Management
Initialization & First Start
When MariaDB is first installed:Auto-Start Behavior
MariaDB auto-starts only if already installed:Auto-start logic
Unlike PHP and Nginx, MariaDB is not downloaded during bootstrap. You must manually install it first.
Enhanced Stop Logic
MariaDB shutdown is reinforced with multiple fallback mechanisms:MariaDB stop sequence (src-tauri/src/lib.rs:2076)
Global Service Actions
Start All
From the Dashboard or system tray, click Start All to:- Start all installed PHP-FPM versions
- Start Nginx (if installed)
- Start MariaDB (if installed and configured)
Services are started in sequence, not in parallel. Nginx starts after PHP-FPM to ensure FastCGI backends are ready.
Stop All
From the Dashboard or system tray, click Stop All to:- Stop Nginx (graceful shutdown)
- Stop all PHP-FPM processes
- Stop MariaDB (shutdown + port verification)
Reload All
From the system tray, click Reload All to:- Nginx:
nginx -s reload(graceful config reload) - PHP-FPM: Restart all processes (stop → start)
- MariaDB: No action (restart required via Stop → Start)
Reload All does not restart MariaDB. Use Stop All → Start All if you need to restart the database.
Auto-Start Configuration
Settings Control
- Enable Auto-Start
- Disable Auto-Start
Navigate to Settings and toggle Auto-start services:Behavior:
settings (config.json)
- Services start automatically when Envloom launches
- Default: enabled
Start with Windows
Envloom can launch when Windows starts:Start with Windows + Auto-start services = Fully automated local development stack on boot.
Automatic Shutdown on Exit
Clean Exit Behavior
When you close Envloom (via window close or Quit from tray):Shutdown handler (src-tauri/src/lib.rs:5902-5912)
Force Quit Protection
If Envloom crashes or is force-killed:- PHP-FPM: Orphaned
php-cgi.exeprocesses may remain - Nginx: Nginx processes may stay running
- MariaDB: MariaDB may require manual
mysqladmin shutdown
Manual cleanup after crash
System Tray Service Controls
The system tray menu provides quick access to service actions:Dynamic Menu Updates
The tray menu refreshes automatically after:- Service start/stop/reload
- PHP version switch
- MariaDB version switch
- Site creation/deletion
The menu shows real-time current versions and service states.
Service Logs
View service logs from the Logs page:PHP Logs
- Location:
logs/php/php-{major}_{minor}.error.log - Selector: Choose “Current” or specific version (e.g., “8.3”)
- Content: PHP errors, warnings, and notices
Nginx Logs
- General Access:
logs/nginx/access.log - General Error:
logs/nginx/error.log - Per-Site Access:
logs/nginx/sites/{domain}.access.log - Per-Site Error:
logs/nginx/sites/{domain}.error.log
MariaDB Logs
- Error Log:
logs/mariadb/mariadb.error.log - General Log:
logs/mariadb/mariadb.general.log - Slow Query Log:
logs/mariadb/mariadb.slow.log
Logs are displayed using
@melloware/react-logviewer with auto-refresh capability.CLI Service Commands
Future CLI commands (not yet available)
Troubleshooting
PHP-FPM Won’t Start
- Port conflict: Check if port is in use
- Missing php-cgi.exe: Verify file exists in
bin/php/{version}/php-cgi.exe - Config error: Check
bin/php/{version}/php.inisyntax - Logs: Review
logs/php/php-{version}.error.log
Nginx Won’t Start
- Config test: Run
nginx -tmanually - Port 80/443 in use: Close other web servers (IIS, Apache, etc.)
- SSL cert missing: Ensure certificates exist in
sites/certs/ - Error log: Check
logs/nginx/error.log
MariaDB Won’t Start
- Not initialized: Run installation from Runtime > MariaDB
- Port 3306 conflict: Change port in MariaDB settings
- Data directory: Verify
bin/mariadb/{version}/dataexists - Error log: Review
logs/mariadb/mariadb.error.log
Services Don’t Stop
- Force kill: Use Task Manager to end processes
- Check locks: Ensure no other app is using service ports
- Restart Envloom: Close and reopen to reset service state
Related Documentation
Runtime Management
Install and configure PHP, Node, MariaDB, Nginx
Site Management
Configure per-site PHP versions and services