Scripted installation of Lychee Photo Manager

Lychee Photo Manager is “A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.” See the link above for screen shots. Here’s a script to create a TrueNAS Core 12.0 jail with Lychee and its dependencies installed:

Change to a convenient directory on your FreeNAS box and clone the repo with Then change into the freenas-iocage-lychee directory and create lychee-config with your favorite text editor. Minimally, it needs to include:


The first two parameters should be self-explanatory; the third is the path to the root of your data pool. If you have more than one data pool, choose the one where you want the Lychee data files to live.

Once you’ve created the config file, run the script with script lychee.log ./ When it finishes, it will tell you so:

Installation complete!
Using your web browser, go to to log in
Database passwords are saved in /root/lychee_db_password.txt

Do what it says, and browse to the IP address with your web browser. You should see this:

Click Next, and you should see this:

Scroll down and click Next to get this page:

Scroll down to click Next again, which will result in this page:

No edits need to be made here–the script has already created the database, created a database user with a secure password, and added this information to this configuration file. Scroll to the bottom of the page and click Install.

The next page will have lots of status information; all should have completed successfully. Click on the this page link.

This is where you’ll create your admin user–enter the desired username and password, and click Create Login. And you’re done with the installation. For more information on configuring and using Lychee, check out the Lychee docs.

I must not have something configured properly. The script creates the new jail, but is unable to install any of the specified packages.

pkg error:

  • pkg-static: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory

The most common problem would be with networking in the jail. What do you get if you run ping inside the jail?

Thanks Dan. It turned out to be a couple of things, both my errors. 1. Fat fingered the gateway IP. 2. Needed to enable the FreeBSD repo. Not sure if I also needed to disable the usr ports repo, but did that as well.

All is working now, and my wife is overjoyed that she can upload pictures of our nieces.

Thanks for the repo and guide.

1 Like