Installing PhotoPrism On Your Pi
[!INFO]-
topic: π₯οΈ Tech
links: Hosting your own image gallery
source:
tags: #permanent-noteΒ #published
Last Modified:
=dateformat(this.file.mtime, "MMM. dd, yyyy - HH:mm")
This is a complete step-by-step guide to install PhotoPrism on a Raspberry Pi 4.
The installation of PhotoPrism is pretty straightforward.
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
ssh
file to enable ssh on the device
cd /Volumes/boot
touch ssh
- (Create a
wpa_supplicant.conf
to enable Wi-Fi if needed)
cd /Volues/boot
vim wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<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 worked
uname -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
arch64
part
- 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.yml
to your liking, I recommend the following:
PHOTOPRISM_ADMIN_PASSWORD: "betterPassword"
HOTOPRISM_DATABASE_PASSWORD: "betterPassword"
MYSQL_ROOT_PASSWORD: betterPassword
MYSQL_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