TrueNAS
This guide covers TrueNAS Community Edition 24.10.2.2 (Electric Eel) and later, which run apps with Docker. On an older version, upgrade first; the TrueNAS release notes list breaking changes and how to upgrade.
1. Create the datasets
Section titled “1. Create the datasets”Frameleaf needs two datasets: one for your photos and one for the database. You can name them to suit you; this guide uses a parent frameleaf with two children, /mnt/tank/frameleaf/data and /mnt/tank/frameleaf/pgData. See TrueNAS’s guide to creating datasets.
- Create the parent dataset
frameleafwith the default Generic preset. - Create
datainside it with the Apps dataset preset. This gives theappsuser (UID 568) the modify permission it needs. - Create
pgDatainside it with the Generic preset, then make the usernetdata(UID 999) its owner. Postgres won’t start otherwise.
| Dataset | Preset | Permission needed |
|---|---|---|
frameleaf |
Generic | |
data |
Apps | Modify for the user that runs the app (apps, UID 568, by default) |
pgData |
Generic | Owned by netdata (UID 999) |
The app can run as any user and group; the default is apps (UID 568, GID 568). If you choose a different user, keep the Generic preset for data and give that user the modify permission instead.
If the data dataset uses ACLs
Section titled “If the data dataset uses ACLs”Skip this if you created data with the Apps preset.
If data is shared over the network (its ACL Type is SMB/NFSv4) and you plan to use a storage template, set its ACL Mode to Passthrough. When the template moves files from upload to library inside the dataset, the server runs chmod and must be allowed to.
- Go to Datasets and select the dataset.
- Click Edit next to Dataset Details, then open Advanced Options.
- Under ACL Mode, choose
Passthroughand click Save. If it’s greyed out, set ACL Type toSMB/NFSv4first.
2. Prepare the Compose file
Section titled “2. Prepare the Compose file”- Download docker-compose.yml and example.env from the latest Frameleaf release.
- In
docker-compose.yml, replace${UPLOAD_LOCATION}with the path of yourdatadataset (for example/mnt/tank/frameleaf/data) and${DB_DATA_LOCATION}with the path ofpgData(for example/mnt/tank/frameleaf/pgData). - TrueNAS doesn’t read a separate
.envfile. Remove the twoenv_file:entries, then copy the values you need fromexample.envinto anenvironment:section of each service, and replace the matching${...}references in the file. You need at leastDB_PASSWORD,DB_USERNAME,DB_DATABASE_NAMEandFRAMELEAF_VERSION, plusTZif you want your time zone. Choose your own database password, using only letters and numbers.
For example, the database service ends up like this:
database: container_name: frameleaf_postgres image: ghcr.io/frameleaf/frameleaf-postgres:14-vectorchord0.4.3-pgvectors0.2.0 environment: POSTGRES_PASSWORD: yourpassword POSTGRES_USER: postgres POSTGRES_DB: immich POSTGRES_INITDB_ARGS: "--data-checksums" volumes: - /mnt/tank/frameleaf/pgData:/var/lib/postgresql/dataand immich-server gets the same values as DB_PASSWORD, DB_USERNAME and DB_DATABASE_NAME:
immich-server: container_name: frameleaf_server image: ghcr.io/frameleaf/frameleaf-server:release environment: DB_PASSWORD: yourpassword DB_USERNAME: postgres DB_DATABASE_NAME: immich TZ: Europe/London volumes: - /mnt/tank/frameleaf/data:/data - /etc/localtime:/etc/localtime:roUse the image tag from your release’s example.env (FRAMELEAF_VERSION) in place of release if you want to pin the exact version. Keep the rest of each service (ports, depends_on, health checks) as it is in the release file.
3. Install
Section titled “3. Install”- In TrueNAS, go to Apps and click Discover Apps.
- Open the menu next to Custom App and choose Install via YAML.
- Name the app
frameleaf, paste your edited Compose file and click Save. - When it’s running, open
http://<truenas-ip>:2283from your home network and follow first steps. The setup code is in the logs of theframeleaf_servercontainer.
Update
Section titled “Update”- Read the release notes and Upgrading, and make sure your library is backed up.
- Download the new release’s
docker-compose.ymland make the same edits as before. - Replace the app’s YAML with it and save.