docker.recipes

Piwigo

intermediate

Photo gallery software for the web.

Overview

Piwigo is a mature, open-source photo gallery software designed to organize and share digital photo collections through a web interface. Originally launched in 2002 as PhpWebGallery, Piwigo has evolved into a feature-rich platform offering advanced photo management capabilities including metadata handling, batch operations, user permissions, and extensive customization through themes and plugins. The software excels at handling large photo collections with automatic thumbnail generation, EXIF data extraction, and sophisticated album organization. This Docker stack combines Piwigo with MariaDB to create a robust photo gallery solution that handles both the web application layer and database persistence. MariaDB serves as the backend database storing album structures, user accounts, photo metadata, comments, and configuration settings, while Piwigo manages the web interface, image processing, and file organization. The LinuxServer.io Piwigo image includes PHP-FMP and nginx, providing optimized performance for photo serving and thumbnail generation. Photographers, families, organizations, and businesses managing substantial photo collections will benefit from this deployment. The combination offers professional-grade photo organization with features like batch metadata editing, watermarking, GPS coordinate mapping, and multi-user collaboration, making it suitable for everything from personal family archives to professional photography studios and corporate media libraries.

Key Features

  • Automatic EXIF data extraction and display including camera settings, GPS coordinates, and shooting parameters
  • Batch photo upload via web interface, FTP, or directory synchronization with automatic thumbnail generation
  • Advanced user permission system with album-specific access controls and guest browsing options
  • Plugin ecosystem with 300+ extensions including Lightroom synchronization, slideshow generators, and social sharing
  • MariaDB Aria storage engine optimization for improved photo metadata indexing and search performance
  • Watermark application with customizable positioning, transparency, and batch processing capabilities
  • Mobile-responsive interface with touch-friendly navigation and optimized image loading
  • Advanced search functionality across EXIF data, keywords, albums, and custom metadata fields

Common Use Cases

  • 1Professional photography studios organizing client shoots with album-specific access permissions
  • 2Family photo archives with multi-generational access and privacy controls for different album collections
  • 3Real estate agencies managing property photo galleries with location-based organization and client access
  • 4Educational institutions creating visual course materials and student project galleries
  • 5Corporate media libraries for marketing teams managing brand assets and campaign photography
  • 6Event photography businesses providing client galleries with download and sharing capabilities
  • 7Historical societies digitizing and organizing archival photograph collections with metadata preservation

Prerequisites

  • Minimum 1GB RAM for MariaDB database operations and photo thumbnail generation
  • Available port 80 for web interface access or alternative port configuration
  • Docker environment variables DB_ROOT_PASSWORD and DB_PASSWORD configured in .env file
  • Sufficient storage space for original photos, generated thumbnails, and database growth
  • Basic understanding of photo file formats and web gallery management concepts
  • Network access planning for multi-user environments and potential reverse proxy integration

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 piwigo:
3 image: lscr.io/linuxserver/piwigo:latest
4 container_name: piwigo
5 restart: unless-stopped
6 environment:
7 PUID: 1000
8 PGID: 1000
9 TZ: UTC
10 volumes:
11 - piwigo_config:/config
12 - piwigo_gallery:/gallery
13 ports:
14 - "80:80"
15 depends_on:
16 - mariadb
17 networks:
18 - piwigo
19
20 mariadb:
21 image: mariadb:10.11
22 container_name: piwigo-mariadb
23 restart: unless-stopped
24 environment:
25 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
26 MARIADB_DATABASE: piwigo
27 MARIADB_USER: piwigo
28 MARIADB_PASSWORD: ${DB_PASSWORD}
29 volumes:
30 - mariadb_data:/var/lib/mysql
31 networks:
32 - piwigo
33
34volumes:
35 piwigo_config:
36 piwigo_gallery:
37 mariadb_data:
38
39networks:
40 piwigo:
41 driver: bridge

.env Template

.env
1DB_ROOT_PASSWORD=rootpassword
2DB_PASSWORD=piwigo

Usage Notes

  1. 1Docs: https://piwigo.org/doc/
  2. 2Access at http://localhost - follow setup wizard (DB host: mariadb)
  3. 3Rich plugin ecosystem: 300+ plugins available
  4. 4Batch upload via FTP or web - Piwigo scans /gallery
  5. 5Multi-user with permissions, guest access, privacy settings
  6. 6Desktop sync: digiKam, Lightroom plugins available

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

piwigo
piwigo:
  image: lscr.io/linuxserver/piwigo:latest
  container_name: piwigo
  restart: unless-stopped
  environment:
    PUID: 1000
    PGID: 1000
    TZ: UTC
  volumes:
    - piwigo_config:/config
    - piwigo_gallery:/gallery
  ports:
    - "80:80"
  depends_on:
    - mariadb
  networks:
    - piwigo
mariadb
mariadb:
  image: mariadb:10.11
  container_name: piwigo-mariadb
  restart: unless-stopped
  environment:
    MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
    MARIADB_DATABASE: piwigo
    MARIADB_USER: piwigo
    MARIADB_PASSWORD: ${DB_PASSWORD}
  volumes:
    - mariadb_data:/var/lib/mysql
  networks:
    - piwigo

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 piwigo:
5 image: lscr.io/linuxserver/piwigo:latest
6 container_name: piwigo
7 restart: unless-stopped
8 environment:
9 PUID: 1000
10 PGID: 1000
11 TZ: UTC
12 volumes:
13 - piwigo_config:/config
14 - piwigo_gallery:/gallery
15 ports:
16 - "80:80"
17 depends_on:
18 - mariadb
19 networks:
20 - piwigo
21
22 mariadb:
23 image: mariadb:10.11
24 container_name: piwigo-mariadb
25 restart: unless-stopped
26 environment:
27 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
28 MARIADB_DATABASE: piwigo
29 MARIADB_USER: piwigo
30 MARIADB_PASSWORD: ${DB_PASSWORD}
31 volumes:
32 - mariadb_data:/var/lib/mysql
33 networks:
34 - piwigo
35
36volumes:
37 piwigo_config:
38 piwigo_gallery:
39 mariadb_data:
40
41networks:
42 piwigo:
43 driver: bridge
44EOF
45
46# 2. Create the .env file
47cat > .env << 'EOF'
48DB_ROOT_PASSWORD=rootpassword
49DB_PASSWORD=piwigo
50EOF
51
52# 3. Start the services
53docker compose up -d
54
55# 4. View logs
56docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/piwigo/run | bash

Troubleshooting

  • Database connection failed during setup wizard: Verify mariadb container is running and use 'mariadb' as database host, not 'localhost'
  • Photos not appearing after FTP upload: Check file permissions on /gallery volume and trigger manual synchronization through Piwigo admin panel
  • Thumbnail generation fails for large images: Increase PHP memory_limit in Piwigo container or resize source images before upload
  • MariaDB container crashes with 'insufficient memory': Reduce innodb_buffer_pool_size or increase available container memory allocation
  • Plugin installation errors: Ensure Piwigo version compatibility and check plugin dependencies in the administration interface
  • Slow gallery loading with large albums: Enable MariaDB query cache and consider implementing album pagination in Piwigo settings

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space