selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

nutritrace logo

Self-host nutritrace

v1.4.0

Self-hosted nutrition tracker with PWA

ReleaseOpen SourceAGPL-3.0
Docker ComposeCompose file & guide
docker compose up -d
Updated12 hours ago
LanguageJavaScript
Setup difficultyModerate
MobileNative app
Stars
356
Port
3001 (HTTP server)
Requires
SQLite
Docker
ghcr.io/traceapps/nutritrace
NutriTrace diary view showing a full day of food logging with macro bar, per-meal breakdowns, and water tracking

What is nutritrace?

A personal nutrition tracker you run on your own hardware. NutriTrace packages a web app, an Android client, and a Node.js backend into one Docker image. The web interface works offline as a progressive web app, while the Android build syncs with the server or runs standalone. You get a daily diary with configurable meals, water tracking, and fasting timers; a searchable food library that pulls from Open Food Facts and USDA; three calorie-goal modes including an adaptive algorithm that learns your maintenance calories from weight trends; and wellness dashboards fed by Fitbit, Withings, Garmin, or Android Health Connect. An embedded AI assistant can log entries from voice or photos, and a Model Context Protocol endpoint lets external agents like Claude Desktop query your data. Multi-user setups support OIDC single sign-on with providers such as Authentik and Keycloak. Data lives in SQLite with an optional DuckDB mirror for air-gapped food lookups. Deployment is a single docker-compose file; Unraid users can install from Community Applications. The project is AGPL-3.0 with no paid tiers or telemetry.

Should you self-host nutritrace?

nutritrace scores 51/100 on selfhost.directory (how scoring works) and ranks #11 of 31 in Health & Fitness. It has 356 GitHub stars.

It shipped 2 stable releases in the past year. The latest, v1.4.0, came out on 10 October 2026. New versions land roughly every 3 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is SparkyFitness (66/100, 6 498 stars). It scores higher overall, so compare the two before you pick. See nutritrace vs SparkyFitness side by side.

Features

  • Activity and intermittent fasting tracking
  • Adaptive TDEE goals
  • Daily diary with meal logging
  • Data migration from other trackers
  • Federation API
  • Model Context Protocol (MCP) serverOff by default; opt in with MCP_ENABLED=1
  • Multi-user with OIDC SSO
  • Native Android appSigned APK on releases page
  • Offline mode in browserWorks on iPhone too
  • Open Food Facts integration
  • Personal food, meal, and recipe database
  • Trace AI assistant
  • USDA and Mealie integration
  • Wellness integrations

nutritrace README

How to install nutritrace

Install nutritrace with Docker Compose

Environment variables
JWT_SECRET, DB_PATH, UPLOADS_PATH, PORT, BASE_URL, PUBLIC_URL, LOG_LEVEL, TRACE_REQUEST_BODIES, TRACE_REQUEST_PATHS, TRACE_BODY_MAX_BYTES, INSECURE_COOKIES, MAX_SESSION_HOURS, RECOVERY_TOKEN, OFF_LOCAL_DB, USDA_API_KEY, MEALIE_URL, MEALIE_API_KEY, AI_PROVIDER, OIDC_ISSUER, SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASS, SMTP_FROM, and many more

services: nutritrace: image: ghcr.io/traceapps/nutritrace:latest container_name: nutritrace ports: - "3001:3001" volumes: - ./data/db:/data/db - ./data/uploads:/data/uploads environment: - DB_PATH=/data/db/nutritrace.db - UPLOADS_PATH=/data/uploads - JWT_SECRET=change-me-to-a-long-random-string # OIDC_ISSUER=https://auth.example.com # optional single-provider SSO restart: unless-stopped

Generate a JWT secret:

openssl rand -base64 48

Start it:

docker compose up -d

Minimum viable compose file; full recipes with SMTP, Docker secrets, reverse proxy, multi-provider OIDC at docs/getting-started/compose/

nutritrace releases & version history

More in Health & Fitness

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…