Skip to content

Unthred/AnimalTracker

Repository files navigation

AnimalTracker

Blazor Web App (server-side interactivity) for tracking animal sightings.

Prereqs

  • .NET SDK 10
  • Node.js (for Tailwind build)

Run (dev)

In one terminal:

cd C:\src\AnimalTracker
npm run watch:css

In another terminal:

cd C:\src\AnimalTracker
dotnet run --project .\src\AnimalTracker\AnimalTracker.csproj

Deploy (UnRaid + OPNsense HAProxy)

Deploy on UnRaid (pull prebuilt image)

  1. Copy or clone this repo onto UnRaid (for example under /mnt/user/appdata/animaltracker-src).
  2. In the repo root, create your environment file:
cp .env.example .env
  1. Edit .env and set:
  • APP_PORT (default 8085)
  • ANIMALTRACKER_IMAGE (default ghcr.io/unthred/animaltracker:main)
  • DATA_ROOT (default ./data, or absolute /mnt/user/appdata/animaltracker)
  • optional logging levels:
    • LOG_LEVEL_DEFAULT
    • LOG_LEVEL_ASPNETCORE
    • LOG_LEVEL_EF_SQL (set Information temporarily to see SQL)
    • LOG_LEVEL_EF_MIGRATIONS
  • optional first-run admin bootstrap:
    • ANIMALTRACKER_ADMIN_EMAIL
    • ANIMALTRACKER_ADMIN_PASSWORD
  • optional SMTP email delivery:
    • EMAIL_SMTP_HOST
    • EMAIL_SMTP_PORT
    • EMAIL_SMTP_USERNAME
    • EMAIL_SMTP_PASSWORD
    • EMAIL_FROM_EMAIL
    • EMAIL_FROM_NAME
    • EMAIL_ENABLE_SSL
  1. Start or update the container from repo root:
bash ./unraid-update.sh

The update script:

  • fast-forwards your repo on UnRaid
  • pulls the latest published image from GHCR
  • recreates only the animaltracker container to minimize downtime

Persisted paths (from docker-compose.yml):

  • ${DATA_ROOT}/Data/app/Data (SQLite DB)
  • ${DATA_ROOT}/App_Data/app/App_Data (photos, backgrounds, data protection keys)

Email delivery

  • If EMAIL_SMTP_HOST and EMAIL_FROM_EMAIL are set, account confirmation and password reset emails are sent via SMTP.
  • Typical authenticated SMTP setup uses port 587 with EMAIL_ENABLE_SSL=true.
  • If SMTP is not configured, the app falls back to showing generated auth links in the UI for local/dev use.

Admin account

  • If ANIMALTRACKER_ADMIN_EMAIL and ANIMALTRACKER_ADMIN_PASSWORD are set in .env, the admin user is created/ensured on startup.
  • If left blank, register the first account in the UI; it becomes admin automatically.
  • Admin dashboard route: /admin.

Reverse proxy

Create animaltracker.yeradonkey.com in HAProxy and forward to the host port from .env (APP_PORT, default 8085). Ensure HAProxy forwards:

  • X-Forwarded-Proto: https
  • X-Forwarded-For

About

A self hosted website to monitor animals visiting my garden

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors