Piwigo
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:latest4 container_name: piwigo5 restart: unless-stopped6 environment: 7 PUID: 10008 PGID: 10009 TZ: UTC10 volumes: 11 - piwigo_config:/config12 - piwigo_gallery:/gallery13 ports: 14 - "80:80"15 depends_on: 16 - mariadb17 networks: 18 - piwigo1920 mariadb: 21 image: mariadb:10.1122 container_name: piwigo-mariadb23 restart: unless-stopped24 environment: 25 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}26 MARIADB_DATABASE: piwigo27 MARIADB_USER: piwigo28 MARIADB_PASSWORD: ${DB_PASSWORD}29 volumes: 30 - mariadb_data:/var/lib/mysql31 networks: 32 - piwigo3334volumes: 35 piwigo_config: 36 piwigo_gallery: 37 mariadb_data: 3839networks: 40 piwigo: 41 driver: bridge.env Template
.env
1DB_ROOT_PASSWORD=rootpassword2DB_PASSWORD=piwigoUsage Notes
- 1Docs: https://piwigo.org/doc/
- 2Access at http://localhost - follow setup wizard (DB host: mariadb)
- 3Rich plugin ecosystem: 300+ plugins available
- 4Batch upload via FTP or web - Piwigo scans /gallery
- 5Multi-user with permissions, guest access, privacy settings
- 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 file2cat > docker-compose.yml << 'EOF'3services:4 piwigo:5 image: lscr.io/linuxserver/piwigo:latest6 container_name: piwigo7 restart: unless-stopped8 environment:9 PUID: 100010 PGID: 100011 TZ: UTC12 volumes:13 - piwigo_config:/config14 - piwigo_gallery:/gallery15 ports:16 - "80:80"17 depends_on:18 - mariadb19 networks:20 - piwigo2122 mariadb:23 image: mariadb:10.1124 container_name: piwigo-mariadb25 restart: unless-stopped26 environment:27 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}28 MARIADB_DATABASE: piwigo29 MARIADB_USER: piwigo30 MARIADB_PASSWORD: ${DB_PASSWORD}31 volumes:32 - mariadb_data:/var/lib/mysql33 networks:34 - piwigo3536volumes:37 piwigo_config:38 piwigo_gallery:39 mariadb_data:4041networks:42 piwigo:43 driver: bridge44EOF4546# 2. Create the .env file47cat > .env << 'EOF'48DB_ROOT_PASSWORD=rootpassword49DB_PASSWORD=piwigo50EOF5152# 3. Start the services53docker compose up -d5455# 4. View logs56docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/piwigo/run | bashTroubleshooting
- 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
Shortcuts: C CopyF FavoriteD Download