SparkyFitness---Backend

SparkyFitness---Backend

Docker app from grtgbln's Repository

Overview

SparkyFitness is a comprehensive fitness tracking and management application designed to help users monitor their nutrition, exercise, and body measurements. It provides tools for daily progress tracking, goal setting, and insightful reports to support a healthy lifestyle.
This is the backend container.

SparkyFitness

A self-hosted, privacy-first alternative to MyFitnessPal. Track nutrition, exercise, body metrics, and health data while keeping full control of your data. image

SparkyFitness is a self-hosted fitness tracking platform made up of:

  • A backend server (API + data storage)
  • A web-based frontend
  • Native mobile apps for iOS and Android

It stores and manages health data on infrastructure you control, without relying on third party services.

Core Features

  • Nutrition, exercise, hydration, sleep, fasting, mood and body measurement tracking
  • Goal setting and daily check-ins
  • Interactive charts and long-term reports
  • Multiple user profiles and family access
  • Light and dark themes
  • OIDC, TOTP, Passkey, MFA etc.

Health & Device Integrations

SparkyFitness can sync data from multiple health and fitness platforms:

  • Apple Health (iOS)
  • Google Health Connect (Android)
  • Google Health API
  • Fitbit
  • Garmin Connect
  • Withings
  • Polar Flow
  • Hevy (not tested)
  • OpenFoodFacts
  • USDA
  • Fatsecret
  • Nutritioninx
  • Mealie
  • Tandoor
  • Strava (partially tested)
  • Norish
  • Yazio (uses unofficial API)
  • Swiss Food Database
  • Free Exercise DB (Github)
  • Wger

Integrations automatically sync activity data such as steps, workouts, and sleep, along with health metrics like weight and body measurements, to your SparkyFitness server.

Optional AI Features (Beta)

SparkyAI provides a conversational interface for logging data and reviewing progress.

  • Log food, exercise, body stats, and steps via chat
  • Upload food images for automatic meal logging
  • Retains conversation history for follow ups

Note: AI features are currently in beta.

Installation

Choose one of the two ways to run SparkyFitness:

1. Self-Hosted

Get a SparkyFitness server running in minutes using Docker Compose:

# 1. Create a new folder
mkdir sparkyfitness && cd sparkyfitness

# 2. Download Docker files only
curl -L -o docker-compose.yml https://github.com/CodeWithCJ/SparkyFitness/releases/latest/download/docker-compose.prod.yml
curl -L -o .env https://github.com/CodeWithCJ/SparkyFitness/releases/latest/download/default.env.example

# 3. (Optional) Edit .env to customize database credentials, ports, etc.

# 4. Start the app
docker compose pull && docker compose up -d

# Access application at http://localhost:8080

Note: For other self-hosted installation methods, refer to the documentation at https://codewithcj.github.io/SparkyFitness/.

2. Cloud (for non-technical users)

If you are not a technical user and prefer not to run SparkyFitness on your own server, you can deploy a hosted instance in the cloud using one of the following providers.

Run on PikaPods
Deploy with Zenith

Note: These are independent third-party services. We encourage you to explore features provided by each provider to determine the one that best fits your needs.

🎥 Video Tutorial

Watch the video

Quick 2-minute tutorial showing how to install SparkyFitness (self-hosted fitness tracker).

Documentation

For full installation guides, configuration options, and development docs, please visit our Documentation Site.

Quick Links

Need Help?

  • Post in Github issues/discussion.
  • For faster response and get help from other community memebers Join our Discord

Star History

Star History Chart

Translations

Weblate Translations

Translation status

Repository activity

Alt

Contributors

⚠️ Known Issues / Beta Features ⚠️

SparkyFitness is under active development. Breaking changes may occur between releases.

  • Auto-updating containers is not recommended
  • Always review release notes before upgrading

The following features are currently in beta and may not have been thoroughly tested. Expect potential bugs or incomplete functionality:

  • AI Chatbot
  • Family & Friends access
  • API documentation

Media gallery

Install SparkyFitness---Backend on Unraid in a few clicks.

Find SparkyFitness---Backend in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for SparkyFitness---Backend Review the template variables and paths Click Install

Requirements


        Requires separate SparkyFitness - Frontend and Postgres containers.
    

Download Statistics

716,836
Total Downloads
146,742
This Month
96,125
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Details

Repository
codewithcj/sparkyfitness_server:latest
Last Updated2026-06-27
First Seen2025-08-29

Runtime arguments

Network
sparkyfitness
Privileged
false

Template configuration

API PortPorttcp

Container Port: 3010

Target
3010
Default
3010
Value
3010
Postgres - HostVariable

Hostname or IP address of the Postgres server

Target
SPARKY_FITNESS_DB_HOST
Default
http://IP_ADDRESS
Value
http://IP_ADDRESS
Postgres - PortVariable

Port number for the Postgres server

Target
SPARKY_FITNESS_DB_PORT
Default
5432
Value
5432
Postgres - Database NameVariable

Name of the Postgres database

Target
SPARKY_FITNESS_DB_NAME
Default
sparkyfitness_db
Value
sparkyfitness_db
Postgres - UsernameVariable

Username for the Postgres database

Target
SPARKY_FITNESS_DB_USER
Postgres - PasswordVariable

Password for the Postgres database

Target
SPARKY_FITNESS_DB_PASSWORD
Postgres - UsernameVariable

Username for the Postgres database

Target
SPARKY_FITNESS_APP_DB_USER
Postgres - PasswordVariable

Password for the Postgres database

Target
SPARKY_FITNESS_APP_DB_PASSWORD
Garmin Microservice URLVariable

URL of the Garmin microservice (e.g., http://IP_ADDRESS:8000)

Target
GARMIN_MICROSERVICE_URL
Default
http://IP_ADDRESS:8000
Value
http://IP_ADDRESS:8000
Frontend URLVariable

URL where the frontend is accessible (e.g., http://IP_ADDRESS:3004)

Target
SPARKY_FITNESS_FRONTEND_URL
Default
http://IP_ADDRESS:3004
Value
http://IP_ADDRESS:3004
Security - Encryption KeyVariable

A 64-character hex string used to encrypt data. Generate with 'openssl rand -hex 32'

Target
SPARKY_FITNESS_API_ENCRYPTION_KEY
Security - SecretVariable

A secret key. Generate with 'openssl rand -base64 32'

Target
BETTER_AUTH_SECRET
Disable User SignupsVariable

Set to true to disable new user registrations

Target
SPARKY_FITNESS_DISABLE_SIGNUP
Default
false|true
Force Email LoginsVariable

Force email/password login to be enabled, overriding any in-app settings. This is a fail-safe to prevent being locked out if OIDC is misconfigured.

Target
SPARKY_FITNESS_FORCE_EMAIL_LOGIN
Default
false|true
Admin EmailVariable

Automatically grant admin rights to this email

Target
SPARKY_FITNESS_ADMIN_EMAIL
Email - SMTP HostVariable

SMTP server hostname for sending emails

Target
SPARKY_FITNESS_EMAIL_HOST
Email - SMTP PortVariable

SMTP server port (default: 587)

Target
SPARKY_FITNESS_EMAIL_PORT
Default
587
Value
587
Email - SMTP SecureVariable

Set to true if the SMTP server requires a secure connection (TLS)

Target
SPARKY_FITNESS_EMAIL_SECURE
Default
false|true
Email - SMTP UserVariable

SMTP server username for authentication

Target
SPARKY_FITNESS_EMAIL_USER
Email - SMTP PasswordVariable

SMTP server password for authentication

Target
SPARKY_FITNESS_EMAIL_PASS
Email - From AddressVariable

Email address that emails will be sent from

Target
SPARKY_FITNESS_EMAIL_FROM
Backup StoragePath

Path to the backup storage folder

Target
/app/SparkyFitnessServer/backup
Default
/mnt/user/appdata/sparkyfitness/backup
Value
/mnt/user/appdata/sparkyfitness/backup
Uploads StoragePath

Path to the uploads storage folder

Target
/app/SparkyFitnessServer/uploads
Default
/mnt/user/appdata/sparkyfitness/uploads
Value
/mnt/user/appdata/sparkyfitness/uploads
Log LevelVariable

Logging level

Target
SPARKY_FITNESS_LOG_LEVEL
Default
INFO|DEBUG|WARN|ERROR
Node EnvironmentVariable

Node environment setting

Target
NODE_ENV
Default
production|development
Internal API PortVariable

Internal ort for API communication. Not recommended to change.

Target
SPARKY_FITNESS_SERVER_PORT
Default
3010
Value
3010