Install Admidio with LAMP Stack on AlmaLinux 8 by deploying Apache, MariaDB, and PHP 8.2, then completing the membership-management installer in your browser. Allow about 15–20 minutes for a clean VPS, including the initial HTTPS setup.
Prerequisites
- AlmaLinux 8.10 on a fresh VPS, with system updates available.
- At least 2 GB RAM and 10 GB free disk space for the application, database, uploads, and backups.
- Root access or a sudo-enabled user connected over SSH.
- A domain such as
YOUR_DOMAINwith an A record pointing to the VPS; ports 80 and 443 must be reachable. - A Linux server from VPSLake with a public IPv4 address.
- A long database password and a separate administrator password for the Admidio web installer.
Admidio 5 requires PHP 8.2 or newer and supports MariaDB 10 or newer. AlmaLinux 8.10 includes the PHP 8.2 Application Stream, so this guide selects that stream rather than installing the old PHP version that may be enabled by default. See the official Admidio download page for the current release and requirements.
Step 1: Install the LAMP packages
Use AlmaLinux’s dnf modules to select PHP 8.2, then install Apache, MariaDB, the PHP extensions Admidio needs, and the tools used later for extraction and SELinux labeling.
sudo dnf -y update
sudo dnf module reset php -y
sudo dnf module enable php:8.2 -y
sudo dnf install -y httpd mariadb-server php php-cli php-common php-fpm php-curl php-gd php-intl php-mbstring php-mysqlnd php-opcache php-pdo php-xml php-zip unzip curl policycoreutils-python-utils firewalld mod_ssl
sudo systemctl enable --now firewalld httpd mariadb php-fpm
sudo firewall-cmd --permanent --zone=public --add-service=ssh
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
Confirm that the selected PHP stream and both LAMP services are available before adding the application.
php -v
sudo systemctl is-active httpd mariadb php-fpm
PHP 8.2.x (cli) ...
active
active
active
Step 2: Secure MariaDB and create the Admidio database
The hardening script removes default accounts and test data; the SQL that follows gives Admidio access only to its own local database.
sudo mysql_secure_installation
When prompted, remove anonymous users, prevent remote root login, remove the test database, and reload the privilege tables. The exact root-password questions depend on the MariaDB package already installed on the VPS.
Create a database and a dedicated account. Replace YOUR_DB_PASSWORD with a unique password before running this block; do not reuse the VPS or Admidio administrator password.
sudo mariadb <<'SQL'
CREATE DATABASE admidio CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'admidio'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD';
GRANT ALL PRIVILEGES ON admidio.* TO 'admidio'@'localhost';
FLUSH PRIVILEGES;
SQL
The database remains bound to the server’s local MariaDB socket, so there is no reason to open port 3306 in the firewall.
Step 3: Create the Apache virtual host
A dedicated virtual host keeps Admidio’s files separate from other sites and enables its .htaccess rules.
Replace every YOUR_DOMAIN token in this block with the real hostname before you run it.
sudo mkdir -p /var/www/admidio
sudo tee /etc/httpd/conf.d/YOUR_DOMAIN.conf > /dev/null <<'APACHE'
<VirtualHost *:80>
ServerName YOUR_DOMAIN
DocumentRoot /var/www/admidio
<Directory /var/www/admidio>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DirectoryIndex index.php index.html
ErrorLog /var/log/httpd/YOUR_DOMAIN-error.log
CustomLog /var/log/httpd/YOUR_DOMAIN-access.log combined
</VirtualHost>
APACHE
sudo apachectl configtest
sudo systemctl reload httpd
Syntax OK
Step 4: Download Admidio and set safe permissions
Download the current release from the project’s official download endpoint, make the web server the owner only of Admidio’s data directory, and apply SELinux rules that survive a relabel or reboot.
cd /tmp
curl -fL -o admidio-5.0.16.zip 'https://sourceforge.net/projects/admidio/files/Admidio/5.0.x/admidio-5.0.16.zip/download'
sudo rm -rf /tmp/admidio-extract /var/www/admidio
sudo mkdir -p /tmp/admidio-extract /var/www/admidio
unzip -q admidio-5.0.16.zip -d /tmp/admidio-extract
src=$(find /tmp/admidio-extract -mindepth 1 -maxdepth 2 -type f -name index.php -print -quit)
test -n "$src"
sudo cp -a "$(dirname "$src")"/. /var/www/admidio/
Keep application code owned by root and writable application data owned by Apache. This avoids making the whole web root writable.
sudo chown -R root:apache /var/www/admidio
sudo find /var/www/admidio -type d -exec chmod 0755 {} \;
sudo find /var/www/admidio -type f -exec chmod 0644 {} \;
sudo chown -R apache:apache /var/www/admidio/adm_my_files
sudo find /var/www/admidio/adm_my_files -type d -exec chmod 0750 {} \;
sudo find /var/www/admidio/adm_my_files -type f -exec chmod 0640 {} \;
sudo semanage fcontext -a -t httpd_sys_content_t '/var/www/admidio(/.*)?'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/admidio/adm_my_files(/.*)?'
sudo restorecon -Rv /var/www/admidio
sudo apachectl configtest
sudo systemctl restart php-fpm httpd
The expected final check is Syntax OK; restorecon may also print the files whose labels it changed. Do not delete adm_my_files: Admidio uses it for its generated configuration, uploads, and other user data.
Step 5: Complete the Admidio web installer
The browser wizard writes config.php, checks PHP extensions, and creates the application tables from the database details you prepared.
Open http://YOUR_DOMAIN/ in a browser. Choose a language, then enter these values when the database page appears:
- Database type: MariaDB or MySQL
- Database host:
localhost - Database name:
admidio - Database user:
admidio - Database password: the value used for
YOUR_DB_PASSWORD - Database port: leave the default unless you changed MariaDB’s port
Continue with your organization name, sender email address, and the first administrator account. When the wizard finishes, sign in with that administrator account and remove the temporary ZIP file.
rm -f /tmp/admidio-5.0.16.zip
Step 6: Enable HTTPS with Let’s Encrypt
The membership portal handles personal data, so redirect its HTTP traffic to HTTPS after DNS resolves to this server.
Run this only after YOUR_DOMAIN points to the VPS and port 80 is reachable from the internet. Replace ADMIN_EMAIL with an address that receives certificate notices.
sudo dnf install -y epel-release
sudo dnf install -y certbot python3-certbot-apache
sudo certbot --apache --redirect --agree-tos --no-eff-email -m ADMIN_EMAIL -d YOUR_DOMAIN
Certbot updates the Apache configuration and installs automatic renewal hooks. Test renewal without replacing the live certificate:
sudo certbot renew --dry-run
Congratulations, all simulated renewals succeeded
Verify the installation
Check PHP’s required extensions, the database’s presence, and the public HTTPS response. A 200 or an expected redirect from the application confirms that Apache is serving Admidio.
php -m | grep -E 'curl|gd|intl|mbstring|PDO|pdo_mysql|SimpleXML|zip'
sudo mariadb -e "SHOW DATABASES LIKE 'admidio';"
sudo systemctl is-active httpd mariadb php-fpm
curl -I https://YOUR_DOMAIN/
curl
gd
intl
mbstring
PDO
pdo_mysql
SimpleXML
zip
admidio
active
active
active
HTTP/1.1 200 OK
Troubleshooting
No matching module streams for php:8.2
The server is probably not on the AlmaLinux 8.10 repositories or its DNF metadata is stale. Refresh metadata and confirm the release, then enable the stream again.
cat /etc/almalinux-release
sudo dnf clean all
sudo dnf makecache
sudo dnf module list php
sudo dnf module enable php:8.2 -y
Apache returns 403 Forbidden
The usual causes are an incorrect virtual-host path or an SELinux label that does not allow Apache to read the files. Check the vhost, reapply the persistent contexts, and inspect recent denials.
sudo apachectl -S
sudo restorecon -Rv /var/www/admidio
sudo ausearch -m AVC -ts recent
If the denial names adm_my_files, confirm that directory has the httpd_sys_rw_content_t type and that its owner is apache.
The installer reports a missing PHP extension
The PHP CLI and Apache module must use the same PHP stream. Check the version and loaded modules, install the missing package from the enabled 8.2 stream, and restart Apache.
php -v
php -m
sudo dnf module list php
sudo systemctl restart httpd
Access denied for user 'admidio'@'localhost'
The password in the browser must exactly match the password used when the MariaDB account was created. Reset that account locally, then enter the new value in the installer.
sudo mariadb
ALTER USER 'admidio'@'localhost' IDENTIFIED BY 'NEW_DB_PASSWORD';
FLUSH PRIVILEGES;
EXIT
Hardening
- Keep AlmaLinux and Admidio updated, and take a database plus
/var/www/admidio/adm_my_filesbackup before upgrades. - Leave MariaDB on localhost and expose only SSH, HTTP, and HTTPS through
firewalld. - Use a separate administrator password for Admidio and enable its available two-factor authentication after signing in.
- Review
/var/log/httpd/YOUR_DOMAIN-access.logand/var/log/httpd/YOUR_DOMAIN-error.logwhen diagnosing failed requests.
FAQ
Can Admidio run on AlmaLinux 8?
Yes. AlmaLinux 8.10 provides the PHP 8.2 stream required by the current Admidio release, and MariaDB from the distribution meets Admidio’s database requirement. Keep the server on the supported 8.x update channel.
Do I need to expose MariaDB to the internet?
No. The Apache and PHP application runs on the same VPS as MariaDB, so localhost is enough. Keeping port 3306 closed reduces the number of services reachable from outside.
Why does Admidio need a writable adm_my_files directory?
The installer stores config.php there, and the application uses the directory for uploads and generated data. Only that directory is writable by Apache in this guide; the application code remains owned by root.
Can I install Admidio without a domain name?
You can test the initial HTTP page with the VPS IP address, but HTTPS certificates normally require a domain name that resolves publicly. Use a domain before creating the production installation and administrator account.