Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsAdd-ons

phpMyAdmin

Install phpMyAdmin next to an existing web and database server, on Debian-family systems or Alpine.

phpmyadmin.sh downloads the latest phpMyAdmin release from files.phpmyadmin.net, installs the PHP packages it needs and configures the web server.

Run itInside the container or VM that should serve phpMyAdmin. The script has no Proxmox VE host check
Supported OSDebian family (checks /etc/debian_version) and Alpine. Anything else exits with code 238
Port80
Sourcetools/addon/phpmyadmin.sh

Run

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/phpmyadmin.sh)"

Prompts

PromptAnswer
Would you like to install phpMyAdmin? (y/n):y installs. Anything else exits

When phpMyAdmin is already installed:

PromptAnswer
Would you like to Update (1), Uninstall (2) or Cancel (3)? [1/2/3]:1 updates, 2 uninstalls, 3 exits. Anything else exits with code 112

"Installed" means: on Debian, /var/www/html/phpMyAdmin/config.inc.php exists; on Alpine, /usr/share/phpmyadmin exists and the lighttpd service reports a status.

What it creates

Debian familyAlpine
PackagesWhichever of php, php-mysqli, php-mbstring, php-zip, php-gd, php-json, php-curl are missinglighttpd, php, php-fpm, php-session, php-json, php-mysqli, curl, tar, openssl
Install directory/var/www/html/phpMyAdmin (owned by www-data)/usr/share/phpmyadmin
Configurationconfig.inc.php copied from config.sample.inc.php with a random blowfish_secret, mode 660/etc/lighttpd/lighttpd.conf is replaced with one that serves the install directory on port 80 through PHP-FPM on 127.0.0.1:9000
Servicesapache2 is restartedThe php-fpm service matching the PHP version and lighttpd are started and added to the default runlevel
Addresshttp://<ip>/phpMyAdminhttp://<ip>/

The script creates no database accounts. You log in with accounts of your MySQL or MariaDB server.

Before downloading, the script checks that https://github.com answers and exits with code 115 if it does not. The version comes from the latest phpmyadmin/phpmyadmin GitHub release; if that lookup fails, 5.2.2 is used.

Update

Run the script again and answer 1. It downloads the latest release, backs up config.inc.php, upload, save, tmp and themes to /opt/phpmyadmin_backup, unpacks the new release over the install directory, restores the backup and runs the configuration step again.

There is no type=update mode and no update_ helper, so the container's update command does not offer phpMyAdmin.

Remove

Answer 2. The web server is stopped, the install directory is deleted and the web server is restarted. On Alpine /etc/lighttpd/lighttpd.conf is deleted as well. Installed packages stay.

Limits

  • On Debian the script restarts apache2 but installs only the PHP packages listed above. It expects Apache to be the web server.
  • On Debian the configuration step that ends every update copies config.sample.inc.php over config.inc.php and writes a new blowfish_secret. Settings you added to config.inc.php are replaced; keep a copy before updating.
  • On Alpine an existing /etc/lighttpd/lighttpd.conf is overwritten.