Skip to main content

Joomla LAMP Marketplace App

Version: 4.2.2   |   OS: Ubuntu 20.04

Overview

Joomla! is a free and open-source content management system (CMS) that helps you build powerful, dynamic websites and applications. This LAMP stack deployment provides a complete and secure Joomla hosting environment ready for development or production use.

Included Software

  • Joomla - 4.2.2
  • Apache - 2.4.41
  • MySQL - 8.0.32
  • PHP - 8.2
  • phpMyAdmin - 5.2.0
  • Postfix - 3.4.13
  • Certbot - 0.40.0

Getting Started

Firewall & Access

Allow only the required ports in your firewall:

PortServicePurpose
22SSH (rate limited)Server access
80HTTPWeb access
443HTTPSSecure web access

Initial Deployment

During setup:

  • MySQL root password is set
  • mysql_secure_installation is run
  • Joomla user and database are created
  • Joomla configuration is initialized
  • PHP settings are adjusted
  • Apache rewrite module is enabled
  • phpMyAdmin password is set

You will be logged out with the message:

Please wait until the installation is completed....
Connection to $IPADDRESS closed.

Please wait at least 2 minutes before logging in again.

SSH Access & Initial Setup

  • Log in as ubuntu using your credentials or SSH key
  • Switch to root:
sudo su -

On first login, the script will display passwords and prompt you to enter a domain:

Enter the domain name for your new Joomla site:
(ex. example.org or test.example.org)

The domain’s A record must point to the instance’s IP address.

Joomla Setup via Web Interface

After setup:

  • Access Joomla via browser:
http://$IPADDRESS

Or use the configured domain.

  • Complete Joomla installation through the web installer.

Stored Credentials & Paths

  • MySQL root password: /root/.mysql_root_password
  • Joomla DB info: /root/.joomla_database_details
  • phpMyAdmin credentials:
    • User: admin
    • Password: /root/.phpmyadmin_password
  • phpMyAdmin URL: http://$IPADDRESS/phpmyadmin
  • Web root: /var/www/html
  • Joomla config file: /var/www/html/configuration.php
  • phpMyAdmin config directory: /etc/phpmyadmin/

Apache Virtual Host Configuration

To host multiple Joomla sites:

  1. Create a directory for your domain:
mkdir -p /var/www/yourdomain.com/html
  1. Create a virtual host config file:
nano /etc/apache2/sites-available/yourdomain.com.conf
  1. Add the config:
<VirtualHost *:80>
ServerAdmin webmaster@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/yourdomain.com/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
  1. Enable site and reload Apache:
a2ensite yourdomain.com.conf
systemctl reload apache2

SSL Setup with Certbot

Ensure DNS A and www records point to your instance. Then run:

certbot --apache -d example.com -d www.example.com

Allow port 443 in the firewall. Optionally block port 80 after successful SSL setup.

Postfix Configuration

  1. Set a valid hostname:
hostnamectl set-hostname your.hostname.com
  1. Ensure DNS A and PTR records are in place.
  2. Update Postfix config:
nano /etc/postfix/main.cf

Set:

myhostname = your.hostname.com
  1. Restart Postfix:
systemctl restart postfix
  1. Test mail delivery:
echo "Postfix test" | mail -s "Subject" test@gmail.com

Emails may land in spam initially until IP reputation improves.

Best Practices

  • Change default passwords immediately
  • Secure Apache with headers and mod_security if needed
  • Enable automatic updates for Joomla and plugins
  • Regularly back up the database and configuration files

For support, contact Cloud4India Support.