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](https://img.shields.io/badge/license-AGPL--3.0-a3e635?style=flat-square)](LICENSE) ![Self-hosted](https://img.shields.io/badge/self--hosted-%F0%9F%8F%A0-60a5fa?style=flat-square) ![PWA](https://img.shields.io/badge/PWA-installable-a78bfa?style=flat-square) ![React](https://img.shields.io/badge/React-19-38bdf8?style=flat-square&logo=react&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-compose-2496ED?style=flat-square&logo=docker&logoColor=white) ![No tracking](https://img.shields.io/badge/telemetry-none-f472b6?style=flat-square)
[![Pipeline](https://gitlab.com/DuarteSantos8/opengym/badges/main/pipeline.svg?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/pipelines) ![Last commit](https://img.shields.io/gitlab/last-commit/DuarteSantos8%2Fopengym?style=flat-square) [![Stars](https://img.shields.io/gitlab/stars/DuarteSantos8%2Fopengym?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/starrers) [![Issues](https://img.shields.io/gitlab/issues/open/DuarteSantos8%2Fopengym?style=flat-square)](https://gitlab.com/DuarteSantos8/opengym/-/issues) [![Discord](https://img.shields.io/badge/Discord-join-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/e62jY6fwVb)

Home
Home β€” today's workout & weight
Workout
Guided workout β€” animated demos & sets
Stats
Stats β€” heatmap, charts & PRs
### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) Β· [πŸ“¦ Source on GitLab](https://gitlab.com/DuarteSantos8/opengym) 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 - βš–οΈ **Body-weight tracking** β€” interactive chart with a goal line you set, gains/losses colored by whether they move toward it - πŸ‹οΈ **Weekly plan** β€” a routine per weekday, over a library of **1,324 exercises** (searchable, with animated demos) - πŸ—“οΈ **Reschedule any day** β€” sick, missed a session, or fewer gym days this week? Move a workout to another day without touching your weekly plan - ▢️ **Guided workouts** β€” it knows what day it is and starts today's session; asks your body weight first, pre-fills your weights from last time, rest timer, PR detection, per-exercise weight tracking - β˜€οΈ **The screen stays awake while you train** β€” no unlocking the phone and finding your place again between every set. On for as long as a workout is running, released the moment you finish it, and switchable off in Settings - πŸ”— **Supersets** β€” plan them into a routine or pair two exercises *mid-session* with β€œmake superset with previous/next”, then work through the group back-to-back with a single rest at the end of each round. Unpair at any time; a group of one dissolves itself - πŸ”₯ **Warm-up sets** β€” mark the ramp-up rows as warm-ups and they stay out of the numbers that should not see them: no effect on your estimated 1RM, your progression, or the fatigue map, while still being there in the session where you need them. A weight change cascades down the rows that share their phase, not across the divide - βž– **Change your mind mid-session** β€” add an exercise you decided to do, or remove one you didn't, without ending the workout. Removing a member of a superset asks which one - ⏱️ **Timed exercises** β€” planks, hangs, wall sits and loaded carries are logged by time, not reps, with a work timer that counts the set itself (separate from the rest timer) and logs the time you actually held. They can carry weight too - πŸ“ˆ **Progression that follows a rule** β€” pick one per routine, override it per exercise: linear, **Greyskull LP** (AMRAP top set, double jumps, 10 % resets), double progression through a rep range, or adding time. Your weights are already right when the session opens, and every target says *why* it's that number. Missed reps never advance the load, stalls trigger a deload, and bodyweight exercises progress in reps instead - πŸ’ͺ **Estimated 1RM** β€” per exercise, from your best eligible set (it names which one), with its own progress curve and a calculator for sets you haven't done. Won't guess above 12 reps - 🎯 **Effort per set, in your scale** β€” an optional third column rating how hard a set was, as **RIR** (reps left in the tank) or **RPE** (the same judgement on a 10-point scale). Off by default; each set keeps the scale it was logged with, and nothing else reads the value β€” your progression and 1RM are unaffected - πŸ’ͺ **Bodyweight exercises, logged as bodyweight** β€” push-ups, pull-ups, dips and 300-odd others arrive knowing they carry no load, so there's no weight column and no working-weight prompt: one stepper, log the reps. Add a dip belt and it reads as an addition, and progression goes back to following the weight. Without one, reps climb β€” and past a ceiling you set, a set is added instead of a rep, up to the point where the honest advice is load or a harder variation - ↔️ **Reps per side** β€” for lunges, single-arm rows and the rest. You log the total, the app shows the split ("8 per side"), and the target steps in twos so it never lands on a number one side can't have - 🎲 **Freestyle sessions** β€” train without a plan and pick exercises as you go. Each one arrives prefilled from the last time you did it β€” same sets, same reps and weight by position β€” so an unplanned session doesn't start by asking you to retype last week - πŸƒ **Cardio** β€” log time + speed, not just weight Γ— reps - πŸ“€ **Share a plan** β€” send someone your routines and week schedule as a small file (no workouts, no weigh-ins), or print it as a clean PDF. Importing merges, so their plan is never overwritten - πŸ”§ **Filter by equipment** β€” narrow the library to what you actually own; the options adapt to what you've picked, so every combination on screen has results behind it - ✨ **Your own exercises** β€” a name and a body part is enough; they behave like built-in ones everywhere, with an optional description instead of an animation - 🟩 **Activity heatmap** β€” a GitHub-style year view, shaded by time spent training - πŸ’ͺ **Muscle map, three ways** β€” a front-and-back body diagram you can read as **Balance** (where the volume went, over a week, a month or all time β€” naming the muscles you *haven't* trained), **Fatigue** (what is still recovering, weighted by how close each set was to your maximum, decaying smoothly rather than expiring at a window edge) or **Strength** (how long since you trained each muscle, and behind every one the exercises that built it with their estimated 1RM). It previews what a routine hits while you build it, and shows what you just trained when you finish. Male or female figure, your pick - πŸ”” **Push notifications** β€” rest-timer alerts even with the app closed, plus an optional reminder on days you have a workout planned but haven't logged one. Opt in per profile; keys are generated on first run, nothing to configure - πŸ”‘ **Passkeys, not passwords** β€” Face ID / Touch ID / fingerprint login; each profile keeps its own data, synced across devices. Sign-ins last 90 days by default (configurable), and β€œsign out everywhere” in Settings ends every session on every device at once - πŸ› οΈ **Admin dashboard** (optional) β€” for whoever runs the instance: who's training right now, per-user history, disable accounts, invite-only signup, and an **activity log** of sign-ins, failed attempts and admin actions. Off by default, so a fresh instance stays open with no admin - 🎨 **Designed, not assembled** β€” light/dark themes and 8 accent colors saved to your profile, over a hand-drawn icon set instead of emoji, so it looks the same on every phone - 🌍 **12 languages** β€” full UI translation (EN, DE, ES, FR, IT, PT, PL, TR, RU, ZH, KO, HI); exercise instructions localized in 10 of them, loaded on demand so the app stays fast - πŸ“₯ **Bring your history with you** β€” import from **FitNotes** (Android and iOS), **Strong** and **Hevy**, or body weight straight out of an **Apple Health** export. Exercise names are matched against the library and anything unrecognised becomes one of your own exercises, so nothing in the file is dropped - πŸ“¦ **Yours to keep** β€” one-tap JSON export/import, guest mode, **no telemetry** - πŸ€– **Ask an AI about your training** (optional) β€” an [MCP server](mcp/README.md) lets a client like Claude Desktop or Cursor read your history in your own words: *"what did I bench last week?"*. Read-only, spawned locally by the client, nothing leaves your box. Not in the Docker build β€” if you don't use an AI assistant, it isn't there - πŸ“± **Standalone Android app** β€” the whole tracker as a sideloadable APK: no account, no server, data on the phone, native workout reminders ([download](https://opengym.duarte-santos.ch)) ## Quick start (self-host) You need [Docker](https://docs.docker.com/get-docker/) with Compose. ```bash git clone https://gitlab.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 comes from > [hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset), whose > metadata and instruction text are MIT β€” but whose images and animations are > **Β© [Gym visual](https://gymvisual.com/)**, used under that dataset's terms and *not* under > openGym's AGPL. openGym ships none of it: your instance downloads it from upstream. Reusing it > yourself, commercially or not, needs your own licence from Gym visual β€” see > [NOTICE.md](NOTICE.md). Prefer building the images yourself instead of pulling from GitLab's 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](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. - **Android:** [**download the APK**](https://opengym.duarte-santos.ch) and sideload it β€” openGym is deliberately not on the Play Store. Or build it yourself: **[docs/MOBILE.md](docs/MOBILE.md)**. - **iPhone:** Apple doesn't allow installing apps outside the App Store, so there is no iOS 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](docs/MOBILE.md)**. ## How it works ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Your phone │──HTTPS─▢│ web (nginx) β”‚ β”‚ / laptop β”‚ β”‚ β”œβ”€ serves the built app β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ └─ proxies /api ──────────┐│ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ api (Node + WebAuthn) β”‚ β”‚ └─ ./data (JSON files) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` - **frontend/** β€” React + Vite (React Router + Zustand), built to static files **inside Docker** - **api/** β€” Node with no framework, two dependencies (`@simplewebauthn/server` for passkeys, `web-push` for notifications), storing everything as plain JSON files under `./data` - **web/** β€” a multi-stage image that builds the frontend and serves it with nginx, proxying `/api` to the backend so it's all on **one origin** (passkeys require this) ## 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` | 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 Rough, community-driven β€” ideas and PRs welcome: - [x] Standalone mobile app β€” Android APK to sideload ([download](https://opengym.duarte-santos.ch)); on iOS as a self-hosted PWA (no store listings planned) - [x] Automatic progression programs (linear, Greyskull LP, double progression) with stalls and deloads - [x] Estimated 1RM per exercise - [ ] Percentage / training-max programming (5/3/1-style) on top of the progression engine - [ ] More starter plans (upper/lower, full-body, 5Γ—5) - [x] Importers from FitNotes / Strong / Hevy (including the RPE they record), and body weight from Apple Health - [x] Effort per set β€” RIR or RPE, whichever scale you think in - [ ] Body measurements (waist, arms…) alongside weight - [ ] Per-exercise notes & plate calculator - [ ] Exercise instructions in German & Portuguese (UI is translated; upstream dataset doesn't ship these yet) ## Tech React 19 + Vite (React Router, Zustand) Β· Node (no framework) Β· nginx Β· Docker Compose Β· WebAuthn Β· exercise data from [hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset) (MIT metadata and instructions; media Β© Gym visual β€” see [License](#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 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](mcp/README.md). Opt-in, not in the Docker build. ## Community - **[Discord](https://discord.gg/e62jY6fwVb)** β€” release announcements, self-hosting help and the back-and-forth that would be a slow issue thread. Quickest way to get an answer. - **[Issues](https://gitlab.com/DuarteSantos8/opengym/-/issues)** β€” bugs, questions, self-hosting help and ideas. There are no Discussions here, so it all lives in one tracker: label a question `question` and an idea `idea`, and it gets treated as one rather than as agreed-on work. Use an issue over the Discord for anything the next person should be able to find by searching. - **Login trouble?** Most of it is an `RP_ID`/`ORIGIN` mismatch β€” check [docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) before opening an issue. - **Merge requests** β€” [open one on GitLab](https://gitlab.com/DuarteSantos8/opengym/-/merge_requests); see [CONTRIBUTING.md](CONTRIBUTING.md). > **On the GitHub repo:** `github.com/DuarteSantos8/openGym` is offline because the account was > suspended. **GitLab is the home of the project** β€” same history, same tags, same releases, and > the CI that builds the images and the APK runs there. (gitea.com/DuarteSantos/openGym was the > first stopgap and is now only a mirror.) Old GitHub issue and PR numbers in > [CHANGELOG.md](CHANGELOG.md) are kept as plain references; they don't map onto GitLab's > numbering. ## Contributing Issues and PRs welcome β€” see [CONTRIBUTING.md](CONTRIBUTING.md). Good first issues: more starter plans, exercise-data languages, import from other trackers. **A ⭐ helps more people find it.** openGym is free and stays free: AGPL, no subscription, no paid tier, nothing held back for sponsors. If it replaced a paid tracker for you and you want to chip in, the Sponsor button at the top of the page is there β€” a star, a bug report or a merge request is worth just as much. Buy Me A Coffee ## License **openGym's own code** is [GNU AGPL v3.0](LICENSE) β€” free and open source. You can self-host, use, modify and share it; if you run a modified version as a network service, you must offer that version's source under the same license. Nobody can turn openGym into a closed, proprietary product. **Third-party content is not, and openGym cannot sublicense it.** The exercise metadata and instruction text come from [hasaneyldrm/exercises-dataset](https://github.com/hasaneyldrm/exercises-dataset) under the **MIT** license. The exercise images and animations are **Β© [Gym visual](https://gymvisual.com/)** and are used under that dataset's terms β€” openGym does not redistribute them (your instance fetches them at first run) and does not relicense them under the AGPL. To reuse that media yourself, get your own licence from Gym visual ([terms](https://gymvisual.com/content/3-terms-and-conditions-of-use)). Full third-party notices, including the body-diagram geometry: **[NOTICE.md](NOTICE.md)**.