Try describing what you need:

openGym logo

openGym

★ 21.5k

A self-hosted alternative to Hevy, Strong, Jefit, Fitbod

GNU Affero General Public License v3.0Open Source — No Paywall3 Containers — 3 containers — light hosting footprintDocker · ComposeNo external DB22+ active committers (12mo)

About

openGym is a self-hosted fitness tracker focused on gym training and body-weight progress. It is designed for people who want to keep workout data on infrastructure they control rather than on a...

Community Ratings

No ratings yet

Features

  • Body-weight tracking
  • Weekly workout planning
  • Guided workouts
  • Animated exercise demos
  • Workout history and progression
  • Favourite exercises
  • Custom exercises with media
  • Supersets
  • Warm-up sets
  • Offline support

Details

Last Updated
Nov 16, 2026
Created
Jul 18, 2026
Install Methods
dockerdocker-compose
Requirements
Docker
Default Port
8080From the project's Compose file
Authentication
local
Backup & Export
file-backupcopy-as-text
Privacy & Independence
No TelemetryNo Cloud RequiredOffline Capable
User Model
Multi-User
Deployment

Deployment: Docker Compose ✓3 Containers — light hosting footprintRuns as 3 containers

Run openGym yourself

Pick how much you want to manage.

3 more ways to host

Some links earn us a commission. netcup pays us one and is our preferred VPS host.

Is this your project? Sponsor a listing

Run openGym with Docker Compose

Compose file from the openGym project repository.

3 services · 1 unclassified (git)

no resource limits declared

needs persistent storage (6 volumes)

docker-compose.yml · @ e88062e · scanned Nov 3, 2026

name: opengym

services:
  # One-time: download the exercise images + GIFs into ./media (skipped if already there).
  # ~140 MB, from github.com/hasaneyldrm/exercises-dataset. That dataset is MIT for the
  # metadata and instruction text, but the images and GIFs are © Gym visual
  # (https://gymvisual.com/) and are used under the dataset's terms — openGym neither
  # redistributes nor relicenses them. See NOTICE.md.
  media:
    image: alpine/git
    volumes:
      - ./media/img:/out/img
      - ./media/gif:/out/gif
    entrypoint: ["/bin/sh", "-c"]
    command:
      - |
        if [ -z "$$(ls -A /out/img 2>/dev/null)" ]; then
          echo "↓ Downloading exercise media (~140 MB, one time)…"
          echo "  Source:  github.com/hasaneyldrm/exercises-dataset"
          echo "  Metadata and instruction text: MIT."
          echo "  Images and animations: © Gym visual — https://gymvisual.com/"
          echo "  They are used under that dataset's terms, not openGym's AGPL, and are"
          echo "  downloaded from upstream — openGym does not redistribute them."
          echo "  Terms: https://gymvisual.com/content/3-terms-and-conditions-of-use"
          echo "  Reusing this media yourself, commercially or not, needs your own licence"
          echo "  from Gym visual. Details in NOTICE.md."
          git clone --depth 1 https://github.com/hasaneyldrm/exercises-dataset /tmp/ds
          cp /tmp/ds/images/*.jpg /out/img/ && cp /tmp/ds/videos/*.gif /out/gif/
          echo "✓ Exercise media ready ($$(ls /out/img | wc -l) images)."
        else
          echo "✓ Exercise media already present — skipping download."
        fi
    restart: "no"

  # Passkey auth + per-user data (Node, no framework).
  # image: prebuilt (docker compose pull). build: from source (docker compose up --build).
  api:
    image: ghcr.io/duartesantos8/opengym-api:latest
    # Default target: no AI runtime, no AI dependency — the image every instance has always had.
    # To opt into the AI Coach, build the other target instead:
    #     API_TARGET=coach docker compose up --build api
    # `--build` matters: with an `image:` also set, compose would otherwise pull the prebuilt
    # default rather than build the coach one.
    build:
      context: ./api
      target: ${API_TARGET:-default}
    restart: unless-stopped
    env_file: .env
    environment:
      # The port the API listens on. web proxies to this same value, so the two
      # cannot drift — change it in .env and both follow.
      - PORT=${PORT:-3000}
      - DATA_DIR=/data
      # The API is reachable only through the web container here, and that container overwrites
      # X-Forwarded-For / X-Real-IP with the real peer — so the sign-in throttle may count
      # requests by those headers instead of lumping everyone in as "the web container".
      - TRUST_PROXY=${TRUST_PROXY:-1}
    volumes:
      - ./data:/data         # users, passkeys, per-user state, session secret — BACK THIS UP
                             # (and uploads/: the photos and videos of custom exercises)
      # Provider credential cache (Codex). A sibling of ./data on purpose: the documented backup
      # is `tar czf … data/`, and a live refresh token must not end up inside it. Nothing here
      # needs backing up — if you lose it, sign the provider in again.
      - ./coach-auth:/coach-auth

  # Builds the React frontend (multi-stage) and serves it, proxying /api → api
  # and the exercise media from the shared volume. Single origin for passkeys.
  web:
    image: ghcr.io/duartesantos8/opengym-web:latest
    build:
      context: .
      dockerfile: web/Dockerfile
    restart: unless-stopped
    depends_on:
      media:
        condition: service_completed_successfully
      api:
        condition: service_started
    ports:
      - "${WEB_PORT:-8080}:${NGINX_PORT:-80}"
    # nginx renders its config at start-up from these (web/nginx.conf.template),
    # so the API service does not have to be called `api`. Defaults are the old
    # hardcoded values, so an existing .env and an existing stack are unaffected.
    environment:
      - NGINX_PORT=${NGINX_PORT:-80}
      - BACKEND=${BACKEND:-api}
      - PORT=${PORT:-3000}
      # Docker's embedded DNS. Only ever needs changing on a runtime that is not Docker.
      - RESOLVER=${RESOLVER:-127.0.0.11}
      # Empty drops the CF-Connecting-IP header, so a direct client cannot forge the address
      # the activity log records. Cloudflare users set CF_CONNECTING_IP=$$http_cf_connecting_ip.
      - CF_CONNECTING_IP=${CF_CONNECTING_IP:-}
      # Subpath deployments behind a proxy that passes its prefix through ("/gym", no trailing
      # slash). Empty serves the app at the site root, which is what it has always done; a proxy
      # that strips the prefix needs nothing set (docs/SELF_HOSTING.md §5).
      - BASE_PATH=${BASE_PATH:-}
      # The largest photo or video upload nginx passes to the API. Keep it above
      # MEDIA_VIDEO_MAX_MB (40 by default), which the api service reads from .env.
      - MEDIA_UPLOAD_MAX=${MEDIA_UPLOAD_MAX:-48m}
    volumes:
      - ./media/img:/usr/share/nginx/html/img:ro
      - ./media/gif:/usr/share/nginx/html/gif:ro

This file may be out of date. Check the openGym documentation for current setup steps.

Track your self-hosted stack

Bookmark software to try, rate tools you've used, and keep your collection in one place.

Metadata extracted from README on Oct 2, 2026

Alternatives to openGym

LiftTrace logo

LiftTrace

125
A self-hosted weightlifting tracker for logging workouts, programs, progress photos, stats, and AI-assisted coaching.
Health & FitnessSelf Hosting SolutionsAuthentication Services+1
Single Container
Details
wger logo

wger

7.3k
wger is a free workout and fitness manager with routines, tracking, nutrition logging, and a built-in exercise wiki.
Health & FitnessWikisPhoto Galleries+3
Details
GymCoach logo

GymCoach

187
An open-source, self-hosted training tracker with an AI coach for logging workouts, tracking progress, and generating evidence-based debriefs and programs.
Health & FitnessSelf Hosting SolutionsArtificial Intelligence+2
3 ContainersFully FOSS
Details
Workout Cool logo

Workout Cool

8.7k
A modern fitness coaching platform for creating workout plans, tracking progress, and browsing a large exercise database.
Health & FitnessSelf Hosting SolutionsFully FOSS
2 ContainersFully FOSS
Details
SparkyFitness logo

SparkyFitness

6.8k
A self-hosted, privacy-first fitness tracking platform for logging nutrition, exercise, body metrics, and other health data.
Health & FitnessPersonal DashboardsSelf Hosting Solutions+1
3 ContainersSource Available
Details
Wingfit logo

Wingfit

538
Wingfit is a minimalist self-hosted fitness app for planning workouts, tracking personal records, and using smartwatch data.
Health & FitnessCopyleft LicenseSelf Hosting Solutions+2
Single Container
Details
Lyftr logo

Lyftr

370
Lyftr is a self-hosted, mobile-first workout and nutrition tracker that lets users log workouts, build programs, and track progress, weight, and calories.
Health & FitnessSelf Hosting SolutionsFully FOSS+1
2 ContainersFully FOSS
Details
GymMane logo

GymMane

1.8k
A free, offline gym log for Android that lets users track workouts, progress, and nutrition.
Health & FitnessFully FOSS
2 ContainersFully FOSS
Details

Related Software

openplate logo

openplate

70
openplate is an open-source, self-hosted food tracker with BYOK AI plate identification and encrypted device sync.
Health & FitnessSelf Hosting SolutionsArtificial Intelligence+1
Single ContainerFully FOSS
Details
Beaver Habit Tracker logo

Beaver Habit Tracker

1.9k
A self-hosted habit tracking app without goals.
Time TrackingPermissive LicenseHealth & Fitness+2
Freemium
Details
wanderer logo

wanderer

4.1k
wanderer is a self-hosted trail database for uploading, organizing, searching, and sharing GPS tracks and routes.
Maps and GPSCopyleft LicenseTrip Planning+2
3 Containers
Details
Cal.diy logo

Cal.diy

50.1k
Cal.diy is a community-driven, open-source scheduling platform for self-hosting personal scheduling infrastructure.
Calendar and ContactsSelf Hosting SolutionsScheduling and Bookings
5 Containers
Details
sprout-track logo

sprout-track

406
A self-hosted Next.js app for tracking baby activities, milestones, and development.
Self Hosting SolutionsHealth & FitnessPersonal Dashboards+1
Single ContainerFully FOSS
Details
Focus Flow logo

Focus Flow

53
FocusFlow is a Pomodoro-based time management system with a Rust backend and a native cross-platform client for tracking sessions, tasks, calendars, and productivity stats.
Task ManagementTime TrackingCalendar and Contacts+1
3 Containers
Details
Cal.com logo

Cal.com

50.1k
Cal.diy is a self-hosted, open-source scheduling platform forked from Cal.com with enterprise features removed.
Scheduling and BookingsCopyleft LicenseFOSS with Issues+3
5 ContainersFOSS with Issues
Details