How to install and use PhotoPrism on Raspberry Pi

In the world of self-hosted photo managers that can run on Raspberry Pi, PhotoPrism is one of the most powerful tools. It boasts an impressive search function, facial recognition capabilities, and even offers a world map showing the locations where your photos were taken! PhotoPrism is also easy to install on Raspberry Pi.

How to install PhotoPrism on Raspberry Pi

The first step to getting PhotoPrism up and running on the Raspberry Pi is to install Docker Compose, a tool designed to identify and run multi-container Docker applications.

To get started, add Docker's official GPG key and repository to the Raspberry Pi software source:

# 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

Once the Docker repository is added, you can proceed to install Docker along with other essential components, including Docker Compose:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

After installing Docker, you should add your user to the Docker group so you can execute Docker commands without using sudo:

sudo usermod -aG docker $USER

Finally, verify that Docker is installed correctly. You can then run containers as a regular user:

docker run hello-world

How to install and use PhotoPrism on Raspberry Pi Picture 1

Now that Docker Compose is installed, it's time to install PhotoPrism. The process is very simple and involves downloading the docker-compose.yml file, making some changes to the file, and running a command to start the application and database service.

Download the docker-compose.yml file to any directory you want with the following command:

wget https://dl.photoprism.app/docker/docker-compose.yml

Open the file in your favorite text editor (you can use nano if you are accessing your Raspberry Pi remotely via SSH) and change all default placeholder passwords ('insecure') to secure passwords, especially PHOTOPRISM_ADMIN_PASSWORD.

How to install and use PhotoPrism on Raspberry Pi Picture 2

Adjust the volume mount path to point to the location where you want to store PhotoPrism images and data. For example, if you have an external hard drive mounted, such as /media/david/extdrive , you can 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

With the docker-compose.yml file configured, you are ready to launch PhotoPrism. Navigate to the directory containing the docker-compose.yml file and run the following command:

docker compose up -d

How to install and use PhotoPrism on Raspberry Pi Picture 3

Use PhotoPrism on Raspberry Pi

Once Docker and PhotoPrism are up and running on your Raspberry Pi, you can start managing and viewing your photos through PhotoPrism's web interface. Open your favorite web browser and navigate to http://:2342/ to access the PhotoPrism user interface. Replace with the actual IP address of the Raspberry Pi or if working directly from the Pi itself, use http://localhost:2342/.

At the login screen, enter the admin username and the password you set for PHOTOPRISM_ADMIN_PASSWORD during setup. After logging in, you will be greeted by the PhotoPrism dashboard.

How to install and use PhotoPrism on Raspberry Pi Picture 4

To start adding photos to your library, click the upload button located in the upper right corner of the interface. This allows selecting photos from your computer and uploading them directly to the Raspberry Pi's PhotoPrism library.

How to install and use PhotoPrism on Raspberry Pi Picture 5

Since there may be a lot of photos to upload, you should set up an import folder on the Raspberry Pi. To do that, stop running PhotoPrism containers to modify the docker-compose.yml file:

docker compose stop

Now, edit the docker-compose.yml file to include the volume mount for the import directory:

services: photoprism: volumes: - "/media/david/extdrive/Import:/photoprism/import"

This folder will act as a storage area for photos before you import them into your main library. After making these changes, save the file and restart PhotoPrism:

docker compose up -d

You can now move the photos into the import folder, navigate to Library -> Import in the PhotoPrism web UI and start the import process.

How to install and use PhotoPrism on Raspberry Pi Picture 6

To protect precious photos, it is essential to regularly back up PhotoPrism storage devices. That way, you can easily recover in case of any unexpected problems or hardware failures.

4.5 ★ | 2 Vote

May be interested

  • How to install FydeOS on a Raspberry PiHow to install FydeOS on a Raspberry Pi
    fydeos is a cloud-based operating system aimed at the chinese market. in today's article, readers will learn how to install fydeos on a raspberry pi and have a quick experience of this operating system.
  • How to install Windows 10 IoT Core on Raspberry Pi 4How to install Windows 10 IoT Core on Raspberry Pi 4
    with the recent release of the raspberry pi 4, people are once again flocking to single computers. the raspberry pi 4 is as small as ever, but potentially more powerful than before.
  • How to install NOOBS on Raspberry PiHow to install NOOBS on Raspberry Pi
    noobs is perfect for pi beginners. it allows you to choose your preferred operating system and install it instantly. but how to download noobs? here's a complete guide on how to install noobs on a raspberry pi.
  • How to install OBS Studio on Raspberry Pi OSHow to install OBS Studio on Raspberry Pi OS
    one of the most used software for video recording on a pc is obs studio and can install it on a raspberry pi. let's find out through the following article!
  • How to install Minecraft on Raspberry PiHow to install Minecraft on Raspberry Pi
    minecraft gives players the experience of building buildings by structural cubes according to the simulator of the 3d world and many other interesting features.
  • How to install OSMC on a Raspberry PiHow to install OSMC on a Raspberry Pi
    osmc was designed and built with the idea in mind of the raspberry pi. here's how you can install osmc on the raspberry pi model.
  • How to add an ADC to Raspberry Pi: What you need to knowHow to add an ADC to Raspberry Pi: What you need to know
    raspberry pi lacks analog input. this puts it at a disadvantage compared to microcontroller-based boards like the arduino.
  • How to install Windows 11 on Raspberry Pi 4How to install Windows 11 on Raspberry Pi 4
    you will learn how to bypass microsoft's strict requirements and install windows 11 on raspberry pi 4.
  • Raspberry Pi Zero vs Model A and B, how are they different?Raspberry Pi Zero vs Model A and B, how are they different?
    you want to buy a raspberry pi, but when you search, you have a problem: why are there so many raspberry pi models? although all of the different raspberry pi can do many similar tasks, there are tasks that specific boards will be more suitable for.
  • How to Install RetropieHow to Install Retropie
    this wikihow teaches you how to install retropie, a video game emulator portal, on your raspberry pi. retropie can be installed on any raspberry pi model, but the developers recommend using a raspberry pi 3 model b+ or better for best...