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
Что это такое?Свой (self-hosted) трекер тренировок в зале и с весом тела, которым вы действительно владеете: недельные планы, тренировки с подсказками, полный лог подходов и весов, синхронизация между устройствами через вход по passkey — без стороннего аккаунта, без подписки, без рекламы.
Это приложение для телефона или что-то, что я размещаю на своём сервере?И то и другое, из одной кодовой базы: самостоятельное веб-приложение (self-hosted), которое вы устанавливаете на главный экран как PWA (с синхронизацией и профилями), либо отдельный Android APK вообще без сервера. В App Store версии намеренно нет — на iPhone вы пользуетесь self-hosted PWA из Safari.
Как его запустить?Установите Docker с Compose и запустите 'docker compose up' — фронтенд собирается внутри контейнера, так что локально больше ничего не нужно. При первом запуске один раз скачивается около 140 МБ медиафайлов упражнений, затем просто создаёте профиль.
Есть ли сложности с доступом с телефона через интернет?Passkeys требуют, чтобы всё работало на одном HTTPS-домене, поэтому удалённый доступ означает выделение реального домена — это изменение двух строк RPID/ORIGIN в .env. Большинство проблем со входом в сообществе оказываются именно этим несоответствием.
Где хранятся мои данные?В папке ./data на вашем own-хосте в виде обычных JSON-файлов — сделайте резервную копию этой папки, и всё сохранено. Никакой телеметрии нет, а приватные ключи passkey никогда не покидают защищённое оборудование телефона или ваш менеджер паролей.
Что происходит во время тренировки с подсказками?Приложение знает, какой сегодня день, и открывает сегодняшнюю тренировку, сначала спрашивает ваш вес тела, подставляет веса с прошлого раза и запускает таймер отдыха с определением личных рекордов. Экран не гаснет во время тренировки, а push-уведомления могут напоминать об отдыхе даже с закрытым приложением.
Как программа решает, какой вес мне поднимать дальше?Каждая программа следует выбранному вами правилу прогрессии — линейная, Greyskull LP, двойная прогрессия по диапазону повторений или добавление времени — и его можно переопределить для отдельного упражнения. Неповторённые подходы никогда не повышают вес, застой вызывает разгрузку (deload), а упражнения с собственным весом прогрессируют сначала в повторениях, затем в дополнительных подходах.
Могу ли я перенести свою историю из других приложений-трекеров?Да — есть импорт из FitNotes, Strong и Hevy, плюс вес тела из экспорта Apple Health. Названия сопоставляются с библиотекой упражнений, и всё нераспознанное становится вашим собственным упражнением, так что ничего не теряется; экспорт в JSON в одно касание выведет всё обратно.
Можно ли попробовать до развёртывания у себя?Да — живая демо-версия на opengym.duarte-santos.ch работает целиком в браузере на примерных данных, без регистрации. Сервера за ней нет, поэтому вход по passkey, синхронизация между устройствами и админ-панель существуют только в self-hosted-инстансе.
Size
124.4 MB
Stars
7.3K
Updated
CommitAug 03
Age
2mo
Commits · 90 Days