How to install PhotoPrism

seedling
planted Jun 08, 2021

This is a complete step-by-step guide to install PhotoPrism on a Raspberry Pi 4.
The installation of PhotoPrism is pretty straight forward.
However, a Pi 3 or 4 is recommended to be able to use 64 bit mode and achieve a better indexing performance.
I used a MacBook for my setup. The steps to flash the SD card vary a bit on a Windows machine.
- Flash RaspberryOS Lite via Balena Etcher (Mac)
- Reinsert SD card to mount it on the Mac
- Add
sshfile to enable ssh on the device
cd /Volumes/boottouch ssh
- (Create a
wpa_supplicant.confto enable Wi-Fi if needed)
cd /Volues/bootvim wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1country=<Country Code>network={ssid="<SSID>"psk="<PASSWORD>"scan_ssid=1}
- Otherwise, set up a connection via LAN (you can also set up Wi-Fi later via
raspi-config) - Insert SD card into raspberry
- a Raspberry Pi 3 / 4 is recommended to enable 64bit mode, see https://docs.photoprism.org/getting-started/raspberry-pi/#system-requirements
- Connect to the device via ssh,
- user: pi
- password: raspberry
ssh pi@<your-ip>
- Change your password
passwd
- raspi-config` and change time zone and update raspi-config
- Update the system via
sudo apt update && sudo apt upgrade - Enable 64 bit mode in
config.txt
sudo vi /boot/config.txt
- Find the section for your Pi, either
[pi4]or[pi3]and add the following:
arm_64bit=1
sudo reboot- ssh back in and check if it workeduname -a
- your output should look like this:
Linux raspberrypi 5.10.17-v8+ #1414 SMP PREEMPT Fri Apr 30 13:23:25 BST 2021 aarch64 GNU/Linuxe
- we are looking for the
arch64part
- Install docker and docker-compose
sudo apt install docker docker-compose
- Download the PhotoPrism docker file
wget https://dl.photoprism.org/docker/arm64/docker-compose.yml
- Configure the
docker-compose.ymlto your liking I recommend the following:
PHOTOPRISM_ADMIN_PASSWORD: "betterPassword"HOTOPRISM_DATABASE_PASSWORD: "betterPassword"MYSQL_ROOT_PASSWORD: betterPasswordMYSQL_PASSWORD: betterPassword
- Start the docker image
sudo docker-compose up -d
- the download may take some time
- test if your PhotoPrism instance is running by visiting the local IP of your Pi on port 2342
When you are done, consider adding an external SSD drive to save your photos.
Use an external SSD for your PhotoPrism instance
You should add an external drive to your PhotoPrism instance, because otherwise it will put all data on the SD card. I… Read this post ›
PhotoPrism is a privacy friendly image gallery
PhotoPrism is a software for organizing a photo gallery. Using machine learning, it indexes and structures the pictures… Read this post ›
Use an external SSD for your PhotoPrism instance
You should add an external drive to your PhotoPrism instance, because otherwise it will put all data on the SD card. I… Read this post ›
PhotoPrism is a privacy friendly image gallery
PhotoPrism is a software for organizing a photo gallery. Using machine learning, it indexes and structures the pictures… Read this post ›