Log inSign up

A Joomla site on your own VPS

Prepare Nginx, MariaDB and PHP 8.3 or newer, unpack the full Joomla package into /var/www/joomla and run php installation/joomla.php install with your site and database details. Add a try_files rule for search friendly URLs, a Certbot certificate and an SMTP relay, and the site is ready for content.

Topic: Websites, CMS and shops · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

Which Joomla version and PHP release should you use?

New sites should start on Joomla 6, which needs PHP 8.3 or newer and MariaDB 10.4+ or MySQL 8. Ubuntu 24.04 ships PHP 8.3 and Debian 13 ships PHP 8.4, so both work with stock packages. Debian 12 only has PHP 8.2; use Debian 13 there or stay on the Joomla 5 line, which still runs on PHP 8.1 and 8.2 for its remaining support period. On Rocky Linux 9 and AlmaLinux 9 check whether your minor release offers a php:8.3 module stream before you choose.

A brochure site or blog runs well on 1 to 2 GB of RAM. Have a sudo user ready, point example.net at the server through DNS records, and keep the LEMP stack guide nearby for background on each component.

How do you install PHP, Nginx and MariaDB?

Ubuntu 24.04 and Debian 13

sudo apt update
sudo apt install -y nginx mariadb-server php-fpm php-mysql php-xml php-mbstring php-zip php-gd php-intl php-curl php-opcache unzip
php -v

Rocky Linux 9 and AlmaLinux 9

sudo dnf module list php
sudo dnf module reset -y php
sudo dnf module enable -y php:8.3
sudo dnf install -y nginx mariadb-server php-fpm php-mysqlnd php-xml php-mbstring php-pecl-zip php-gd php-intl php-opcache unzip
sudo systemctl enable --now nginx mariadb php-fpm
php -v

If the module list stops at 8.2, install Joomla 5 instead or follow the PHP upgrade guide for a newer build. Switch PHP-FPM on the RHEL family to the nginx user in /etc/php-fpm.d/www.conf. Set upload_max_filesize = 32M, post_max_size = 32M and memory_limit = 256M in the FPM php.ini.

How do you create the Joomla database?

sudo mariadb-secure-installation
sudo mariadb -e "CREATE DATABASE joomla CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
sudo mariadb -e "CREATE USER 'joomla'@'localhost' IDENTIFIED BY 'joomla-db-secret';"
sudo mariadb -e "GRANT ALL ON joomla.* TO 'joomla'@'localhost';"
mariadb --version

A dedicated account limited to localhost means a leaked password is useless from outside, and it keeps Joomla away from other databases on the same server.

How do you download and install Joomla from the shell?

Copy the link to the latest Full Package zip from the official download page, then unpack it and run the CLI installer.

JOOMLA_URL="paste-the-full-package-zip-link-here"
cd /tmp
curl -L -o joomla.zip "$JOOMLA_URL"
sudo mkdir -p /var/www/joomla
sudo unzip -q joomla.zip -d /var/www/joomla
sudo chown -R www-data:www-data /var/www/joomla
cd /var/www/joomla
sudo -u www-data php installation/joomla.php install --site-name="Example Site" --admin-user="Site Owner" --admin-username=siteowner --admin-password=Long-admin-pass-2026 --admin-email=owner@example.net --db-type=mysqli --db-host=localhost --db-user=joomla --db-pass=joomla-db-secret --db-name=joomla --db-prefix=jx7_ --db-encryption=0

On Rocky and Alma use nginx:nginx as owner. The admin password must be at least 12 characters. A random table prefix such as jx7_ is a small extra hurdle for automated attacks. When the command finishes, confirm that the installation folder is gone and delete it with sudo rm -rf /var/www/joomla/installation if it is still there.

How do you configure Nginx for Joomla?

Route requests for non-existent files to index.php, block sensitive files and hand PHP to FPM.

server {
    listen 80;
    listen [::]:80;
    server_name example.net www.example.net;
    root /var/www/joomla;
    index index.php index.html;
    client_max_body_size 32m;

    location / { try_files $uri $uri/ /index.php?$args; }
    location ~ /\. { deny all; }
    location ~* /(configuration\.php|htaccess\.txt|web\.config\.txt)$ { deny all; }
    location ~ ^/(logs|tmp|cli)/ { deny all; }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
    location ~* \.(css|js|png|jpe?g|gif|svg|webp|woff2?)$ { expires 14d; }
}

Use the 8.4 socket on Debian 13 and /run/php-fpm/www.sock on Rocky and Alma (with include fastcgi_params; and a SCRIPT_FILENAME line). After sudo nginx -t and a reload, open System, Global Configuration and set Search Engine Friendly URLs and Use URL Rewriting to Yes, so pages lose the index.php prefix.

How do you add HTTPS and harden the site?

Open the web ports and obtain a certificate as in the Certbot guide.

sudo ufw allow 'Nginx Full'
sudo certbot --nginx -d example.net -d www.example.net --redirect

Rocky and Alma users open http and https with firewall-cmd instead. In Global Configuration, Server, set Force HTTPS to Entire Site. Then enable multi-factor authentication for every administrator under the user menu, keep the extension list short, and remove sample data you do not use. Restricting /administrator to your own address is easy in Nginx with a location block containing allow 198.51.100.24; deny all; plus the PHP handler.

How does Joomla send mail and run scheduled tasks?

Password resets and contact forms send mail, so configure SMTP under Global Configuration, Server, Mail: choose SMTP, port 587, STARTTLS and the relay credentials. SMTP relay for apps covers picking a relay. Direct sending on port 25 should not be planned without first asking support in a ticket.

Joomla has a built-in Scheduled Tasks manager. By default tasks run when visitors load pages; for exact timing switch to web cron or call the CLI from cron:

sudo crontab -u www-data -e
*/5 * * * * /usr/bin/php /var/www/joomla/cli/joomla.php scheduler:run --all

Test it by hand once with sudo -u www-data php /var/www/joomla/cli/joomla.php scheduler:list.

How do you update, back up and troubleshoot Joomla?

Core updates run from the CLI as well as from the Joomla Update component, which is handy on slow connections:

cd /var/www/joomla
sudo -u www-data php cli/joomla.php core:check-updates
sudo -u www-data php cli/joomla.php core:update
sudo -u www-data php cli/joomla.php extension:list

Before every update dump the database with mariadb-dump --single-transaction joomla and archive /var/www/joomla; the daily backups add-on gives a second layer. For a white page or a 500 error, set Error Reporting to Maximum in Global Configuration (or $error_reporting = 'maximum'; in configuration.php), read administrator/logs/ and the Nginx error log, then switch it back once fixed.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A1-2a company site or blog1 vCPU, 2 GB RAM, 50 GB NVMe$7.20/mo$43.20 for 6 months
A2-4many extensions and visitors2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months

Questions about Joomla on Nginx and PHP-FPM

Should I install Joomla 5 or Joomla 6?

Pick 6 for a new site if your server has PHP 8.3 or newer. Choose 5 only when an extension you rely on is not yet available for 6.

Where is the admin login?

Add /administrator to your domain, for example https://example.net/administrator.

Why do menu links return 404 after enabling URL rewriting?

The Nginx try_files line that passes unknown paths to index.php is missing. Add it and reload Nginx.

Can I move an existing Joomla site to this server?

Yes. Copy the files with rsync, import the database dump, then update the database credentials and paths in configuration.php.

How much RAM does Joomla need?

Around 1 GB for a small site; 2 GB or more for many extensions, multiple languages or heavier traffic.