| Filename | Latest commit message | Latest commit date |
|---|---|---|
docker-compose, env template, and deployment guide (Custom App, compose, and docker run) for running RackPeek on TrueNAS SCALE with config persisted on a ZFS dataset. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
| docker | ||
| .gitignore | ||
| CLAUDE.md | ||
| LICENSE | ||
| README.md | ||
rackpeek-truenas
RackPeek deployment for TrueNAS SCALE.
RackPeek is a web UI and CLI tool for documenting home lab infrastructure as YAML. This repo provides a TrueNAS-ready deployment: a docker-compose.yml tuned for TrueNAS SCALE, step-by-step Custom App instructions, and a config directory backed by a ZFS dataset so your inventory survives container updates.
Architecture
TrueNAS SCALE
└── ZFS pool
└── /mnt/MainPool/rackpeek/config/ ← persisted on ZFS
└── config.yaml ← your infrastructure YAML
Docker container: aptacode/rackpeek
└── port 8080 → web UI + REST API
/app/config → ZFS dataset (volume mount)
Config lives entirely in a single config.yaml file on the ZFS dataset. The container is stateless — update or recreate it at any time without losing inventory.
Quick start on TrueNAS SCALE
Option A — Custom App (recommended)
-
In the TrueNAS web UI go to Apps → Discover Apps → Custom App.
-
Set the image to
aptacode/rackpeek:latest. -
Under Environment Variables, optionally add:
Variable Value RPK_API_KEYa secret key to protect the REST API (leave empty to disable) -
Under Storage, add a host path volume:
- Host path:
/mnt/MainPool/rackpeek/config(adjust to your pool name) - Mount path:
/app/config
- Host path:
-
Under Networking, add a port forward:
- Container port
8080→ Host port8080
- Container port
-
Click Install. After a few seconds, open
http://truenas-ip:8080in your browser.
First run: RackPeek creates an empty
config.yamlin/app/configif none exists. Open the web UI and start adding devices.
Option B — docker compose
# On TrueNAS, open a shell and clone this repo to a ZFS dataset:
git clone https://github.com/joanmarcriera/rackpeek-truenas.git \
/mnt/MainPool/rackpeek/deploy
cd /mnt/MainPool/rackpeek/deploy/docker
cp .env.example .env
# Edit .env: set CONFIG_ROOT to your ZFS dataset path
docker compose --env-file .env pull
docker compose --env-file .env up -d
Then open http://truenas-ip:8080.
Option C — docker run (one-liner)
docker run -d \
--name rackpeek \
--restart unless-stopped \
-p 8080:8080 \
-v /mnt/MainPool/rackpeek/config:/app/config \
aptacode/rackpeek:latest
Environment variables
| Variable | Required | Default | Description |
|---|---|---|---|
RPK_YAML_DIR |
no | /app/config |
Internal config directory — do not change unless you remap the volume |
RPK_API_KEY |
no | (empty — API disabled) | Secret key for REST API endpoints; header X-Api-Key |
When RPK_API_KEY is empty the REST inventory API returns 503. The web UI is always available regardless.
Data layout
/app/config/ (mapped from your ZFS dataset)
└── config.yaml single file — full infrastructure inventory
RackPeek reads and writes only config.yaml. Back up this file to protect your inventory. Because it is plain YAML it is easy to version-control directly.
REST API
The inventory API is available at http://truenas-ip:8080/api/ when RPK_API_KEY is set.
# List all resources
curl -H "X-Api-Key: $RPK_API_KEY" http://truenas-ip:8080/api/inventory
# Export Ansible inventory
curl -H "X-Api-Key: $RPK_API_KEY" http://truenas-ip:8080/api/ansible-inventory
Updating RackPeek
cd /mnt/MainPool/rackpeek/deploy/docker
docker compose --env-file .env pull
docker compose --env-file .env up -d
Config is safe on the ZFS volume — the update only replaces the container image.
Security notes
- Restrict port
8080to your LAN or use the TrueNAS built-in Nginx reverse proxy for TLS termination if remote access is needed. - Set
RPK_API_KEYif you use the REST API. The web UI has no authentication — treat it as an internal tool. - The container runs as a non-root user and does not require any special Linux capabilities.
License
MIT — see LICENSE.