DuarteSantos8/openGym

▲ 111 stars today★ 1,211⑂ 290

Self-hosted gym & body-weight tracker — plan routines, log workouts (supersets, warm-ups, cardio), see which muscles are trained, fatigued or detrained, import from FitNotes/Strong/Hevy

About DuarteSantos8/openGym

DuarteSantos8/openGym is an open-source project on GitHub, mainly written in JavaScript. Self-hosted gym & body-weight tracker — plan routines, log workouts (supersets, warm-ups, cardio), see which muscles are trained, fatigued or detrained It currently holds 1,211 stars and 290 forks with 127 open issues, and was last pushed on 2026-09-20 (repository created 2026-07-18).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #38 with 111 new stars today.

GitHub Repository Details

Repository DuarteSantos8/openGym · default branch main · size 15476 KB · watchers 6 · source: GitHub REST API and repository README

README

https://github.com/DuarteSantos8/openGym/blob/HEAD/openGym


A self-hosted gym & body-weight tracker you actually own.

Plan your week, run guided workouts, track every set and your body weight over time — on your phone, synced across devices, behind your own passkey login. No account on someone else's server, no subscription, no ads. Just docker compose up.


License: AGPL v3 Self-hosted PWA React Docker No tracking
Pipeline Coverage Release Last commit GitHub stars Issues Tests Mirror Discord Buy Me A Coffee


https://github.com/DuarteSantos8/openGym/blob/HEAD/Home
Home — today's workout & weight
https://github.com/DuarteSantos8/openGym/blob/HEAD/Workout
Guided workout — animated demos & sets
https://github.com/DuarteSantos8/openGym/blob/HEAD/Stats
Stats — heatmap, charts & PRs

🌐 opengym.duarte-santos.ch · 📦 Source on GitHub · 🦊 GitLab mirror

Screenshots, docs and the APK download live on the site.
Want to poke at it first? The in-browser demo is the real app with example data — no account, nothing to install.

Why

Most workout apps lock your data behind a login on their servers, nag you to upgrade, or disappear when the startup does. openGym is the opposite: it runs on your box, your data stays in a folder you control, and it's yours to fork. It still feels modern — installable as a home-screen app, passkey sign-in, offline support, sync across your phone and laptop.

Features

Quick start (self-host)

You need Docker with Compose.

git clone https://github.com/DuarteSantos8/openGym
cd openGym
cp .env.example .env
docker compose pull   # grab prebuilt images (amd64 + arm64) — skip to build from source instead
docker compose up -d

Open http://localhost:8080, tap Create profile, and you're in. First launch downloads the exercise media (~140 MB) once.

About that media: it reaches openGym through
hasaneyldrm/exercises-dataset, which
redistributes ExerciseDB v1 — its metadata and instruction text are
MIT, but the images and animations are third-party content under neither that MIT license nor
openGym's AGPL, and their ownership is currently disputed between Gym visual and ExerciseDB.
openGym ships none of it: your instance downloads it from upstream. Reusing it yourself,
commercially or not, means clearing it with the rights holder — see NOTICE.md.
The prebuilt images are published twice, from the same tag: registry.gitlab.com/duartesantos8/opengym/{api,web} (what docker-compose.yml pulls) and ghcr.io/duartesantos8/opengym-{api,web} on GitHub — swap the image: lines if you prefer GHCR. Prefer building the images yourself instead of pulling from a registry? Drop the pull step and run docker compose up -d --build — you don't need Node or a build step locally either way.
Want it reachable from your phone over the internet with passkeys? You'll need an HTTPS
domain — a two-line change in .env. See docs/SELF_HOSTING.md.

Mobile app (no server at all)

The same codebase also builds a standalone mobile app (Capacitor): no account, no sync, no backend — everything stays on the phone, with native workout-day reminders and share-sheet backups. Self-hosting gets you multi-device sync and profiles for friends & family; the mobile app is the install-and-done flavor.

GitLab's package registry or the GitHub release, where every build sits next to its .sha256 — and sideload it; openGym is deliberately not on the Play Store. Or build it yourself: docs/MOBILE.md. download. Self-host and add it to your home screen from Safari (it's a full PWA), or build the native app onto your own device from Xcode — see docs/MOBILE.md.

How it works

┌─────────────┐        ┌──────────────────────────────┐
│  Your phone │──HTTPS─▶│  web  (nginx)                │
│  / laptop   │        │   ├─ serves the built app    │
└─────────────┘        │   └─ proxies /api ──────────┐│
                       └──────────────────────────────┘│
                                                        ▼
                                        ┌──────────────────────────┐
                                        │  api  (Node + WebAuthn)  │
                                        │   └─ ./data (JSON files) │
                                        └──────────────────────────┘
The full HTTP API is documented as an OpenAPI spec in api/openapi.yaml — browsable at opengym.duarte-santos.ch/api.html.

Your data

Lives in ./data on your host: db.json (profiles + public passkeys), state-.json (each user's plan, workouts, body weight, settings), audit.log (the admin activity log — sign-ins and admin actions, no IP addresses unless you ask for them) and secret (the session-cookie key). Back up ./data and you've backed up everything. Passkey private keys never touch the server — they stay in your phone's secure hardware / your password manager.

Configuration

All via .env (see .env.example):

| Variable | What it is | Default | |---------------|------------------------------------------------------|-------------------------| | RP_ID | Hostname passkeys are bound to | localhost | | ORIGIN | Full URL the app is served from | http://localhost:8080 | | WEB_PORT | Host port for the web UI | 8080 | | NGINX_PORT | Port the web container listens on, inside the container | 80 | | BACKEND | Name of the API service that /api is proxied to — change it if yours isn't called api | api | | PORT | Port the API listens on; the web container proxies to the same value | 3000 | | RP_NAME | Name shown in the passkey prompt | openGym | | SESSION_DAYS| How long a sign-in lasts, in days | 90 | | ADMIN_UIDS | User ids that get the admin dashboard (comma-separated) | (none) | | INVITE_ONLY | Require an invite code to create a profile | (off) | | ALLOW_GUEST | Offer "Continue without account" — set 0 to require a profile | (on) | | AUDIT_LOG | Record sign-ins and admin actions — set 0 to record nothing | (on) | | AUDIT_MAX | Events kept in the activity log; 0 for no limit | 5000 | | AUDIT_DAYS | Days kept in the activity log; 0 to keep until AUDIT_MAX | 90 | | AUDIT_IP | Record the caller's address: off, net (network only) or full | off | | VAPID_SUBJECT | Contact URL sent with push notifications | your ORIGIN | | API_TARGET | Which API image to build: default (no AI runtime — API-key providers still work) or coach (adds the Claude Agent SDK + Codex CLI) | default | | COACH_DISABLED | Set to 1 to force the AI Coach off instance-wide, whatever the admin toggled | (unset) |

Push notification keys are generated on first run and saved to ./data/vapid.json — nothing to set. DATA_DIR is pinned to /data by docker-compose.yml and mapped to ./data on the host; change the host side of that volume, not the variable.

Roadmap

The plan lives in ROADMAP.md, and the GitHub milestones hold the issues. A release every two weeks, each one small and themed: the promised items, editing finished workouts, the session queue, programmes and phases, the progression engine, cardio — then v1.4.0, the foundation: storage moves to a database and search is rebuilt, the one compatibility break — then accounts (password and OIDC login, trainer role, MCP write), the iOS app, the Android and health items, and what all of that unlocks (pictures for custom exercises, catalogue work, skins, social). Ideas and pull requests welcome.

Tech

React 19 + Vite (React Router, Zustand) · Node (no framework) · nginx · Docker Compose · WebAuthn · exercise data from hasaneyldrm/exercises-dataset (MIT metadata and instructions; media © Gym visual — see License). No database server, no cloud dependencies — the frontend builds inside Docker, so self-hosting stays a one-command docker compose up.

The training logic — progression rules, 1RM estimation, how a logged session is read back — lives in pure functions under frontend/src/lib/ with tests next to them: npm test in frontend/. Vitest is a dev dependency; the app itself ships no runtime dependencies beyond React, the router and Zustand.

The optional AI Coach (api/coach/) is built the same way round: a by-name allowlist decides what may leave the server, and a closed-list validator decides what may come back — the model can touch routines and the weekly schedule, nothing else, and every change is applied on the client only after you approve it. The core of it — api/coach/core/ — has no Node dependency, so the phone app runs the same validator the server does. The in-container AI runtimes live in a separate Docker build target; the API-key providers need none. See docs/AI_COACH.md.

The same pure helpers power an optional MCP server (mcp/) that lets an LLM client like Claude Desktop read your data over stdio — see mcp/README.md

GitHub Stars & Activity

1,211Stars
290Forks
127Open issues
JavaScriptLanguage

GitHub Popularity

GitHub stars1,211
Forks290
Open issues127
Primary languageJavaScript
LicenseAGPL-3.0
Stars gained today111
Created2026-07-18
Last pushed2026-09-20

Trending History

Daily boardrank #38 · ▲ 111 stars

Related GitHub Projects

1

affaan-m / ECC

JavaScript★ 265,309⑂ 39,634▲ 805 stars
2

drawdb-io / drawdb

JavaScript★ 39,675⑂ 3,262▲ 36 stars
3

openai / codex-plugin-cc

JavaScript★ 33,479⑂ 2,326▲ 61 stars
4

calesthio / Crucix

JavaScript★ 11,929⑂ 1,850▲ 102 stars
5

laoma2053 / awesome-zhuiju-free

JavaScript★ 9,734⑂ 634▲ 407 stars
6

mnfst / awesome-free-llm-apis

JavaScript★ 8,101⑂ 785▲ 82 stars
7

obra / superpowers

Shell★ 290,158⑂ 25,961▲ 526 stars
8

mattpocock / skills

Shell★ 267,759⑂ 22,588▲ 706 stars

More Trending Repositories