INSTALL GUIDE: PhotoPrism in a Jail on TrueNAS Core 13.0

fuma

Cadet
Joined
Jun 26, 2023
Messages
2
Edit:
I got it working. The issue seemed to lie in the way I set up the MariaDB section. Destroying the jail and starting from scratch without using the MariaDB option worked. Still not sure exactly what was causing it though. Thanks again for the guide!

Original reply:
Thanks a lot for the guide, it has been super useful with setting up Photoprism!
I am almost at the end, but ran into an issue at the "Test run Photoprism" section. When I enter either of the commands

or

I get the error

and when I enter the command

I just get "starting photoprism" and nothing else.
When I enter

I get "photoprism is not running."
I am not sure what is causing this. Possibly a permission issue? I am new to this kind of stuff so I apologise if it's something obvious.

When I restart the jail, it seems that Photoprism does run for about a minute, but then stops. (My evidence for this is that the command "service photoprism status" gives "photoprism is running" as a reply for about a minute)

I am new to this kind of stuff so I apologise if it's something obvious.
Thanks.

Try commenting out "photoprism_args="--something --something-else" in "/etc/rc.conf".
 

golek

Dabbler
Joined
Jun 22, 2023
Messages
11
Thanks for the walkthrough.
I followed it and it worked.

A couple things, as I was not focused enough.
I asked for access without user or password, so access to photoprism is not controlled. I regret that. I prefer to have a user with password who logs in to access. I guess I have to do that in the shell. Please help.
 

fuma

Cadet
Joined
Jun 26, 2023
Messages
2
Perhaps this way

micro /mnt/photos/options.yml
-----------------------------------------
AuthMode: public

AuthMode: admin
-----------------------------------------
 

Spusuf

Cadet
Joined
Jul 27, 2023
Messages
3
Hi, how do you switch to tensorflow from default libx264 after fresh install? Tensorflow is installed and running photoprism config shows tensorflow installed and ffmpeg-encoder set to libx264. My videos do not play (they all come up as a 1 second long static) and my faces are not being recognised. DNGs are also on the rawtherapee blacklist but I can live without that.
 

ccdff

Dabbler
Joined
Nov 12, 2020
Messages
11
I want to give a few tipps for people who are having problems mounting the originals or other folder that contains data from a mount :
Screenshot 2023-08-11 at 01.32.11.png

or problems with their jails not starting due to a "Error: [EFAULT] jail: ioc-photos: mount.fstab:"

First of all I suggest using a third party terminal, NOT the inbuild one. Copy paste and crashes are just some of my reasons.

sudo iocage console photos
cd /mnt/photos/
ls
check for any folder that you created in previous mounting efforts and delete them
exit

GUI: Stop the jail
GUI: Create new mount point, DO NOT USE "READ ONLY"

sudo iocage console photos
pkg install sudo
sudo chown -R photoprism /mnt/photos/originals

exit

GUI: Stop the jail
GUI: Edit the previous mounted folder, check "READ ONLY"

sudo iocage console photos
su -m photoprism -c 'photoprism --defaults-yaml /mnt/photos/options.yml start'


Now it should start without any problems.

ps. thank you for showing me micro. I was thinking too small, as small as nano in fact.
 
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973

This script uses mariadb. You could follow it, or alternatively, it could be added to this guide I suppose.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116

This script uses mariadb. You could follow it, or alternatively, it could be added to this guide I suppose.
Thank you for the script. I can get to the interface at http:<<ip>>:2342. However, have no idea on the username/password.
Since I'm following the script I don't know if that sets a default.
I'm attached a text file of the shell output of running the script, in case anyone can help me review and work out the issue / next steps.
 

Attachments

  • photoprism run2 (1).txt
    26.1 KB · Views: 75
Last edited:

victort

Guru
Joined
Dec 31, 2021
Messages
973
It looks like the script could not download the caddy webserver.

The user and password are automatically generated and will be shown at the end of the script once it successfully runs.

Maybe try running it again.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
It looks like the script could not download the caddy webserver.

The user and password are automatically generated and will be shown at the end of the script once it successfully runs.

Maybe try running it again.
Did as you asked. Still not providing account credentials. It seems it got further with Caddy but some errors are showing there.
 

Attachments

  • photoprism run3.txt
    32.9 KB · Views: 73

victort

Guru
Joined
Dec 31, 2021
Messages
973
I see now. There is a bug when copying the Let’s Encrypt Caddyfile.

I fixed it. Can you try to run again?

Make sure you do a git pull first from the cloned directory to sync the changes.
I would recommend recreating the datasets on your pool also.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
I would recommend recreating the datasets on your pool also.
I deleted the folder installed by the script, the jail and the poolpath folder. On running the script again, I get the following message. "

root@truenas[/tmp/truenas-iocage-photoprism]# script photoprism.log ./photoprism-jail.sh
Script started, output file is photoprism.log
JAIL_INTERFACES not set, defaulting to: vne
oot@truenas[/tmp]# cd /tmp/truenas-iocage-photoprism
root@truenas[/tmp/truenas-iocage-photoprism]# script photoprism.log ./photoprism-jail.sh
Script started, output file is photoprism.log
JAIL_INTERFACES not set, defaulting to: vnet0:bridge0
Existing Photoprism config detected...Checking database compatability.
ERROR: You can not reinstall without the previous database
Please try again after removing your config files or using the same database used previously

Script done, output file is photoprism.log
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
The dataset will need to be completely deleted and recreated. This is the one you specified in the photoprism-config

It should be somewhere at /mnt/mypool/apps or wherever you have created it.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
The dataset will need to be completely deleted and recreated. This is the one you specified in the photoprism-config

It should be somewhere at /mnt/mypool/apps or wherever you have created it.
The script checks the folder to see if it is empty. If there is anything (including hidden files) inside it, then it will recognize it as a reinstall. So best to delete the dataset and recreate it.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
The script checks the folder to see if it is empty. If there is anything (including hidden files) inside it, then it will recognize it as a reinstall. So best to delete the dataset and recreate it.
I deleted the folder that was in the photoprism-config file entirely. But still same error
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
What is your folder structure currently for your POOL_PATH?

And what is your photoprism-config file
The config file is (X is obviously redactions).

JAIL_IP="192.168.0.X"
DEFAULT_GW_IP="192.168.0.X"
POOL_PATH="/mnt/Nikin_ZFS/photoprism"
HOST_NAME="X.com"
STANDALONE_CERT=1
CERT_EMAIL="X@yahoo.co.uk"

As per the instructions, I let the script create the folder.
I have subsequently, deleted the folder /mnt/Nikin_ZFS/photoprism
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
The config file is (X is obviously redactions).

JAIL_IP="192.168.0.X"
DEFAULT_GW_IP="192.168.0.X"
POOL_PATH="/mnt/Nikin_ZFS/photoprism"
HOST_NAME="X.com"
STANDALONE_CERT=1
CERT_EMAIL="X@yahoo.co.uk"

As per the instructions, I let the script create the folder.
I have subsequently, deleted the folder /mnt/Nikin_ZFS/photoprism
You shouldn’t include the photoprism part in the path. Try /mnt/Nikin_ZFS

I’m assuming you have created a dataset at /mnt/Nikin_ZFS/photoprism?
 
Top