# TrueNAS

Markdown version of <https://sam-dumont.github.io/immich-memories/docs/run/platforms/truenas/>.

Use the Docker-based Apps system in TrueNAS 24.10 or newer; older Kubernetes-based SCALE installs
need a different deployment. These steps follow
[TrueNAS's custom app documentation](https://apps.truenas.com/managing-apps/installing-custom-apps/).
[Tested deployments](https://sam-dumont.github.io/immich-memories/docs/run/tested-deployments.md) lists the platforms that were run end to end.

## 1. Open the YAML installer

With an Apps storage pool configured, open **Apps → Discover → ⋮ → Install via YAML**. Choose a lowercase application name such as `immichmemories`.

## 2. Paste and save

Enter your Immich URL below, paste the generated `docker-compose.yml` into **Custom Config**, replace `replace-with-your-immich-api-key` with your own [API key](https://sam-dumont.github.io/immich-memories/docs/run/docker.md#the-api-key) (the builder never asks for it), then configure access below before clicking **Save**. There is no adjacent `.env` file in this editor. If adapting a downloaded Compose file instead, resolve **every** `${...}` expression before pasting, including image tags, paths and ports.

GPU and Full need an NVIDIA host with the Container Toolkit, or a separate GPU box. Full also needs a reader. Replace the generated reader-key placeholder with its API key, or empty it if that server does not require one.

The setup builder on [the HTML page](https://sam-dumont.github.io/immich-memories/docs/run/platforms/truenas/) generates the setup files for your choices in the browser. Pick a platform, a tier and the options there; nothing is sent anywhere.

Keep **Single file for a stack editor** selected. The generated file includes a Settings
encryption key; keep it with your backups and restrict access after adding your API keys.

Docker-managed volumes retain settings, prepared facts and films across container replacement.
Download films through the app. To use a NAS share instead, follow
[folder permissions](https://sam-dumont.github.io/immich-memories/docs/run/nas.md#the-output-folder) before changing the output mount.

For GPU/Full on this NVIDIA host, select **Use NVIDIA CUDA containers**. For a separate worker,
fill in **GPU box address** and start the provided worker files on that machine first.

The app asks for a sign-in either way. To open it to your trusted LAN, tick **Open the UI to
other machines on my LAN** in the builder above. Leave the login empty to get a generated password
(read it with `docker logs immich-memories` or in the container's log view), or enter a username
and a password of at least 12 characters and the generated file carries them.

To do it by hand, edit the lines the file already has. Do not add a second copy: Compose refuses a
file that defines the same key twice. To pick your own login, change the two empty values under the
app service's `environment:` block:

```yaml
IMMICH_MEMORIES_AUTH_USERNAME: admin
IMMICH_MEMORIES_AUTH_PASSWORD: replace-with-your-own-long-password
```

The password needs at least 12 characters. To publish the port, in the same service's `ports:` change
`127.0.0.1:22830:8080` to `0.0.0.0:22830:8080`. If the host already uses 22830, choose another host
port, for example `0.0.0.0:22831:8080`. The last number remains 8080.

This is the app's login; the container manager's account does not protect this port. These
settings use HTTP on your LAN. For HTTPS or private access through localhost, use the
[other access routes](https://sam-dumont.github.io/immich-memories/docs/run/docker.md#reaching-the-ui-from-another-machine).

The example uses Docker-managed volumes. For datasets you can snapshot and share directly, create dedicated datasets first and replace the corresponding volume mounts with their absolute `/mnt/...` paths. Give UID/GID 1000 access to those datasets; do not change permissions on an entire existing storage pool.

Set film language after startup in [Settings](https://sam-dumont.github.io/immich-memories/docs/get-started/after-install.md).

## 3. Open the app and download models

Open `http://your-server-address:22830` (or your chosen host port) and sign in with the
login you set, or with the generated password from the app's logs (**Workloads → Logs**). With
private localhost access, use the forwarded URL instead.

On **Memory**, click **Download models** and wait for it to finish. The card lists the files and
download hosts; it disappears when the required files are ready. If it is absent and no error is
shown, those files are already present. Downloads are kept on the config volume for later starts.

## 4. Check and make a film

**Basic:** continue to [your first film](https://sam-dumont.github.io/immich-memories/docs/get-started/first-film.md).

**GPU and Full:** the browser download does not check the external model services. Open **Apps → Installed**, select `immichmemories`, then in **Workloads** click the **Shell** icon for the running app container. Choose `/bin/sh` if prompted. This is the app shell, not **System → Shell**.
Run:

```bash
immich-memories preflight
```

This runs inside the app container, so do not add `docker exec`. Wait for inference and captions
(and the Full reader) to become ready, and resolve any required-service or storage errors before
making [your first film](https://sam-dumont.github.io/immich-memories/docs/get-started/first-film.md). Optional upload permissions can warn
while still allowing local films.

[Installation help](https://sam-dumont.github.io/immich-memories/docs/reference/installation-help.md) covers connection, port, permission and
startup errors. It also gives the CLI model-download command if you need it.

The container shell requires **Web Shell Access** and the apps write role (`APPS_WRITE`), or Full Admin; see [TrueNAS's Workloads controls](https://cdn.truenas.com/docs/scale/apps/appsscreens/#workloads-widget).
