DuarteSantos8 / openGym

DuarteSantos8 / openGym

A self-hosted gym and body-weight tracker you actually own. Plan your week, run guided workouts, log every set and your body weight — on your phone, synced across your devices, behind your own passkey login. 这是一个真正属于你自己的自托管健身与体重追踪器。你可以规划每周计划、进行引导式训练、记录每一组动作和体重——所有数据都在你的手机上,跨设备同步,并由你自己的通行密钥(Passkey)保护。

Website · Live demo · Android APK · Self-hosting guide · Roadmap · Changelog 网站 · 在线演示 · Android APK · 自托管指南 · 开发路线图 · 更新日志

Home · today’s workout and weight Guided workout · demos and sets Stats · heatmap, charts and PRs 主页 · 今日训练与体重 引导式训练 · 动作演示与组数 统计数据 · 热力图、图表与个人纪录 (PR)

Why openGym Most workout apps keep your data on their servers, push you towards a subscription, or vanish when the company does. openGym runs on your own box, keeps your data in a folder you control, and is yours to fork. It still behaves like a modern app: installable on the home screen, passkey sign-in, works offline, syncs between your phone and your laptop. No account on someone else’s server, no subscription, no ads, no telemetry. One docker compose up and it’s running. The in-browser demo is the real app with example data, if you want to try it before installing anything. 为什么选择 openGym? 大多数健身应用将你的数据保存在它们的服务器上,诱导你订阅,或者在公司倒闭时随之消失。openGym 运行在你自己的设备上,将数据保存在你可控的文件夹中,并且你可以自由分叉(fork)。它依然具备现代应用的所有特性:可安装到主屏幕、支持通行密钥登录、支持离线工作、在手机和笔记本电脑间同步。无需注册他人服务器的账号,没有订阅费,没有广告,没有遥测数据。只需运行 docker compose up 即可启动。如果你想在安装前体验,浏览器内的演示版就是带有示例数据的真实应用。

Features Planning A routine per weekday over a library of 1,324 exercises with animated demos, searchable and browsable by muscle on a body map. Filter by the equipment you own. Four starter plans (Push/Pull/Legs, Upper/Lower, Full Body, 5×5) that load as ordinary, editable routines. Move a session to another day without touching the weekly plan. The week starts on Monday or Sunday, your choice. Supersets, warm-up sets, drop sets and rest-pause, timed exercises (planks, hangs, carries), cardio by time and speed, rest time per exercise, planned deloads. Your own exercises, with your own photo, GIF or short video. Location data is stripped on the device before upload. 功能 规划 每周每天的例程库包含 1,324 个带有动画演示的动作,可通过身体部位图进行搜索和浏览。可根据你拥有的器械进行筛选。内置四种入门计划(推/拉/腿、上肢/下肢、全身、5×5),可作为常规的可编辑例程加载。无需修改周计划即可将某次训练移动到其他日期。每周从周一或周日开始,由你决定。支持超级组、热身组、递减组、休息暂停训练、计时训练(平板支撑、悬挂、负重行走)、按时间和速度记录的有氧运动、单项动作休息时间、计划减载。你可以添加自己的动作,并配上自己的照片、GIF 或短视频。位置数据在上传前会在设备端被剔除。

Training Guided sessions: today’s workout starts itself, weights are pre-filled from last time, a rest timer runs between sets, PRs are detected as you go. On a rest day it tells you when the next session is. A quiet workout screen: one menu per exercise, the set number as the set’s own menu, card or list view. Switches in Settings bring the old button rows back if you liked them. Optional effort column as RIR or RPE, colour-coded, with a plain-language line per level. Plate math for barbell, EZ bar, trap bar and Smith machine, worked out from the plates you own. Bodyweight exercises know they carry no load: log reps, add a dip belt if you use one. Per-side reps for lunges and single-arm work, the screen stays awake while you train, and a rest-timer alert can flash the screen for loud gyms. 训练 引导式训练:今日训练自动开始,重量预填上次记录,组间自动运行休息计时器,实时检测个人纪录 (PR)。在休息日,它会提示你下一次训练的时间。简洁的训练界面:每个动作一个菜单,组数即为该组的菜单,支持卡片或列表视图。设置中提供开关,如果你喜欢旧版按钮行,可以随时切换回来。可选的 RIR 或 RPE 强度列,带有颜色编码和通俗易懂的等级说明。针对杠铃、曲柄杠铃、六角杠铃和史密斯机的杠铃片计算功能,根据你拥有的杠铃片自动计算。自重训练会自动识别为无负重:记录次数,如果使用负重腰带可额外添加。支持单侧动作(如箭步蹲、单臂动作)的次数记录,训练时屏幕保持常亮,休息计时器提醒可在嘈杂的健身房通过屏幕闪烁进行提示。

Progress Progression rules per routine or per exercise: linear, Greyskull LP, double progression through a visible rep range, or adding time. Each target explains why it is that number; missed reps never add load, stalls trigger a deload. Estimated 1RM per exercise with its own curve, Structural Balance ratios (Poliquin, Thibaudeau, ATG), a year-long activity heatmap. A muscle map in three modes: where your volume went, what is still recovering, and what has gone untrained. Body-weight chart against a goal line. Edit any saved workout after the fact, log one you did on paper, or move it to the right date. Records are re-read from the corrected history. 进度 针对例程或动作的进阶规则:线性递增、Greyskull LP、通过可见次数范围的双重递增,或增加时间。每个目标都会解释其数值的由来;未完成的次数不会增加负重,停滞时会触发减载。提供每个动作的预估 1RM 曲线、结构平衡比率(Poliquin, Thibaudeau, ATG)以及全年的活动热力图。肌肉地图支持三种模式:训练量分布、恢复状态、以及未训练部位。体重图表包含目标线。支持事后编辑任何已保存的训练、补录纸质记录,或将其移动到正确的日期。记录会根据修正后的历史数据重新读取。

Accounts and data Passkeys (Face ID, Touch ID, fingerprint) with per-profile data synced across devices. Password sign-in can be switched on per instance; new devices pair with a one-time code or QR. Two devices editing at once merge instead of overwriting each other (see sync). Import from FitNotes, Strong, Hevy (CSV or API key) and Apple Health weight exports. Export everything as one JSON file whenever you like. Share a plan as a small file or print it as a PDF. Optional admin dashboard with invite-only signup and an activity log. 17 languages, including right-to-left Arabic. Exercise names and instructions are translated for most of them. 账号与数据 支持通行密钥(Face ID、Touch ID、指纹),各配置文件的个人数据可跨设备同步。可按实例开启密码登录;新设备通过一次性代码或二维码配对。两台设备同时编辑时会自动合并而非覆盖(详见同步说明)。支持从 FitNotes、Strong、Hevy(CSV 或 API 密钥)以及 Apple Health 体重导出数据进行导入。随时可将所有数据导出为单个 JSON 文件。可将计划分享为小文件或打印为 PDF。可选的管理仪表板,支持邀请制注册和活动日志。支持 17 种语言,包括从右向左书写的阿拉伯语。大多数语言已翻译动作名称和说明。

Optional extras, off by default An AI coach that drafts a week of routines and later suggests changes based on what you logged. You approve every change. It runs on your server with your own provider key (Anthropic, OpenAI, Gemini or any OpenAI-compatible endpoint, Ollama included). An MCP server so an assistant like Claude Desktop can answer questions about your training history. Read-only and local; not part of the Docker build. The full list of what changed release by release is in the changelog. 可选扩展功能(默认关闭) AI 教练:可起草每周例程,并根据你的记录建议调整。每一项更改都需你批准。它运行在你自己的服务器上,使用你自己的提供商密钥(Anthropic、OpenAI、Gemini 或任何兼容 OpenAI 的端点,包括 Ollama)。MCP 服务器:让 Claude Desktop 等助手能够回答关于你训练历史的问题。仅限只读且本地运行;不包含在 Docker 构建中。各版本的详细更新列表请查看更新日志。

Quick start You need Docker with Compose. 快速开始 你需要安装 Docker 和 Compose。

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

Open http://localhost:8080, tap Create profile, and you’re in. The first start downloads the exercise media (about 140 MB) once. To reach it from your phone with passkeys you need HTTPS on a domain; that’s a two-line change in .env. The self-hosting guide walks through Cloudflare Tunnel, Caddy, Traefik and nginx, and there are separate guides for HTTPS on a LAN and Kubernetes. 打开 http://localhost:8080,点击“创建配置文件”即可进入。首次启动会下载动作媒体文件(约 140 MB)。若要通过手机使用通行密钥访问,你需要为域名配置 HTTPS;只需在 .env 中修改两行即可。自托管指南涵盖了 Cloudflare Tunnel、Caddy、Traefik 和 nginx 的配置,并提供了局域网 HTTPS 和 Kubernetes 的独立指南。

Note: Images are published from the same tag to registry.gitlab.com/duartesantos8/opengym/{api,web} (what docker-compose.yml pulls) and ghcr.io/duartesantos8/opengym-{api,web}. Swap the image: lines if you prefer GHCR, or run docker compose up -d —build to build locally. Either way you don’t need Node on the host. 注意:镜像发布在 registry.gitlab.com/duartesantos8/opengym/{api,web}(docker-compose.yml 默认拉取地址)和 ghcr.io/duartesantos8/opengym-{api,web}。如果你更喜欢 GHCR,请替换 image: 行,或者运行 docker compose up -d --build 进行本地构建。无论哪种方式,你都不需要在宿主机上安装 Node。