How To Install PhotoPrism on Manjaro
PhotoPrism offers a powerful, self-hosted solution for managing your digital photo collection. For Manjaro Linux users seeking to break free from cloud-based photo services and take control of their personal media, PhotoPrism presents an excellent alternative with AI-powered organization features. This comprehensive guide walks you through the entire installation process on your Manjaro system, providing multiple installation methods and optimization techniques to ensure your photo management experience remains smooth and efficient.
Understanding PhotoPrism
PhotoPrism stands at the forefront of self-hosted photo management applications, combining powerful organizational capabilities with an elegant, intuitive interface. This open-source software transforms how you interact with your photo collection through several distinctive features.
What is PhotoPrism?
PhotoPrism is an AI-powered photo organization and sharing platform designed for self-hosting. It automatically categorizes your photos using image recognition technology, identifies faces, detects objects, and extracts metadata from your files. Unlike cloud-based alternatives that require monthly subscriptions and place your personal memories on someone else’s servers, PhotoPrism runs entirely on your hardware, giving you complete control over your photo library.
The application supports various image formats, including RAW files from professional cameras, and features a responsive web interface accessible from any device. With its modern architecture, PhotoPrism delivers a smooth browsing experience even for large collections containing thousands of photos.
Why Self-Host Your Photos?
Self-hosting your photo collection offers numerous advantages over commercial cloud services. Privacy remains the primary benefit—your personal memories stay on your own hardware, protected from data breaches or policy changes of third-party providers. Cost efficiency represents another significant advantage, especially for photographers with extensive libraries who would otherwise pay substantial monthly fees for cloud storage.
Manjaro Linux, with its rolling release model and access to the Arch User Repository (AUR), provides an ideal platform for hosting PhotoPrism. The distribution’s stability combined with cutting-edge package availability ensures you can run the latest PhotoPrism version without compatibility issues.
PhotoPrism’s Architecture
PhotoPrism utilizes a modern tech stack including Go for backend operations and JavaScript for its user interface. The application employs TensorFlow for image classification and facial recognition, while SQLite or MariaDB handles database functions depending on your library size and performance requirements. This architecture allows PhotoPrism to efficiently process large photo collections while maintaining responsive performance.
The system’s modular design enables flexible deployment options, from small home servers to more powerful systems handling professional photography archives. For Manjaro users, this scalability means PhotoPrism can grow alongside your photography hobby or professional pursuits.
System Requirements for PhotoPrism
Before proceeding with installation, ensure your Manjaro system meets PhotoPrism’s requirements. While the application adapts well to different hardware configurations, certain minimums ensure smooth operation.
Minimum Hardware Specifications
PhotoPrism performs optimally on systems with at least two CPU cores and 3GB of available RAM. For smaller collections (under 10,000 photos), this baseline configuration provides adequate performance. Larger libraries benefit significantly from additional resources—consider allocating 4+ CPU cores and 8+ GB RAM for collections exceeding 50,000 photos.
The application’s face recognition and image classification features utilize TensorFlow, which benefits from modern CPU architectures. While GPU acceleration remains optional, it dramatically improves indexing speeds for larger collections.
Storage Recommendations
Storage planning requires careful consideration when setting up PhotoPrism. The application maintains both your original files and generated previews, requiring substantial disk space. As a general guideline, allocate at least 1.5x your raw photo collection size for the complete PhotoPrism installation.
SSD storage significantly enhances database performance and thumbnail generation. Consider a hybrid approach for cost-effective solutions—SSD for the application and database with conventional hard drives for original photo storage. This configuration delivers excellent performance while managing storage costs effectively.
Memory Considerations
Memory utilization in PhotoPrism varies based on concurrent users and library size. Configure at least 4GB of swap space even on systems with substantial RAM to prevent out-of-memory errors during resource-intensive operations like initial indexing or video conversion.
Manjaro’s kernel parameters can be optimized for PhotoPrism by adjusting swappiness values. For systems with 8GB+ RAM, consider reducing swappiness to utilize physical memory more aggressively before engaging swap space.
Operating System Requirements
PhotoPrism requires a 64-bit architecture, which all modern Manjaro installations provide. Ensure your system runs an up-to-date kernel—version 5.10 or newer—to benefit from improved I/O performance and memory management features that enhance PhotoPrism’s operation.
Browser Compatibility
For the best experience with PhotoPrism’s web interface, use modern browsers like Chrome, Firefox, Edge, or Safari. The application leverages contemporary web technologies that perform optimally in updated browser environments. Mobile browsers also work well with PhotoPrism’s responsive design, enabling convenient photo management from smartphones and tablets.
Pre-Installation Preparation
Proper preparation ensures a smooth PhotoPrism installation process. Following these preliminary steps creates an optimal foundation for your photo management system.
Update Manjaro System
Begin by updating your Manjaro installation to ensure all components are current. Open a terminal window and execute:
sudo pacman -Syu
This command synchronizes package databases and updates all installed packages to their latest versions. A system reboot after updates completes the refresh process, particularly if kernel updates were applied.
Install Essential Tools
Several utility packages facilitate the PhotoPrism installation process. Install these prerequisites with:
sudo pacman -S base-devel git wget curl
These tools provide compilation capabilities, repository access, and file transfer functions needed during various installation methods.
Planning Storage Locations
Before installation, determine where your photo library will reside. Consider these key locations:
- Originals directory: Stores your original, unmodified image files
- Storage directory: Contains application data, including generated thumbnails and metadata
- Database location: Houses the SQLite or MariaDB database files
- Import directory: Temporary location for incoming photos before processing
For optimal performance, place frequently accessed components like the database and storage directory on SSD storage while keeping originals on higher-capacity traditional drives if necessary.
Choosing Installation Method
PhotoPrism offers multiple installation approaches, each with distinctive advantages:
- Docker installation: Simplest method with excellent isolation and straightforward updates
- Manual package installation: Greater customization potential with direct system integration
- Source build installation: Maximum control and latest features for advanced users
Your technical comfort level, performance requirements, and integration needs should guide this decision. Most users find the Docker method balances simplicity with functionality.
Backup Recommendations
Before proceeding, create comprehensive backups of any existing photo collections. While PhotoPrism doesn’t modify original files by default, protecting your irreplaceable memories represents a critical precaution. Consider using tools like rsync
or duplicity
to create verified backups before continuing.
Installation Method 1: Using Docker
Docker provides the most straightforward PhotoPrism installation method, offering excellent isolation and simplified updates. This container-based approach works particularly well on Manjaro systems.
Installing Docker and Docker Compose
First, install Docker and Docker Compose on your Manjaro system:
sudo pacman -S docker docker-compose
After installation, start and enable the Docker service:
sudo systemctl start docker
sudo systemctl enable docker
Add your user to the docker group to avoid using sudo with every Docker command:
sudo usermod -aG docker $USER
Log out and back in for this change to take effect, or use the following command to apply it to your current session:
newgrp docker
Creating Project Directory Structure
Create a dedicated directory structure for your PhotoPrism installation:
mkdir -p ~/photoprism/storage
mkdir -p ~/photoprism/originals
mkdir -p ~/photoprism/import
These directories will store your PhotoPrism configuration, photo library, and temporary import files, respectively.
Downloading the docker-compose.yml File
Obtain PhotoPrism’s Docker Compose configuration file:
cd ~/photoprism
wget https://dl.photoprism.org/docker/docker-compose.yml
Open this file in your preferred text editor to customize settings:
nano docker-compose.yml
Configuring Environment Variables
Within the docker-compose.yml file, adjust the following key parameters:
- PHOTOPRISM_ORIGINALS_PATH: Path to your original photos
- PHOTOPRISM_STORAGE_PATH: Location for application data storage
- PHOTOPRISM_ADMIN_PASSWORD: Set a secure administrative password
- PHOTOPRISM_DATABASE_DRIVER: Choose SQLite for smaller collections or MariaDB for larger libraries
For MariaDB configurations, ensure database parameters match your environment:
PHOTOPRISM_DATABASE_DRIVER: "mysql"
PHOTOPRISM_DATABASE_SERVER: "mariadb:3306"
PHOTOPRISM_DATABASE_NAME: "photoprism"
PHOTOPRISM_DATABASE_USER: "photoprism"
PHOTOPRISM_DATABASE_PASSWORD: "insecure"
Save changes and exit the editor.
Starting PhotoPrism Container
Launch PhotoPrism using Docker Compose:
docker-compose up -d
The -d
flag runs containers in detached mode, allowing them to continue running in the background.
Verifying Installation
After container initialization completes (which may take several minutes during first launch), access PhotoPrism through your web browser at:
http://localhost:2342
Log in using the credentials:
- Username: admin
- Password: [your configured password]
Upon successful login, verify functionality by uploading a test photo through the web interface.
Docker Performance Considerations
Docker containers introduce minimal performance overhead while providing excellent isolation. To optimize Docker-based PhotoPrism installations:
- Mount volumes from fast storage media like SSDs
- Allocate sufficient resources in Docker settings
- Consider enabling memory limits in docker-compose.yml
- Use host networking mode for maximum performance
For users with limited system resources, adjusting PhotoPrism’s worker settings in docker-compose.yml can prevent resource exhaustion during intensive operations like initial indexing.
Installation Method 2: Manual Package Installation
Installing PhotoPrism directly on Manjaro provides deeper system integration and potentially better performance than containerized deployments. This method requires more technical knowledge but offers greater customization capabilities.
Installing Dependencies
PhotoPrism requires several supporting packages. Install them using pacman:
sudo pacman -S ffmpeg imagemagick ghostscript tesseract tesseract-data-eng darktable libheif libraw exiftool
For additional language support in text recognition:
sudo pacman -S tesseract-data-deu tesseract-data-fra tesseract-data-spa
Add more language packages as needed for your photo collection.
Downloading PhotoPrism Packages
Create an installation directory and download the latest PhotoPrism release:
mkdir -p ~/photoprism-install
cd ~/photoprism-install
wget https://github.com/photoprism/photoprism/releases/download/250426-27ec7a128/photoprism_250426-27ec7a128-linux-amd64.tar.gz
Note that you should replace the URL with the latest version available from the PhotoPrism website.
Extracting and Installing
Extract the downloaded archive:
tar -xzf photoprism_250426-27ec7a128-linux-amd64.tar.gz
Move the extracted files to a system location:
sudo mkdir -p /opt/photoprism
sudo cp -r photoprism/* /opt/photoprism/
Setting Up Symlinks
Create symbolic links for system-wide access:
sudo ln -s /opt/photoprism/bin/photoprism /usr/local/bin/photoprism
This allows running PhotoPrism commands from any terminal location.
Creating Configuration Files
Generate default configuration files:
sudo mkdir -p /etc/photoprism
Create a basic configuration file:
sudo nano /etc/photoprism/photoprism.yml
Add essential configuration parameters:
storage-path: "/var/lib/photoprism/storage"
originals-path: "/var/lib/photoprism/originals"
import-path: "/var/lib/photoprism/import"
database-driver: "sqlite"
database-dsn: "/var/lib/photoprism/storage/photoprism.db"
Save this file and create required directories:
sudo mkdir -p /var/lib/photoprism/{storage,originals,import}
sudo chown -R $USER:$USER /var/lib/photoprism
Setting Up System Service
Create a systemd service file for automatic startup:
sudo nano /etc/systemd/system/photoprism.service
Add the following content:
[Unit]
Description=PhotoPrism service
After=network.target
[Service]
Type=simple
User=YOUR_USERNAME
ExecStart=/usr/local/bin/photoprism start
WorkingDirectory=/opt/photoprism
Restart=on-failure
[Install]
WantedBy=multi-user.target
Replace YOUR_USERNAME with your actual username.
Enable and start the service:
sudo systemctl enable photoprism
sudo systemctl start photoprism
Installation Method 3: Building from Source
For users seeking the latest features or custom modifications, building PhotoPrism from source provides maximum flexibility. This method requires more technical knowledge but ensures access to cutting-edge functionality.
Installing Development Dependencies
Install required development packages:
sudo pacman -S go nodejs npm git gcc make
Ensure Go version 1.16+ and Node.js version 14+ are installed:
go version
node --version
Cloning the PhotoPrism Repository
Retrieve the source code from GitHub:
git clone https://github.com/photoprism/photoprism.git
cd photoprism
Building the Application
Compile PhotoPrism using the provided build script:
./scripts/build.sh all
This process may take substantial time depending on your system’s performance. The script compiles both backend and frontend components.
Installation After Building
Install the compiled application:
sudo ./scripts/install.sh
This script places binaries in appropriate system locations and creates necessary directories.
Creating a Systemd Service
Follow the same systemd service creation steps outlined in the manual installation method to enable automatic startup.
Testing the Installation
Verify your installation:
photoprism version
Start the service manually to check functionality:
photoprism start
Access the interface at http://localhost:2342 to confirm proper operation.
Database Configuration
PhotoPrism supports both SQLite and MariaDB database backends. Your choice depends on library size and performance requirements.
SQLite Setup
SQLite works well for smaller collections (under 10,000 photos) and requires minimal configuration:
photoprism config set --database-driver sqlite
Specify the database location:
photoprism config set --database-dsn /path/to/photoprism.db
SQLite offers excellent simplicity but may experience performance limitations with larger collections or multiple concurrent users.
MariaDB Installation
For larger libraries, install MariaDB:
sudo pacman -S mariadb
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl enable mariadb
sudo systemctl start mariadb
Secure the installation:
sudo mysql_secure_installation
Create a database and user for PhotoPrism:
CREATE DATABASE photoprism CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'photoprism'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON photoprism.* TO 'photoprism'@'localhost';
FLUSH PRIVILEGES;
Configure PhotoPrism to use MariaDB:
photoprism config set --database-driver mysql
photoprism config set --database-dsn "photoprism:secure_password@tcp(localhost:3306)/photoprism?charset=utf8mb4&parseTime=true"
Database Optimization Tips
For optimal database performance:
- Increase MariaDB’s buffer pool size for larger collections
- Enable query caching for read-heavy workloads
- Schedule regular database maintenance through cron jobs
- Consider dedicated SSD storage for database files
Regular database backups protect against data loss and enable recovery if necessary.
Initial Configuration
After installation, proper initial configuration ensures optimal PhotoPrism performance.
First Login Steps
Access PhotoPrism’s web interface and log in using default credentials (unless changed during installation):
- Username: admin
- Password: admin (Docker) or password set in configuration
Change the default password immediately through Settings → Account.
Admin Account Setup
Review administrative settings under Settings → General:
- Site title and description
- Default language and location
- Theme preferences
- Upload limits and restrictions
These configurations personalize your PhotoPrism instance and improve usability.
Security Recommendations
Implement these security measures:
- Set a strong admin password with mixed characters
- Enable two-factor authentication for admin accounts
- Configure session timeouts appropriately
- Restrict remote access through firewall rules
Security should be prioritized, especially for installations accessible outside your local network.
Configuring defaults.yml and options.yml
Create custom configuration files for persistent settings:
cp /opt/photoprism/configs/defaults.yml /etc/photoprism/defaults.yml
Edit this file to override default behaviors:
readOnly: "false"
uploadNSFW: "true"
detectNSFW: "false"
These configurations persist across restarts and updates, maintaining your preferred settings.
Storage Path Configuration
Define storage locations for various PhotoPrism components:
photoprism config set --storage-path /path/to/storage
photoprism config set --originals-path /path/to/originals
photoprism config set --import-path /path/to/import
Choose locations with sufficient space for your growing collection.
Import Directory Setup
Create a structured import directory:
mkdir -p ~/photoprism/import/{friends,family,travel,events}
This organization simplifies importing photos from different sources or categories.
Setting Up Your Photo Library
Organizing your library effectively enhances PhotoPrism’s functionality and your overall experience.
Organizing Photos Before Import
Before importing:
- Remove duplicate photos
- Correct file dates if necessary
- Organize files into logical folders
- Ensure proper file permissions
Preliminary organization simplifies subsequent PhotoPrism management.
Import Options and Settings
PhotoPrism offers multiple import methods:
- Web upload: Drag and drop through the interface
- Import directory: Copy files to the import folder and process through the interface
- Direct originals placement: Add files directly to originals directory
For large collections, the direct method often works best:
rsync -av ~/Pictures/ ~/photoprism/originals/
Indexing Process Explanation
Indexing analyzes your photos, extracting:
- Metadata (date, camera, location)
- Content information (people, objects, scenes)
- Color profiles and quality metrics
Initial indexing for large collections may take hours or even days depending on your hardware. Schedule this operation during periods of low system use.
Managing Different File Formats
PhotoPrism supports various formats including:
- Standard formats (JPEG, PNG)
- Professional formats (DNG, CR2, NEF, ARW)
- Video formats (MP4, MOV, AVI)
Conversion settings control how non-standard formats are handled—whether to create JPEG copies automatically or preserve originals without conversion.
Handling RAW Files and Videos
For RAW file support:
sudo pacman -S darktable rawtherapee
Video handling requires additional packages:
sudo pacman -S ffmpeg
Configure transcoding options in settings to balance quality and storage requirements for videos.
Performance Considerations for Large Libraries
For collections exceeding 50,000 photos:
- Increase worker counts for parallel processing
- Enable selective indexing by directory
- Consider index scheduling during off-hours
- Monitor system resources during indexing
Breaking large imports into smaller batches improves manageability.
Security and Access Control
Securing your PhotoPrism installation protects both your personal memories and system integrity.
Setting Up HTTPS with Reverse Proxy
For secure remote access, configure a reverse proxy:
sudo pacman -S nginx certbot
Create an Nginx configuration file:
server {
listen 443 ssl;
server_name photos.example.com;
ssl_certificate /etc/letsencrypt/live/photos.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/photos.example.com/privkey.pem;
location / {
proxy_pass http://localhost:2342;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Obtain SSL certificates:
sudo certbot --nginx -d photos.example.com
Firewall Configuration
Restrict access using ufw:
sudo pacman -S ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow https
sudo ufw enable
This configuration permits only SSH and HTTPS traffic, blocking direct access to the PhotoPrism port.
User Management
Create additional accounts through Settings → Users with appropriate permission levels:
- Administrators: Full system access
- Editors: Can modify metadata but not delete files
- Viewers: Read-only access
Assign permissions based on principle of least privilege.
Password Policies
Implement strong password requirements:
- Minimum 12 characters
- Combination of uppercase, lowercase, numbers, symbols
- Regular password rotation (every 90 days)
- Account lockout after failed attempts
Network Security Considerations
Additional security measures:
- Rate limiting to prevent brute force attempts
- IP whitelisting for administrative access
- Regular security audits
- Network segregation when possible
Performance Optimization
Optimizing PhotoPrism ensures smooth operation even with substantial photo libraries.
Hardware Optimization Techniques
Consider these hardware improvements:
- Add RAM for improved thumbnail caching
- Upgrade to NVMe storage for database files
- Implement RAID for improved redundancy and read performance
- Dedicate CPU cores to PhotoPrism processes
Cache Management
Manage caching for improved performance:
photoprism config set --cache-path /path/to/fast/storage/cache
For systems with ample RAM, increase cache limits:
photoprism config set --http-cache-ttl 3600
photoprism config set --cache-size 5000
Thumbnail Generation Strategies
Configure thumbnail strategies:
- Pre-generate thumbnails during import
- Schedule background generation during off-hours
- Adjust quality settings to balance storage and visual appeal
Indexing Performance Tips
Improve indexing speed:
- Increase worker counts based on available CPU cores
- Prioritize critical directories for initial indexing
- Use selective re-indexing for changed files
- Disable unnecessary classification during initial import
Resource Monitoring
Implement monitoring to identify bottlenecks:
sudo pacman -S htop iotop
Use these tools to identify resource constraints during operation.
Automating Maintenance
Automated maintenance ensures optimal long-term PhotoPrism performance.
Setting Up Automatic Updates
Create an update script:
#!/bin/bash
cd ~/photoprism
docker-compose pull
docker-compose down
docker-compose up -d
Schedule this script with cron:
crontab -e
Add a weekly update schedule:
0 2 * * 0 /path/to/update-script.sh
Database Maintenance Tasks
Schedule regular database optimization:
#!/bin/bash
docker-compose exec photoprism photoprism optimize
Run this script monthly to maintain database performance.
Backup Strategies
Implement comprehensive backup procedures:
#!/bin/bash
# Backup database
docker-compose exec db mysqldump -u photoprism -p"PASSWORD" photoprism > photoprism_db_$(date +%Y%m%d).sql
# Backup configuration
cp -r ~/photoprism/storage/config ~/backups/photoprism/config_$(date +%Y%m%d)
# Backup originals if needed
rsync -av ~/photoprism/originals/ /backup/destination/
Store backups on separate physical media for disaster recovery.
Log Rotation and Management
Configure log rotation:
sudo nano /etc/logrotate.d/photoprism
Add configuration:
/var/log/photoprism/*.log {
weekly
rotate 4
compress
delaycompress
missingok
notifempty
create 640 root adm
}
System Health Monitoring
Implement monitoring with tools like Prometheus and Grafana or simpler solutions like Monit:
sudo pacman -S monit
Configure monitoring checks for PhotoPrism services, disk space, and system resources.
Troubleshooting Common Issues
Even with careful setup, issues may arise. These troubleshooting steps address common problems.
Connection Problems
If unable to connect to PhotoPrism:
- Verify service status:
systemctl status photoprism
- Check logs:
journalctl -u photoprism
- Confirm port availability:
ss -tuln | grep 2342
- Test network connectivity:
curl localhost:2342
Import Failures
For import problems:
- Check file permissions on import directory
- Verify supported file formats
- Examine logs for specific error messages
- Ensure sufficient disk space
Performance Issues
Address slow performance:
- Monitor resource usage during operations
- Check database fragmentation levels
- Verify storage I/O performance
- Review worker and thread settings
Missing Thumbnails/Previews
If thumbnails fail to generate:
- Verify ffmpeg and imagemagick installation
- Check storage permissions
- Review format compatibility
- Manually trigger thumbnail generation
Database Errors
For database issues:
- Check connection parameters
- Verify database size and fragmentation
- Run database repairs:
photoprism repair
- Consider database migration if necessary
Permission Problems
Resolve permission errors:
- Check ownership:
ls -la ~/photoprism/*
- Set correct permissions:
chmod -R 755 ~/photoprism
- Verify user access rights
- Check SELinux or AppArmor restrictions
Mobile Access and PWA Features
PhotoPrism offers excellent mobile access capabilities.
Setting Up Mobile Access
Configure mobile access:
- Establish secure HTTPS connection through reverse proxy
- Test access through mobile browsers
- Optimize thumbnail delivery settings for mobile
- Consider bandwidth limitations in mobile settings
Installing as a Progressive Web App
On mobile devices:
- Visit your PhotoPrism URL in Chrome or Safari
- Open browser menu
- Select “Add to Home Screen” or “Install”
- Launch PhotoPrism like a native app afterward
Integration with Other Services
Connect PhotoPrism with:
- WebDAV clients for remote access
- Calendar applications through CalDAV
- External sharing services
- Backup systems through API integration
WebDAV Connectivity
Enable WebDAV support:
photoprism config set --webdav-enabled true
Access files directly from desktop applications like file managers or photo editors.
Mobile Synchronization Options
For mobile synchronization:
- Use FolderSync Pro (Android) or Documents (iOS)
- Configure automatic uploads from mobile devices
- Set up dedicated import folders for each device
- Implement background processing for new imports
Congratulations! You have successfully installed PhotoPrism. Thanks for using this tutorial for installing the PhotoPrism open-source photo management on Manjaro Linux system. For additional help or useful information, we recommend you check the official PhotoPrism website.