How to Set Up a Self-Hosted Photo Gallery Using Raspberry Pi
Cloud storage purchases a convenient way to storefront pics, yet it sporadically comes through barriers on spot as well as seclusion. What if you can design a fabulous as well as peg spot for your pics, effortlessly under your manipulate? Attractiveness zero further than your qualified Raspberry Pi! In this write-up, we’ll overview you through arranging a self-ascertained up pic gallery making utilise of PhotoPrism, a strong as well as intuitive pic gallery app.
- What Is PhotoPrism?
- What You’ll Last bargain
- How to Mount PhotoPrism on a Raspberry Pi
- Grossing utilise of PhotoPrism on Raspberry Pi
What Is PhotoPrism?
PhotoPrism is an open-source pic management software schedule that makes serviceability of AI technology to tag as well as arrange your pics. It is a self-ascertained up treatment that permits you to preserve your pics as well as video clips effortlessly under your manipulate.

Here are some of its services:
- PhotoPrism supervises RAW pics, video clips, as well as ordinary image layouts favor JPEG as well as PNG.
- You can utilise strong lookout filters to assistances you track down specifically what you’re staring for, whether it’s a picture from your current sojourn or a choosy family member.
- Quickly calculate the spot of your pics on high-resolution earth maps.
- Let facial admiration as well as automatic image nomenclature categorize your pics based on web content.
- Your pics continue to be preserved on your local storage tools as well as are never uploaded to any cloud treatment unless you opt to do so.
Even much more detailed, installing PhotoPrism on your Raspberry Pi is insanely uncomplicated.
What You’ll Last bargain
Before you embark arranging your self-ascertained up pic gallery through PhotoPrism, you’ll requirement to have the right tools as well as software schedule. You will telephone call for a Raspberry Pi 4 or 5 through at least 4 GB of RAM. It is rewarding that your Raspberry Pi runs a 64-particle operating unit to swipe treatment of the needs of PhotoPrism successfully.
For those that have yet to spot an operating unit on their Raspberry Pi, we advise determining out our gained in touch with overview on arranging Raspberry Pi OS. This will walk you through the arrangement process as well as supply utilise your tools all ascertained for utilise.
In upsurge to the Raspberry Pi itself, you will requirement a worthy storage treatment for your pic palette. In this arrangement, I’ll be making utilise of an exterior 3.5″ spirited drive, which purchases enough spot as well as worthy practicality for storing vast pic varieties. Singularly, you are not limited to this treatment; a bigger USB flash drive or a local NAS (Network Linked Storage void) can furthermore bargain as effective storage services, depending on your proneness as well as accessibility.
Note: While the PhotoPrism founders do lend a microSD card image specifically gained for the Raspberry Pi, it is rewarding to chit that this image is presently obsoleted. Consequently, I don’t advise making utilise of it for this arrangement.
How to Mount PhotoPrism on a Raspberry Pi
The first response to recovering PhotoPrism up as well as sprinting on your Raspberry Pi is to spot Docker Compose, a tool gained to exhibit as well as sprinted multi-canister Docker executions.
To embark, you requirement to include Docker’s policemen GPG fulcrum as well as repository to your Raspberry Pi’s software schedule resources:
# Update your package lists sudo apt-get update # Install packages to allow apt to use a repository over HTTPS sudo apt-get install ca-certificates curl # Create a directory for Docker's keyring sudo install -m 0755 -d /etc/apt/keyrings # Download Docker's official GPG key sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc # Add the Docker repository echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null # Update your package lists again after adding the Docker repository sudo apt-get update
As shortly as the Docker repository is included, you can continue to spot Docker along through other rewarding parts, requiring Docker Compose:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
After installing Docker, you have to include your user to the Docker group so that you can execute Docker commands without making utilise of sudo:
sudo usermod -aG docker $USER
Last yet not least, authenticate that Docker owns been placed sensibly as well as that you can sprinted canisters as a prevalent user:
docker run hello-world

Presently that you have placed Docker Compose, it’s time to spot PhotoPrism itself. The process is uncomplicated, as well as it includes downloading as well as install the docker-write.yml document, equipping some adjustments to it, as well as sprinting a command to inauguration the deployment as well as database services.
Download the docker-write.yml document to any folder you favor making utilise of the obeying command:
wget https://dl.photoprism.app/docker/docker-compose.yml
Open the document in your favorite message editor (you can utilise nano
if you’re accessing your Raspberry Pi from another place using SSH) as well as alteration all default placeholder passwords (“insecure”) to peg ones, specifically the PHOTOPRISM_ADMIN_PASSWORD.

Readjust the volume spot training courses to time to the places whereby you cramp to storefront your pics as well as PhotoPrism’s file. For instance, if you have an exterior drive placed at, for example, /media/david/extdrive
, you may configure it as follows:
services: photoprism: volumes: - "/media/david/extdrive/Photos:/photoprism/originals" # Where PhotoPrism will store original media files - "/media/david/extdrive/PhotoPrismStorage:/photoprism/storage" # Used for PhotoPrism's cache, database, and sidecar files mariadb: volumes: - "/media//extdrive/PhotoPrismDatabase:/var/lib/mysql" # Database storage for MariaDB
Through your docker-write.yml document configured, you’re all ascertained to launch PhotoPrism. Navigate to the catalog having your docker-write.yml document as well as sprinted the obeying command:
docker compose up -d

Grossing utilise of PhotoPrism on Raspberry Pi
As shortly as Docker as well as PhotoPrism are up as well as sprinting on your Raspberry Pi, you can embark staring after as well as observing your pics through PhotoPrism’s web interface. Open your favorite web web browser as well as peruse to http://
At the login display, go into the username admin
as well as the password you package for PHOTOPRISM_ADMIN_PASSWORD
during the arrangement process. After logging in, you’ll be greeted by the PhotoPrism dashboard.

To inauguration containing pics to your gallery, click the upload button located in the peak-right edge of the interface. This permits you to decide pics from your computer as well as upload them directly to your Raspberry Pi’s PhotoPrism mishmash.

Offered that you possibly have a number of pics to upload, you have to spot an import folder on your Raspberry Pi. To do that, you requirement to guard versus your sprinting PhotoPrism canisters to revise the docker-write.yml document:
docker compose stop
Presently, modify your docker-write.yml document to entail a volume spot for an import folder:
services: photoprism: volumes: - "/media/david/extdrive/Import:/photoprism/import"
This folder will mien as a staging spot for pics in yesteryear you import them right into your foremost gallery. After equipping these adjustments, conserve the document as well as restart PhotoPrism:
docker compose up -d
You can presently move pics right into the import catalog, peruse to Library -> Import in the PhotoPrism web UI, as well as inauguration the import process.

To preserve your beloved pics, it’s rewarding to earlier up the PhotoPrism storage tools over as well as over again. That way, you can readily revitalize in vessel of any unintended priorities or hardware outages. Reap experimenting as well as tailoring your brand name-neoteric pic gallery!
Screenshots by David Morelo. Perfuse image by DALL-E.