Coppermine Photo Gallery
Overview
Coppermine Photo Gallery is a mature, open-source, multi-user web photo gallery on the classic LAMP stack. It offers categories and albums, user accounts with per-album permissions, uploads, comments, ratings, EXIF display, keyword search and e-cards.
This SecureAnyCloud image installs Coppermine 1.6.29 on a LAMP stack from the Ubuntu 24.04 repositories (nginx, PHP 8.3-FPM and MariaDB). The installation is completed at build time, so there is no web setup wizard to work through. A small sample gallery is seeded, so a fresh VM shows real thumbnails immediately.
What you get:
- Coppermine Photo Gallery 1.6.29 (GPL-3.0) served on port 80 by nginx through the PHP 8.3-FPM FastCGI socket
- Thumbnails created by the bundled PHP GD extension, with no external image tooling required
- A seeded public sample album with rendered thumbnails, so the gallery is not empty on first launch
- MariaDB on loopback only, with its data directory on a dedicated Azure data disk
- A dedicated Azure data disk at
/var/lib/copperminefor the database and all uploaded photos - A database password, administrator account and site security token generated uniquely on the first boot of each VM
- The installer (
install.php) removed after setup, so it can never be re-run nginx.service,php8.3-fpm.serviceandmariadb.serviceas enabled, active systemd units- 24/7 SecureAnyCloud support
Prerequisites
You need an active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region.
Standard_B2s (2 vCPU / 4 GiB RAM) is a good starting size.
Configure the network security group (NSG) to allow inbound 22/tcp from your management network and 80/tcp for the Coppermine web interface. For public exposure, put TLS in front of it (see Enabling HTTPS in Step 12).
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for Coppermine Photo Gallery by SecureAnyCloud, and select Create.
On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80).
Review the dedicated data disk on the Disks tab, then select Review + create and Create.
Step 2 - Deploy with the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:coppermine-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> --name coppermine \
--image sac1647283583153:coppermine-ubuntu-24-04:default:latest \
--size Standard_B2s \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name coppermine --port 80 --priority 1010Step 3 - Connect to your VM
ssh azureuser@<vm-public-ip>Step 4 - Confirm the LAMP stack is running
On first boot, Coppermine rotates its database password, resets the administrator account to a fresh per-VM password, rotates the site security token and starts the stack. Confirm that all three services are active:
systemctl is-active nginx php8.3-fpm mariadbEach service reports active. Next, check the component versions and confirm that the gallery answers on port 80:
php -v | head -1 mariadb --version curl -s -o /dev/null -w 'HTTP %{http_code}\n' http://127.0.0.1/The gallery home returns HTTP 200. MariaDB listens on loopback only, and PHP-FPM runs on a Unix socket rather than a TCP port.
Step 5 - Retrieve the administrator password
Your VM generates its own administrator account on first boot. Read the credentials file as root:
sudo cat /root/coppermine-credentials.txtThe file (mode 600, owned by root) contains the login (admin), the sign-in URL and a unique password, plus the database name, user and password. The login form rejects every guessable default password. A fresh instance has exactly one account, your administrator.
Step 6 - Browse to your gallery
Browse to http://<vm-public-ip>/. The image ships with a seeded sample album, so you see a working gallery with rendered thumbnails instead of an empty install.
Step 7 - Sign in as the administrator
Browse to http://<vm-public-ip>/login.php. Sign in as admin with the password from the credentials file.
Step 8 - Browse an album and view a photo
Open the sample album from the gallery home to see its thumbnails. Coppermine automatically generates a thumbnail and an intermediate-size copy of every uploaded photo, so albums stay fast to browse.
Click any thumbnail to view the photo at intermediate size. A film strip of the rest of the album and navigation controls appear alongside it.
Step 9 - Create albums and upload your own photos
While signed in as the administrator, use the gallery menu to open the album and category managers. Create a category and add one or more albums to it. Then upload photos into an album. Coppermine builds the thumbnails and intermediate images for you.
You can delete the seeded sample album at any time.
Step 10 - How the image is secured
The Coppermine installer (install.php) and phpinfo.php are removed after the build, so a visitor cannot re-run the installer or read your server configuration. The database credential in include/config.inc.php and the sql/ schema files are denied over HTTP. Only the gallery itself is served. Confirm it:
curl -s -o /dev/null -w 'install.php HTTP %{http_code}\n' http://127.0.0.1/install.php
curl -s -o /dev/null -w 'config.inc.php HTTP %{http_code}\n' http://127.0.0.1/include/config.inc.phpBoth requests return HTTP 404 or 403.
Step 11 - The dedicated data disk
The MariaDB database and every uploaded photo (originals plus generated thumbnails) live on a dedicated Azure data disk mounted at /var/lib/coppermine, separate from the OS disk. Your gallery stays independent of the OS image, and you can resize the disk as your collection grows. Check the mount:
df -h /var/lib/coppermine findmnt /var/lib/coppermine readlink -f /var/www/coppermine/albumsThe albums/ directory resolves onto the data disk, and MariaDB's data directory is /var/lib/coppermine/mysql.
Step 12 - Enabling HTTPS
For any public deployment, put TLS in front of Coppermine. Point a DNS A record at your VM's public IP, then install a certificate with Certbot and the nginx plugin. Do the following on your VM, using your own domain name and contact email in place of the example values:
- Install Certbot:
sudo apt-get update && sudo apt-get install -y certbot python3-certbot-nginx - Obtain and install a certificate for your domain by running Certbot with the nginx plugin for
your-domain.example.com. Supply your contact email when prompted. - Coppermine derives its base URL from the request, so it switches generated links to
https://automatically once TLS is terminated in front of it. No configuration change is required.
Certbot installs a renewal timer automatically, and certificates renew without further action.
Step 13 - Maintenance
- Updates: The OS continues to receive unattended security updates. Update Coppermine itself from the admin tools, or replace the application files with a newer 1.6.x release and run its upgrade routine.
- Backups: Back up the MariaDB
copperminedatabase (for example withmysqldump) and the/var/lib/coppermine/albumsdirectory. Together they hold your gallery data and every uploaded photo. - Logs: Web server logs are under
/var/log/nginx/. PHP-FPM logs are in/var/log/php8.3-fpm.log.
Support
SecureAnyCloud maintains this image and provides 24/7 support. For help deploying or operating Coppermine Photo Gallery on Azure, contact the SecureAnyCloud team through the SecureAnyCloud website.
Deploy on Azure
Launch Coppermine Photo Gallery 1.6 on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com