openGym README

The project's README from github.com/arvids-unavailable/openGym. As one markdown file: README.md.

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
GitHub last commit GitHub stars GitHub issues


Home
Home — today's workout & weight
Workout
Guided workout — animated demos & sets
Stats
Stats — heatmap, charts & PRs

🌐 opengym.duarte-santos.ch · ▶ Try the live demo

No signup, nothing to install — it runs entirely in your browser on example data.
There's no server behind the demo, so passkey sign-in, sync across devices and the admin dashboard only exist in a self-hosted instance.

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. Prefer building the images yourself instead of pulling from ghcr.io? 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.

How it works

┌─────────────┐        ┌──────────────────────────────┐
│  Your phone │──HTTPS─▶│  web  (nginx)                │
│  / laptop   │        │   ├─ serves the built app    │
└─────────────┘        │   └─ proxies /api ──────────┐│
                       └──────────────────────────────┘│
                                                        ▼
                                        ┌──────────────────────────┐
                                        │  api  (Node + WebAuthn)  │
                                        │   └─ ./data (JSON files) │
                                        └──────────────────────────┘

Your data

Lives in ./data on your host: db.json (profiles + public passkeys), state-<user>.json (each user's plan, workouts, body weight, settings), 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
RP_NAME Name shown in the passkey prompt openGym
ADMIN_UIDS User ids that get the admin dashboard (comma-separated) (none)
INVITE_ONLY Require an invite code to create a profile (off)

Push notification keys are generated on first run and saved to ./data/vapid.json — nothing to set.

Roadmap

Rough, community-driven — ideas and PRs welcome:

Tech

React 19 + Vite (React Router, Zustand) · Node (no framework) · nginx · Docker Compose · WebAuthn · exercise data from hasaneyldrm/exercises-dataset. 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.

Community

Contributing

Issues and PRs welcome — see 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 PR is worth just as much.

License

GNU AGPL v3.0 — 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.

Exercise images/GIFs are fetched from the upstream dataset and keep their own terms — see NOTICE.md.

openGym (arvids-unavailable/openGym)

Searching Database…

7.3K ·GitHub
这是什么?一个真正属于你自己的自托管健身和体重追踪工具:每周计划、引导式训练、完整的组数和重量记录,并通过你自己的 passkey 登录实现跨设备同步——不需要第三方账号,没有订阅,也没有广告。
它是手机应用,还是需要我自己部署在服务器上的东西?两者都是,出自同一套代码:可以是自托管的网页应用,添加到主屏幕后作为 PWA 使用(支持同步和多个档案);也可以是完全没有服务器的独立 Android APK。它刻意没有上架应用商店——在 iPhone 上通过 Safari 使用自托管的 PWA 即可。
我怎么把它跑起来?安装带 Compose 的 Docker,然后运行 'docker compose up'——前端在容器内构建,所以本地不需要其他任何东西。首次启动会一次性下载约 140 MB 的训练动作媒体文件,之后你只需创建一个档案。
用手机通过互联网访问它,有什么麻烦的地方吗?Passkey 要求所有内容都在同一个 HTTPS 域名下,所以远程访问意味着要给它绑定一个真实的域名——只需在 .env 里改两行的 RPID/ORIGIN。社区里大多数登录问题最后都出在这个不匹配上。
我的数据存在哪里?存在你自己主机的 ./data 文件夹里,就是普通的 JSON 文件——备份这个文件夹就等于备份了一切。没有任何遥测数据收集,passkey 的私钥也绝不会离开你手机的安全芯片或你的密码管理器。
引导式训练是什么样的?它知道今天是星期几,会直接打开今天的训练课,先询问你的体重,根据上次的数据预填你的重量,并运行带个人纪录检测的休息计时器。训练时屏幕保持常亮,即使应用已关闭,推送通知也能发出休息提醒。
它是怎么决定我下次该举多大重量的?每个训练计划遵循你自己选择的进阶规则——线性进阶、Greyskull LP、在次数区间内的双重进阶,或增加时长——并且可以按单个动作覆盖。没完成的次数永远不会推进重量,遇到停滞会触发减量,自重动作则先增加次数,再增加组数。
我能把其他追踪应用里的历史记录带过来吗?可以——导入器支持 FitNotes、Strong 和 Hevy,另外还能从 Apple Health 导出文件导入体重数据。名称会与动作库进行匹配,任何识别不了的动作都会变成你自己的自定义动作,所以不会丢失任何数据;一键导出 JSON 就能把所有数据都取出来。
在自托管之前,我能先试用一下吗?可以——opengym.duarte-santos.ch 上的在线演示完全在你的浏览器里运行,使用的是示例数据,无需注册。它背后没有服务器,所以 passkey 登录、跨设备同步和管理面板只存在于自托管实例中。
Size
124.4 MB
Stars
7.3K
Updated
CommitAug 03
Age
2mo
Commits · 90 Days