Skip to content

TrueNAS Installation

Run OmniLux on TrueNAS SCALE using Docker Compose.

Prerequisites

  • TrueNAS SCALE 24.04+ (Dragonfish or later)
  • SSH access to your TrueNAS server
  • A dataset for OmniLux application data
  • Media datasets already configured

Dataset setup

Create dedicated datasets for OmniLux:

  1. Go to Storage > Datasets in the TrueNAS web UI
  2. Create a dataset for app data: pool/apps/omnilux
  3. Note the mount path (e.g., /mnt/pool/apps/omnilux)

Your media datasets should already exist (e.g., /mnt/pool/media/movies, /mnt/pool/media/tv).

Permissions

Set ownership on the OmniLux dataset to match the container's UID:

bash
sudo chown -R 1000:1000 /mnt/pool/apps/omnilux

For media datasets, ensure UID 1000 has read access. If multiple applications share media datasets, use a shared group:

bash
sudo chmod -R g+r /mnt/pool/media

Docker Compose deployment

SSH into your TrueNAS server and create the compose project:

bash
mkdir -p /mnt/pool/apps/omnilux/compose
cd /mnt/pool/apps/omnilux/compose

Create docker-compose.yml:

yaml
services:
  omnilux:
    image: ghcr.io/omnilux-tv/omnilux:latest
    container_name: omnilux
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    ports:
      - "4000:4000"
      - "1900:1900/udp"
    environment:
      NODE_ENV: production
      PORT: 4000
      OMNILUX_LIBRARY_ROOT: /data
      OMNILUX_DB_PATH: /app/data/omnilux.db
      OMNILUX_DOWNLOAD_PATH: /app/data/downloads
    volumes:
      - /mnt/pool/apps/omnilux/data:/app/data
      - /mnt/pool/media:/data

Start OmniLux:

bash
docker compose up -d

GPU passthrough on TrueNAS

If your TrueNAS server has an NVIDIA GPU:

  1. Install the NVIDIA drivers on the host (TrueNAS SCALE includes them for supported cards)
  2. Install the NVIDIA Container Toolkit
  3. Add GPU configuration to your compose file:
yaml
omnilux:
  runtime: nvidia
  environment:
    NVIDIA_VISIBLE_DEVICES: all
    NVIDIA_DRIVER_CAPABILITIES: compute,video,utility
  deploy:
    resources:
      reservations:
        devices:
          - driver: nvidia
            count: all
            capabilities: [gpu, video, compute]

WARNING

Not all TrueNAS SCALE versions support GPU passthrough to Docker containers. Check the TrueNAS forums for your specific version and GPU combination.

ZFS considerations

  • Snapshots: Take regular snapshots of your OmniLux data dataset for backups
  • Replication: Replicate the data dataset to another pool or server for disaster recovery
  • Compression: ZFS compression (lz4) works well for the SQLite database and logs

Updating

bash
cd /mnt/pool/apps/omnilux/compose
docker compose pull
docker compose up -d

Access

Open http://your-truenas-ip:4000 in your browser.