A terminal-first, XAMPP-style local PHP stack for Arch Linux and CachyOS.
Apache • PHP-FPM • MariaDB • phpMyAdmin • Interactive CLI dashboard
⚠️ Disclaimer: This is an AI-assisted project.
- 🚀 One-command setup – Installs & configures Apache, PHP 8.x (PHP-FPM), MariaDB, and phpMyAdmin
- 🔄 Automatic installer update – Downloads the latest
localstack-arch-ui.shfromDotRYOT/localstack-archeach time you run it - 🧹 Built-in uninstall option – If the stack is already present, the script offers to remove the installed packages and generated config
- 🖥️ Interactive TUI dashboard – Manage services, inspect logs, fix permissions, and scaffold test projects without leaving the terminal
- ⚡ Modern PHP Handler – Uses PHP-FPM instead of legacy
mod_php(faster, lower memory, isolated pools) - 🔒 Secure by default – Runs
mariadb-secure-installation, configures socket-based PHP-FPM, and generates a random blowfish secret for phpMyAdmin - 📦 Arch Linux and CachyOS native – Follows standard filesystem layout (
/srv/http/,/etc/httpd/,systemd) - 🛠️ Zero external dependencies – Pure Bash + standard Arch utilities
- Arch Linux or CachyOS (rolling release)
sudoaccess for a regular user- Active internet connection for
pacmandownloads
- Download the script
curl -sSL https://raw.githubusercontent.com/DotRYOT/localstack-arch/main/localstack-arch-ui.sh -o localstack-arch-ui.sh- Make it executable
chmod +x localstack-arch-ui.sh- Run it
./localstack-arch-ui.shEach run checks https://raw.githubusercontent.com/DotRYOT/localstack-arch/main/localstack-arch-ui.sh and replaces the local script if a newer version is available, then restarts with the updated copy. If the download fails or the script file is not writable, setup continues with the current version.
If the script detects an existing localstack-arch install, it will prompt you to either reinstall/repair it or uninstall the stack entirely.
After installation, the script launches a persistent CLI menu.
- Check Service Status
- Restart All Services
- View Apache Logs
- Fix Web Root Permissions
- Create Test Project
- Exit
| Service | URL | Credentials |
|---|---|---|
| Apache Web Server | http://localhost | N/A |
| phpMyAdmin | http://localhost/phpmyadmin | root + password set during setup |
- 📁 Default web root:
/srv/http/ - 💡 Symlink projects:
sudo ln -s ~/myproject /srv/http/myproject - 🔑 Fix permissions:
sudo chown -R $USER:users /srv/http/
# Service control
sudo systemctl {start|stop|restart|status} httpd mariadb php-fpm
# View live logs
sudo journalctl -u httpd -f
sudo journalctl -u mariadb -f
sudo journalctl -u php-fpm -f
# Add PHP extensions
sudo pacman -S php-redis php-xdebug php-imagick
sudo systemctl restart php-fpm- Port 80 in use? Run
sudo lsof -i :80to find conflicts, or changeListen 80in/etc/httpd/conf/httpd.conf. - MariaDB root login fails? Run
sudo mysql_secure_installationagain, or reset viasudo mysql(no password on fresh install). - phpMyAdmin "Configuration incomplete" warning? The script auto-generates a
blowfish_secret. Verify/etc/webapps/phpMyAdmin/config.inc.phpexists and is not empty. - Need to remove everything? Run the installer again. If it detects the stack, choose the uninstall option.
PRs, issues, and feature requests are welcome.
Please follow:
- Fork and create a feature branch
- Use Git names in
MMDDYYYY/HHMMformat (24-hour time), for example:05272026/1751 - Keep changes POSIX/bash compliant
- Test on fresh Arch Linux and CachyOS VMs before submitting