ads

Latest Update

recent

Latest Update

random

Snipe-IT Inventory System

Homelab application case study

Deploying Snipe-IT on TrueNAS SCALE

A self-hosted asset-management deployment built on my TrueNAS homelab using containers, persistent datasets, MariaDB, backup routines, and Cloudflare Tunnel for selected remote access.

Platform TrueNAS SCALE · UGREEN DXP2800
Application Snipe-IT
Database MariaDB
Environment Personal homelab / testing
Snipe-IT deployment on TrueNAS SCALE
Containerized Snipe-IT application and database separated into managed services
Persistent storage Application and database data mapped to dedicated TrueNAS datasets
Remote access Selected access provided through Cloudflare Tunnel rather than direct port forwarding
01 · Project overview

Turning a homelab NAS into an asset-management platform.

This project documents a self-hosted Snipe-IT deployment running inside my TrueNAS SCALE environment. The objective was to build a realistic asset-management lab where I could practice application deployment, database administration, persistent storage, backup, permissions, and remote access.

Snipe-IT provides a structured way to track hardware, assignments, accessories, licenses, locations, and lifecycle information. In this homelab, it also serves as a practical environment for testing inventory workflows before applying similar concepts in operational IT.

This is a personal lab implementation. It should not be interpreted as a public production asset database or as a disclosure of any employer inventory. Public case studies should keep real organizational asset data, user data, credentials, and internal endpoints private.
02 · Hardware

The application runs on the same compact server as the rest of the homelab.

ServerUGREEN DXP2800
ProcessorIntel N100
Memory16 GB DDR5
System / apps1 TB SSD
Data storage2 TB HDD
NetworkGigabit LAN
03 · Deployment

Application, database, storage, and access were treated as separate layers.

01
Prepare persistent datasets.

Create dedicated storage locations for application configuration, database data, and backups before starting the containers.

02
Deploy the application stack.

Run Snipe-IT and the MariaDB backend as separate containers using a Compose-based configuration.

03
Configure the database.

Create the database, database user, password, and application connection parameters required by Snipe-IT.

04
Connect persistent volumes.

Map application and database storage to the appropriate TrueNAS datasets so container recreation does not destroy persistent data.

05
Configure remote access and validate.

Add the selected service to the Cloudflare Tunnel configuration, confirm HTTPS access, and test application behavior before considering the deployment complete.

04 · Storage design

Persistent application data is kept outside the containers.

The Snipe-IT application data is stored under a dedicated dataset in the TrueNAS pool. Database files are kept on SSD-backed storage for responsiveness, while backup data is handled separately from the running containers.

Application data

Datasetpool/config/snipeit
PurposePersistent Snipe-IT configuration/data
LocationTrueNAS dataset

Permissions used in this lab

Ownership1000:1000 where required
Mode775 where appropriate
GoalMatch container runtime access requirements
UID/GID 1000:1000 and mode 775 were choices used for this lab where the containers required them. They are not universal Snipe-IT or TrueNAS security recommendations. Dataset ownership should match the actual runtime user and least-privilege requirements.
05 · Application stack

Three services make up the core deployment.

01
Snipe-IT

The web application responsible for asset, accessory, license, user, and lifecycle management.

Application
02
MariaDB

Database backend used by the Snipe-IT application.

Database
03
Cloudflare Tunnel

Outbound tunnel used to make the selected web service reachable remotely without direct router port forwarding.

Remote access
06 · Networking

Keep the application private by default and expose only what is required.

On the local network, Snipe-IT is accessed through the homelab infrastructure. Remote access is provided through Cloudflare Tunnel. I have intentionally removed the public Snipe-IT hostname from this version of the article because publishing an administrative endpoint adds little value to the technical case study.

Internet └── Cloudflare └── Outbound Tunnel └── TrueNAS SCALE ├── Snipe-IT container └── MariaDB container LAN └── TrueNAS SCALE └── Local Snipe-IT access

The important design point is the access pattern: remote traffic is brokered through an outbound tunnel rather than by forwarding an application port directly from the internet to the NAS.

07 · Backup and monitoring

Application availability is only useful if the data can be recovered.

Dataset snapshots Daily snapshots are used for point-in-time recovery of supported application datasets.
Database exports Database dumps are generated on a scheduled basis so the database can be restored independently of the container filesystem.
External backup Important backup data is copied away from the active application dataset where appropriate.
Monitoring TrueNAS system health, container status, and application/container logs are reviewed when troubleshooting.
08 · Challenges

Most of the learning came from the failure modes.

Problem Snipe-IT returned HTTP 500 errors.

The containers started, but the application could not authenticate to the database using the configured values.

Resolution Correct the database credentials and environment variables.

After aligning the MariaDB database name, user, password, and Snipe-IT connection settings, the application loaded normally.

Problem Persistent volumes generated permission errors.

The TrueNAS dataset ownership did not initially match the user/group expected by the application runtime.

Resolution Align dataset ownership with the container runtime.

Ownership and file modes were adjusted for the affected datasets so the containers could read and write persistent data correctly.

Problem Remote HTTPS access did not work as expected.

The initial tunnel configuration did not correctly route the intended hostname to the local Snipe-IT service.

Resolution Correct the Cloudflare Tunnel ingress configuration.

After fixing the tunnel configuration and service target, HTTPS access worked through the intended tunnel path.

09 · Access and security

A public login page is not the same thing as a secure deployment.

Server administration SSH uses key-based authentication where command-line access is required.
Application exposure No direct application port forwarding is required for the documented remote-access design.
Transport Remote web access is delivered over HTTPS through the tunnel provider.
Credentials Database passwords and application secrets are not included in this article and should never be committed to public Compose files or repositories.
Updates Container images and the host platform are reviewed and updated deliberately, with backups taken before material changes.
10 · Next steps

The next improvements are operational, not cosmetic.

The useful next phase is to improve identity, lifecycle automation, and recovery rather than simply adding more containers. Candidate improvements include directory integration, event-driven asset notifications, more formal database backup testing, and additional storage capacity when the data actually requires it.

Potential improvements

IdentityLDAP / directory integration
LifecycleAsset alerts and reminders
RecoveryRestore testing

Scaling considerations

StorageAdd capacity when needed
DatabaseMonitor growth and backup size
AccessKeep admin exposure minimal
All Rights Reserved by Bikram Bhujel © 2019 - 2030
Powered By Bikram Bhujel, Designed by Bikram Bhujel
Powered by Blogger.