Introduction
PhotoPrism is an open-source photo management system designed for self-hosting, perfect for users who want a private cloud solution for organizing and viewing their photos. With its support for facial recognition, metadata management, and high-quality image organization, PhotoPrism is a great alternative to cloud services like Google Photos. In this guide, we’ll show you how to set up PhotoPrism on your VPS using Docker.
What You’ll Need
Before getting started, ensure that you have the following:
- A VPS running Ubuntu (or another supported OS)
- Docker and Docker Compose installed on your server
- A domain or subdomain configured for accessing PhotoPrism
- Basic knowledge of the Linux terminal
Step 1: Preparing the VPS
1.1 Update and Install Dependencies
First, make sure your system is up-to-date:
1.2 Install Docker & Docker Compose
If you haven’t already installed Docker and Docker Compose, do it now:
Verify the installations:
Step 2: Set Up PhotoPrism with Docker
2.1 Clone the PhotoPrism Repository
Now, clone the PhotoPrism repository to your server:
2.2 Configure Docker Compose
Create a .env file for PhotoPrism configuration. This file contains environment variables that will be used by Docker Compose.
Add the following settings, replacing placeholders with your own values:
2.3 Start PhotoPrism with Docker Compose
Now, start the PhotoPrism service using Docker Compose:
This will pull the necessary images and start the containers in the background. To check if the containers are running:
Step 3: Set Up a Reverse Proxy (Optional)
If you want to use a domain or subdomain to access PhotoPrism securely over HTTPS, you can set up a reverse proxy with Nginx.
3.1 Install Nginx
Install Nginx on your server:
3.2 Configure Nginx
Create a new configuration file for your domain:
Add the following configuration, replacing yourdomain.com with your actual domain:
Enable the Nginx configuration:
3.3 Secure with SSL (Optional)
For SSL, you can use Certbot to get a free SSL certificate:
Step 4: Accessing PhotoPrism
Once everything is set up, navigate to your domain or IP address in a browser:
Log in with the admin password you set earlier. You should now see the PhotoPrism interface, where you can upload, organize, and view your photos.
Conclusion
Now you have a fully functional self-hosted PhotoPrism instance running on your VPS! You can start uploading your photos and enjoy the privacy and control that comes with self-hosting. Additionally, PhotoPrism offers advanced features like face detection and metadata management, making it a powerful tool for organizing your photo library.
About EngineerHow.com
EngineerHow.com provides easy-to-follow tutorials for IT professionals, engineers, and self-hosting enthusiasts. Whether you’re setting up servers, exploring Docker, or working on civil engineering projects, you’ll find step-by-step guides and resources to help you along the way.
Leave a Comment
Have questions or feedback about setting up PhotoPrism? Drop a comment below!
Comparison Chart:
| Feature | PhotoPrism | Google Photos | Apple iCloud Photos |
|---|---|---|---|
| Open-Source | ✅ | ❌ | ❌ |
| Facial Recognition | ✅ | ✅ | ✅ |
| Self-Hosting | ✅ | ❌ | ❌ |
| Paid Subscription | ❌ | ✅ | ✅ |
| Cloud Storage | User-Provided | Provided | Provided |
Top-Rated Free Alternatives:
- Lychee: A self-hosted photo management system.
- Piwigo: Another open-source photo gallery software.
- Photoview: A privacy-friendly photo viewer.
