Looking for help with a creation script for ZenPhoto jail

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
Up until now, I'd been using a jail (from a script by @danb35 ) that runs Piwigo, but ran into a limitation - it doesn't handle videos. I looked at other scrips (Lychee), but they also don't handle video well.

After doing some more legwork, I came across https://www.zenphoto.org/ - it's a simple, file-based media gallery that handles video as well as images. As a bonus, it looks like it's well maintained and documented, and should work very well with a TrueNAS jail - because it's file based, keeping the data in a Dataset makes it easy to snapshot / modify / recover outside of the app itself. (This document should be very useful.)

Dan, would it be possible to make one of your famous and wonderful scripts for a Zenphoto jail, please? Piwigo has aged poorly, and this looks like a much better alternative.

Thank you!
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Will see what I can do...

Have you tried doing pkg install zenphoto?
It does appear to be available as a package for freebsd.

 
Last edited:

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
Will see what I can do...
Wonderful, thank you! My aim is to have a Share where I can just dump photos and videos, and ZenPhoto will pick them up - if this can work similar to Dan's Nextcloud script in how it makes a Dataset (and sub-datasets) dedicated to the app off the root of the Pool, that will make this very, very easy to use.

Thank you again!
 
Joined
Oct 22, 2019
Messages
3,641
There's already a port for it (as well as a binary package available via "pkg"). That might help to create a seamless script? It seems more convoluted than other services, though.
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
There's already a port for it (as well as a binary package available via "pkg"). That might help to create a seamless script? It seems more convoluted than other services, though.

I did see that, but the port installs into a sub-folder, and not the root of the website served by the jail. I've also seen from other systems I've worked with that when working with web apps that can self-update, you can run into a potential conflict when the app updates itself, and then PKG tries to update it as well. Hopefully pulling from source bypasses this so you always get the latest version of the app, and maintenance is easier.
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
@victort - I just browsed through your list of scripts on GitHub, and it looks like PhotoPrism does the same thing as ZenPhoto. Before you put any effort into this, let me try your existing PhotoPrism script.
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
@victort - OK, I tired PhotoPrism, and while your script is great... I don't like how the app organizes (or doesn't organize) files. I think I much prefer the simplicity of ZenPhoto.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
I did see that, but the port installs into a sub-folder, and not the root of the website served by the jail. I've also seen from other systems I've worked with that when working with web apps that can self-update, you can run into a potential conflict when the app updates itself, and then PKG tries to update it as well. Hopefully pulling from source bypasses this so you always get the latest version of the app, and maintenance is easier.
You should be good to go. I’ve made the script. Instructions are the same as all the others.

You need a config file like all the other scripts with jail ip, gateway, cert, poolpath, and so forth…
You will need a dataset “zenphoto” and two subdatasets “db” and “data”

I will update the GitHub with instructions later.

Functionality seems to all be there. I was also able to delete the jail and rerun the script on top of the existing data, and my admin user was still there as well as the gallery.
I pretty much followed all the docs when it comes to installing and upgrading, but if someone sees something I missed I can add it to the script.

There are some minor errors like caddy being unsupported, and permissions being to loose, but everything seems to work.

One thing perhaps is the .htaccess file that disallows indexing of certain file types. This can be included in the Caddyfile if needed.
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
I was able to get the jail up and running, so that's good. I'm running into a challenge with SSL, in that I am running the jail behind an Apache reverse Proxy, and it's saying forms are insecure when I submit them - I am guessing because the jail itself isn't using SSL, and where I'm running into trouble is calling the LE cert. Would you like me to post more here, or start a new thread?
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
Of course, now that I posted about it, it's working smoothly. (After mucking about trying to figure it all out, I deleted it and re-created the Jail, and configs from scratch. I'm at home now, I can try to reproduce it from the outside world later this week.)

I'll make a new thread if I run into options.

Thank you SO MUCH for this - now I need to sit down and play with all the options and settings, and move all my photos over to the new setup!
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Of course, now that I posted about it, it's working smoothly. (After mucking about trying to figure it all out, I deleted it and re-created the Jail, and configs from scratch. I'm at home now, I can try to reproduce it from the outside world later this week.)

I'll make a new thread if I run into options.

Thank you SO MUCH for this - now I need to sit down and play with all the options and settings, and move all my photos over to the new setup!
If you are going to expose the jail to the world, make sure you check all the security settings and so forth.
There are options to enable https only etc...
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
OK, I was able to reproduce the issue. It's ONLY on the Login form, it seems. Here's my setup:

Public Internet => Router => Apache Proxy Server in DMZ of Router => Jails (ZenPhoto, Nextcloud, etc.) behind the proxy server

Apache is configured to proxy to the Jail's IP: http://10.0.0.248

Jail is created with NO_CERT

Most form submissions seem to work fine, but when I try to log into https://zenphoto.aiskon.net/zp-core/admin.php both FireFox and Chrome warn me that the form is not secure. Images attached.
 

Attachments

  • Screenshot 2023-09-13 at 8.31.10 PM.png
    Screenshot 2023-09-13 at 8.31.10 PM.png
    149.2 KB · Views: 52
  • Screenshot 2023-09-13 at 8.32.37 PM.png
    Screenshot 2023-09-13 at 8.32.37 PM.png
    211 KB · Views: 41

victort

Guru
Joined
Dec 31, 2021
Messages
973
According to the docs and zenphoto forums, it appears it is a problem with zenphoto itself being a bit slow in responding to the requests. Or that the protocol is set to http

I am having the same issue. You could try with a standalone, dns, or even selfsigned cert, and setting the protocol to https within zenphoto security settings.
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
I am having the same issue. You could try with a standalone, dns, or even selfsigned cert, and setting the protocol to https within zenphoto security settings.

That's where I am running into the issue. Standalone won't work (I think) as it's behind a Proxy. DNS, I need help figuring out how to configure it to work with Namecheap. I can try self-signed, but would prefer to get DNS working if possible.

I did try to follow the instructions to get the Namecheap plugin to work, but it didn't work out. If this needs to be a new thread, I can start a new thread.
 
Top