INSTALL GUIDE: PhotoPrism in a Jail on TrueNAS Core 13.0

exeter_acres

Explorer
Joined
Oct 8, 2020
Messages
54
You should set "/mnt/MyNas/iocage/jails/photos/root/photos" as destination on mount.
Was going to say that the Guide says to use originals if using my own location of photos.. but now it looks like I need 2 mount points... one to photos and one to originals..
That sound right?
 

exeter_acres

Explorer
Joined
Oct 8, 2020
Messages
54
Thanks for the guide!!!! Helped... Took me a couple tries to get everything correct.. but up and running!

Feedback.. small thing. There is this section:
"Edit a file called /mnt/photos/options.yml:
micro /mnt/photos/options.yml

Code:
# options.yml
---
AuthMode: public #[OPTIONAL]
AssetsPath: /var/db/photoprism/assets
StoragePath: /mnt/photos
OriginalsPath: /mnt/photos/originals
ImportPath: /mnt/photos/import
# The following lines are only needed if you set up the
# optional MariaDB server
DatabaseDriver: mysql
DatabaseName: photoprism
DatabaseServer: "127.0.0.1:3306"
DatabaseUser: photoprism
DatabasePassword: CHANGEME

I got hung up, but thanks to follow up support in this thread... not sure if I missed something initially but needed to mkdir the photos and originals directories before editing the options file.. or it would not save. once I created those directories the options file saved perfectly

And just a heads up.. if testing on your own photos... may want to point to source mount to a folder that isn't too huge....
Silly me, I pointed it to my "All Pictures" folder......
Just shy of 48 hours later and the initial index finished!! 59822 pictures!!!
Obviously the speed of your server will affect this. but just know the first index will take some serious time....

Thanks!
 

iamjasonfung

Cadet
Joined
Oct 27, 2023
Messages
2
Banging my head off a wall here, and hoping anyone could help out.

PhotoPrism is starting fine (and accessible) with this command:
su -m photoprism -c 'photoprism --defaults-yaml /mnt/photos/options.yml start'

But I'm not having any luck with (says "starting photoprism" but not accessible via http://<IP>:2342:
service photoprism start

verified /etc/rc.conf is showing:
sysrc photoprism_enable="YES" sysrc photoprism_assetspath="/var/db/photoprism/assets" sysrc photoprism_storagepath="/mnt/photos/" sysrc photoprism_defaultsyaml="/mnt/photos/options.yml" sysrc photoprism_args="--something --something-else"

Any help would be fandiddlytastic.
 

exeter_acres

Explorer
Joined
Oct 8, 2020
Messages
54
are you sure you are using the correct IP address set up in jail creation? It is not the same as the regular IP for the truenas server
 

iamjasonfung

Cadet
Joined
Oct 27, 2023
Messages
2
are you sure you are using the correct IP address set up in jail creation? It is not the same as the regular IP for the truenas server
Yup. I'm using the same IP I assigned during jail creation.

If I use that IP:2342 it only works if I've run this from the jail:
su -m photoprism -c 'photoprism --defaults-yaml /mnt/photos/options.yml start'

If I exit that; and use the below (or restart the jail), that IP:2342 is not responsive:
service photoprism start
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Can you try to install using a script I created?

 

milosbabovic

Cadet
Joined
Oct 21, 2023
Messages
6
Yup. I'm using the same IP I assigned during jail creation.

If I use that IP:2342 it only works if I've run this from the jail:
su -m photoprism -c 'photoprism --defaults-yaml /mnt/photos/options.yml start'

If I exit that; and use the below (or restart the jail), that IP:2342 is not responsive:
service photoprism start
Beware: the "Hit ENTER at root password prompt" is misleading. If you created root password for your TrueNAS, then at this step you need to enter you root password, NOT to just hit Enter.
 

mgill

Cadet
Joined
Jul 15, 2023
Messages
4
Hello everyone, thanks for an insightful and engaging thread. New to TrueNas CORE and this is the first app I wanted to get installed. Everything is running correctly so far - great thread to help a noob get started.

Question - the instructions had us point to a Photoprism version thats a year old. Whats the right way to upgrade now? Assuming I followed the steps in this thread, whats the right way? pkg does not identify an upgrade for the package, Im assuming because we pointed to a specific version. Can I just overlay a newer version with an updated pkg command?

Thanks everyone!
 

mgill

Cadet
Joined
Jul 15, 2023
Messages
4
During the installation just use current pkg link.
Ive already done all the install and setup, are you saying I can just go back to the line that installs the package and just run that line and its overlays the new version and everything else still works?

The point of my question was how can I upgrade without doing it all over again.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Doesn't pkg upgrade inside the jail "just work"?
 

mgill

Cadet
Joined
Jul 15, 2023
Messages
4
Doesn't pkg upgrade inside the jail "just work"?
It does not appear to - running
Code:
pkg update
gives me
Code:
Your packages are up to date.


And while Im not an expert Im guessing this is because the command we used pointed to a specific port in a specific location.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What is in /etc/pkg and in /usr/local/etc/pkg/repos?
 

mgill

Cadet
Joined
Jul 15, 2023
Messages
4
The way this guide and also this script installs photoprism is to do a pkg add of the photoprism port. There is no port for it in the FreeBSD repos.
Which (I think) explains why there is no repo reference and those directories are empty.

So, back to the original question - if I pulled a newer version of the port do I need to do the whole thing over after deleting everything? Or can I overlay? Best practice here?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You could try
Code:
pkg add https://github.com/psa/libtensorflow1-freebsd-port/releases/download/1.15.5-pre-release-0/libtensorflow1-1.15.5-FreeBSD-12.3-AVX.pkg
pkg add https://github.com/psa/photoprism-freebsd-port/releases/download/2023-07-19/photoprism-g20230719-FreeBSD-12.3-separatedTensorflow.pkg

inside the jail.

If this is the version you are running already, then you need to wait until the maintainer of these packages provides an update.

So there are finished ports somebody put on github but did not submit to the FreeBSD project for inclusion? Doesn't make much sense to me.
 
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973
You could try
Code:
pkg add https://github.com/psa/libtensorflow1-freebsd-port/releases/download/1.15.5-pre-release-0/libtensorflow1-1.15.5-FreeBSD-12.3-AVX.pkg
pkg add https://github.com/psa/photoprism-freebsd-port/releases/download/2023-07-19/photoprism-g20230719-FreeBSD-12.3-separatedTensorflow.pkg

inside the jail.

If this is the version you are running already, then you need to wait until the maintainer of these packages provides an update.

So there are finished ports somebody put on github but did not submit to the FreeBSD project for inclusion? Doesn't make much sense to me.
Correct. Someone on the photoprism github also did a Makefile on FreeBSD 13.2, and it seemed to work for them, but took an extremely long time. I asked them to upload the port.
 

cockrell960

Cadet
Joined
Dec 30, 2023
Messages
6
I am getting an error message when trying to install libtensorflow1

Install a working version of libtensorflow1:
pkg add https://github.com/psa/libtensorflo.../libtensorflow1-1.15.5-FreeBSD-12.2-noAVX.pkg

i get an error occurred while fetching pkg. I also tried with the latest link on github

pkg add https://github.com/psa/photoprism-f...20230719-FreeBSD-12.3-separatedTensorflow.pkg

same error using this one and the other link on page 5 or 6 of this forum page that someone posted.

Is there something else i need to do now?
 
Top