Photoprism

published 2023-01-30 · updated 2023-01-30
I run Photoprism as an 'App' on my TrueNAS server. This guide will be written from that perspective.

🔗Issues and fixes

PhotoPrism was no longer starting on TrueNAS. I checked the logs and saw the following error:

level=error msg="migrate: failed migrating accounts"

After troubleshooting for a few hours, I installed a new instance of PhotoPrism and compared the databases. The database is located at /storage/index.db.

When I compared the tables in each database, the original database that was not starting and causing the error had 9 extra tables compared to the fresh install. I'm assuming there was an upgrade and for some reason the tables weren't removed? This then caused my instance to not start.

The 9 extra tables seemed to be related to users which is why I was suspicious of them. After I deleted the 9 tables and copied index.db back to /storage/ Photoprism started.

The 9 tables I deleted were:

  • albums_users
  • auth_sessions
  • auth_users
  • auth_users_details
  • auth_users_settings
  • auth_users_shares
  • photos_users
  • reactions
  • services

If you follow this advice, always make a backup of index.db first in case you make a mistake.