Step by step instructions for migration from Google Photos to a self-hosted instance of Photoprism using a Raspberry Pi.
Posted by Ben Zhao on January 25, 2023 · 5 mins readI have been a long-time user of Google Photos, but the moment I found out that photos would be subject to the Google Drive storage limits, it was time to find an alternative. Google drive has always had a 15GB storage limit in their free tier, but it wasn’t until recently that files in Google Photos would count towards that limit. When that limit is reached, other services that require storage would stop working–this includes Gmail. I personally find that this shared quota effectively renders Google Photos unusable; the fact that automatic backups to Google Photos could disable emails is unacceptable. I needed a new solution: Photoprism.
Why not just buy more storage?
Obviously, I could have paid for more storage, but each image with a modern smartphone camera occupies 1-6MB of storage and videos can easily extend into the 100sMB. Also, as my library grows, the monthly cost for storage increase and it would become increasingly difficult to migrate away in the future. But most importantly: I’m cheap.
At the time of writing, the maximum Google One plan is $13.99/mo = $167.88/yr for 2TB of storage. An external hard disk of the same capacity costs $84.99 once.
Pro Tip: You can download any and all of your Google data using Google Takeout. I downloaded all my photos this way and imported them into the server.
Here’s what you will need to set it up at home:
These directions may look long but that’s only because I added all the code snippets so that it’ll be mostly copy-paste. These directions assume you’re doing a raspberry pi setup, but it should be similar for any OS because we’re running the server in Docker.
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker <username>
mkdir /media/ext_hdd
sudo fdisk -l
and the output should contain look something like this
Device Start End Sectors Size Type
/dev/sda1 65535 488366819 488301285 1.8T unknown
/dev/sda2 488366820 732550229 244183410 931.5G Microsoft basic data
/dev/sda
and the partitions are sda1
and sda2
sudo mount /dev/sda1 /media/ext_hdd
sudo apt install cryptsetup
sudo cryptsetup luksOpen /dev/sda1 sda1_decrypted
sudo mount /dev/mapper/sda1_decrypted /media/ext_hdd
~/photoprism
mkdir ~/photoprism
cd ~/photoprism
wget https://dl.photoprism.app/docker/arm64/docker-compose.yml
docker-compose.yml
in your favourite text editor. Here we’ll use vim
.
vim docker-compose.yml
volumes
, and PHOTOPRISM_ADMIN_PASSWORD
.:
is the directory in your local machine, and the path on the right is the directory inside the docker container. So if your photos are stored in a directory called Pictures
in your external hard drive mounted to /media/ext_hdd
, then volumes should contain "/media/ext_hdd/Pictures:/photoprism/originals"
.docker compose up -d
http://localhost:2342/
. Login with user admin
and the password you configured in PHOTOPRISM_ADMIN_PASSWORD
. Navigate to Library > Index and index your files so they show up in the UI!