Files
kuentagym/website/docs.html
T
Duarte Santos 533ca2c9a4 Coach: Doku fuer die API-Key-Provider und das Handy, und die Image-Pruefungen in der GitLab-CI
AI_COACH.md trennt die zwei Provider-Familien (HTTPS mit Key auf dem Default-Image,
Runtime im coach-Image), beschreibt Endpunkt-Regeln, Modell-Liste, Keys pro Provider
samt einmaliger Migration von coach.json und die zwei Wege auf dem Handy. CHANGELOG
unter Unreleased, .env.example/README/Website/SELF_HOSTING nachgezogen.

.gitlab-ci.yml bekommt test:api (Suite, generierte Assets, core-loadable) und
build:api-check, das beide api-Targets baut und laufen laesst: das veroeffentlichte
Image hat kein SDK/codex/bwrap, bootet, und konstruiert die HTTPS-Adapter; das
coach-Image meldet ein lauffaehiges SDK, /coach-auth ist coach 700.
2026-08-29 17:18:56 +02:00

241 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>Docs — openGym</title>
<meta name="description" content="How to install openGym on Android, use it on iPhone, self-host it with Docker, import your training history, and keep backups.">
<meta name="theme-color" content="#000000">
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png">
<link rel="icon" type="image/png" sizes="180x180" href="icon-180.png">
<link rel="apple-touch-icon" href="icon-180.png">
<link rel="stylesheet" href="styles.css?v=9">
<script>document.documentElement.className += ' js'</script>
<!-- Umami web analytics for opengym.duarte-santos.ch (self-hosted, cookieless). -->
<script defer src="https://stats.duarte-santos.ch/script.js" data-website-id="db36019e-50f4-453c-9c56-d0588aefe233"></script>
</head>
<body>
<nav><div class="wrap nav-in">
<a class="brand" href="/">
<img src="icon-180.png" alt="" width="24" height="24">
openGym
</a>
<button class="nav-toggle" aria-expanded="false" aria-controls="menu" aria-label="Menu">
<span></span><span></span>
</button>
<div class="nav-links" id="menu">
<a href="/#features">Features</a>
<a href="/#screens">Screenshots</a>
<a href="/#demo">Demo</a>
<a href="docs.html">Docs</a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab <span data-gh="stars"></span></a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a class="cta" href="/#download">Download</a>
</div>
</div></nav>
<!-- TEMPORARY: GitHub account suspended -> repo lives on gitlab.com. Remove this block and
revert the links (+ site.js) to github.com once the account is restored. -->
<div class="notice-wrap"><div class="wrap">
<aside class="notice" role="note">
<div class="notice-tag">Repository moved</div>
<h2>My GitHub account was suspended, and the openGym repo went with it.</h2>
<p><b>github.com/DuarteSantos8/openGym is offline</b> — not by choice. The app is
untouched: the APK, the demo and every self-hosted install work exactly as before. The
code, the releases, the container images and the APK builds now live on GitLab under
the same AGPL-3.0 license, and every repository link here points there.</p>
<div class="actions">
<a class="btn" href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">Open on GitLab</a>
<a class="btn dc-btn" href="https://discord.gg/e62jY6fwVb" rel="noopener">Join the Discord</a>
</div>
</aside>
</div></div>
<main class="wrap prose">
<h1>Docs</h1>
<p class="lead">Everything you need to get openGym running — on a phone, or on your own
server. The deeper, maintainer-level docs live
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs" rel="noopener">in the repository</a>.</p>
<div class="toc">
<a href="#android">Android</a>
<a href="#iphone">iPhone</a>
<a href="#selfhost">Self-hosting</a>
<a href="#mcp">Ask an AI</a>
<a href="#coach">AI Coach</a>
<a href="#import">Import your history</a>
<a href="#backup">Backups</a>
<a href="#build">Build it yourself</a>
<a href="#faq">FAQ</a>
</div>
<h2 id="android">Install on Android</h2>
<ol>
<li>Open <a href="/#download">the download</a> on your phone and tap <b>Download for Android</b>.</li>
<li>Your browser will ask whether it may install apps — allow it. This is standard for
any app installed outside the Play Store (called <i>sideloading</i>), and you can
revoke the permission right after.</li>
<li>Open the downloaded <code>openGym.apk</code>, confirm, done. No account, no setup.</li>
</ol>
<div class="note">openGym is deliberately <b>not</b> on the Play Store — no store account
between you and an open-source app. The APK is signed; updates install over the old
version and keep your data.</div>
<p>Everything is stored on the phone itself. The only things fetched from the internet are
the exercise images and animations (from a CDN, on demand).</p>
<h2 id="iphone">Use on iPhone</h2>
<p>Apple does not allow installing apps outside the App Store, so there is no iOS download —
that's a platform rule, not a choice we made. What works instead:</p>
<ul>
<li><b>Self-host + home screen (recommended):</b> open your own openGym instance in
Safari → <b>Share</b> → <b>Add to Home Screen</b>. You get a full-screen app with its
own icon, passkey sign-in and sync — no expiry, no fees.</li>
<li><b>Build it onto your own iPhone:</b> with a Mac and Xcode, the native app runs on
your device with a free Apple ID (Apple expires the signature after 7 days; re-run
from Xcode to renew). See
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
<li><b>Just looking?</b> Try the <a href="/demo/">in-browser demo</a> — the real app with
example data, no account and nothing to install. The Android app above needs no account either.</li>
</ul>
<h2 id="selfhost">Self-host with Docker</h2>
<p>The self-hosted flavor adds passkey profiles, sync across devices, and (optionally) an
admin dashboard. You need <a href="https://docs.docker.com/get-docker/" rel="noopener">Docker</a>
with Compose:</p>
<pre><code>git clone https://gitlab.com/DuarteSantos8/opengym
cd openGym
cp .env.example .env
docker compose pull # prebuilt images (amd64 + arm64) — skip to build from source
docker compose up -d</code></pre>
<p>Open <code>http://localhost:8080</code>, tap <b>Create profile</b>, and you're in. The
first launch downloads the exercise media (~140&nbsp;MB) once.</p>
<div class="note">Want it reachable from your phone with passkeys? You'll need an HTTPS
domain — a two-line change in <code>.env</code>. The full guide, including reverse-proxy
examples and the invite-only/admin options, is in
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/SELF_HOSTING.md" rel="noopener">docs/SELF_HOSTING.md</a>.</div>
<h3>Settings worth knowing about</h3>
<p>All of these live in <code>.env</code>; the defaults are what you get if you touch nothing.</p>
<table class="cfg">
<tr><td><code>RP_ID</code> / <code>ORIGIN</code></td><td>The domain passkeys are bound to, and the full URL you serve from. The two must agree, or sign-in fails.</td></tr>
<tr><td><code>WEB_PORT</code></td><td>Host port for the web UI. Default <code>8080</code>.</td></tr>
<tr><td><code>INVITE_ONLY</code></td><td>Set <code>1</code> and new profiles need an invite code you generate.</td></tr>
<tr><td><code>ALLOW_GUEST</code></td><td>Set <code>0</code> to remove <b>Continue without account</b>, so everyone using the instance has a profile.</td></tr>
<tr><td><code>ADMIN_UIDS</code></td><td>Which user ids get the admin dashboard.</td></tr>
<tr><td><code>SESSION_DAYS</code></td><td>How long a sign-in lasts. Default <code>90</code>.</td></tr>
<tr><td><code>BACKEND</code> / <code>PORT</code> / <code>NGINX_PORT</code></td><td>For fitting openGym into a stack that already has an <code>api</code> service, or putting it behind your own proxy on another port. The web container renders its nginx config at start-up, so these work on a prebuilt image.</td></tr>
</table>
<h2 id="mcp">Ask an AI about your training</h2>
<p>openGym ships an optional <b>MCP server</b>: a small read-only bridge that lets a client
like Claude Desktop or Cursor answer questions from your actual log — <i>"what did I bench
last week?"</i>, <i>"which muscle have I not trained this month?"</i>, <i>"what's my
estimated 1RM on squats?"</i></p>
<p>It runs on your machine, is spawned by the client, and reads your exported data directly.
Nothing is sent anywhere, and it is <b>not part of the Docker build</b> — if you don't use
an AI assistant, it simply isn't there. Setup is a few lines of client config:
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/mcp/README.md" rel="noopener">mcp/README.md</a>.</p>
<h2 id="coach">Let an AI coach write your plan</h2>
<p>Separate from the read-only bridge above, openGym has an optional <b>AI Coach</b> that can
design a training plan and, later, review what you actually logged and propose changes to
it. Answer a few questions — goal, days a week, session length, equipment, anything to work
around — and it builds a week of routines. Every suggestion carries the evidence behind it,
you approve or reject each one, and you can undo the last set of changes.</p>
<p>It is <b>off by default</b>. An admin turns it on in <b>Settings → Admin → AI Coach</b>,
picks a provider and pastes a key: <b>Anthropic</b>, <b>OpenAI</b>, <b>Google Gemini</b>, or
any <b>OpenAI-compatible endpoint</b> — Ollama or LM Studio on your own LAN, vLLM,
OpenRouter. These speak plain HTTPS and need nothing beyond the default image. Only the
Claude Agent SDK and the Codex CLI need the bigger build:</p>
<pre><code>API_TARGET=coach docker compose up -d --build api</code></pre>
<p>On the phone app, <b>Settings → AI Coach</b> offers two ways in: pair the phone with your
self-hosted instance and the Coach runs there, or bring your own API key and the phone calls
the provider directly, key in the platform's secure storage.</p>
<p>It runs on <b>your</b> server under <b>your</b> account — there is no openGym
service in the middle, and nothing is sent anywhere until you ask it for something. What
leaves the server is a by-name allowlist (your plan, your logged sets, body weight if you
track it) under a pseudonym; your name, sign-in details and other profiles never do. What
comes back can only touch routines and your weekly schedule, and is applied on your device
after you approve it.</p>
<p>The Coach is not a doctor or a physiotherapist. If something hurts, ask a professional.
Full details, including exactly what is sent and how credentials are stored:
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/AI_COACH.md" rel="noopener">docs/AI_COACH.md</a>.</p>
<h2 id="import">Import your training history</h2>
<p>Coming from another tracker? <b>Settings → Data → Import from another app</b> reads:</p>
<ul>
<li><b>FitNotes</b> (both the Android and the FitNotes 2 iOS export)</li>
<li><b>Strong</b> and <b>Hevy</b> (CSV exports — session lengths carry over, so the
activity heatmap fills in properly)</li>
<li><b>Apple Health</b> (body-weight history from the XML export)</li>
<li>…and anything else with date, exercise-name and weight/reps columns</li>
</ul>
<p>Exercise names are matched against the 1,324-exercise library; anything genuinely
ambiguous becomes one of your own custom exercises instead of being guessed at. A summary
shows exactly what will happen before anything is written, and importing is idempotent —
running it twice never duplicates a workout.</p>
<h2 id="backup">Backups</h2>
<p><b>Settings → Data → Export backup (JSON)</b> writes your entire log — plan, workouts,
weights, settings — into one file. On the mobile app it goes out through the share sheet
(Files, AirDrop, mail…); in the browser it downloads. <b>Import backup</b> restores it
anywhere: another phone, your self-hosted instance, or a fresh install. That file is the
whole point of openGym — your training log as a file <i>you</i> own.</p>
<h2 id="build">Build it yourself</h2>
<p>Everything on this page is built from the public repo:</p>
<ul>
<li><b>Web / self-host:</b> <code>docker compose up -d --build</code> builds the frontend
inside the container — no local Node needed.</li>
<li><b>Android APK / iOS app:</b> the Capacitor projects live in <code>frontend/android</code>
and <code>frontend/ios</code> — build, signing and distribution notes are in
<a href="https://gitlab.com/DuarteSantos8/opengym/-/blob/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
</ul>
<h2 id="faq">FAQ</h2>
<h3>Is it really free?</h3>
<p>Yes — free as in cost <i>and</i> as in freedom (AGPL-3.0). No pro tier, no locked
features, no ads, and the license keeps every fork open source too.</p>
<h3>What data does openGym collect?</h3>
<p>None. There is no telemetry, no analytics, no crash reporting. The mobile app's only
network traffic is fetching exercise media from a CDN; a self-hosted instance talks only
to your own server.</p>
<h3>Why isn't it on the Play Store / App Store?</h3>
<p>By choice (and on iOS, by Apple's rules for sideloading). Store accounts cost money,
impose terms that sit badly with the AGPL, and put a gatekeeper between you and an app
whose whole point is that your data is yours.</p>
<h3>Mobile app or self-hosted — which one should I pick?</h3>
<p>If you just want to track your training: the mobile app. If you want your data on your
own hardware, synced across devices, with profiles for the people you train with: self-host.
You can start with the app and move to a server later — the backup file migrates everything.</p>
<h3>Where does the exercise database come from?</h3>
<p>From <a href="https://github.com/hasaneyldrm/exercises-dataset" rel="noopener">hasaneyldrm/exercises-dataset</a>:
1,324 exercises with animations and instructions in 11 languages, including openGym's
separately curated Brazilian Portuguese translation. In pt-BR, built-in exercise names
show Portuguese first and the canonical English title in parentheses. That dataset licenses the two
halves differently, and so does openGym: the exercise metadata and instruction text are
<b>MIT</b>, while the images and animations are
<b>© <a href="https://gymvisual.com/" rel="noopener">Gym visual</a></b>, used under the
dataset's terms rather than openGym's AGPL.</p>
<p>openGym does not redistribute that media — your instance downloads it from the upstream source on
first run. If you want to reuse it yourself, commercially or otherwise, get your own licence from
Gym visual first (<a href="https://gymvisual.com/content/3-terms-and-conditions-of-use" rel="noopener">terms&nbsp;&amp;&nbsp;conditions</a>).</p>
</main>
<footer><div class="wrap foot">
<span class="c">openGym · AGPL-3.0 · © 2026 <a href="https://duarte-santos.ch" rel="noopener">Duarte Santos</a></span>
<div class="links">
<a href="docs.html">Docs</a>
<a href="about.html">About</a>
<a href="https://gitlab.com/DuarteSantos8/opengym" rel="noopener">GitLab</a>
<a href="https://discord.gg/e62jY6fwVb" rel="noopener">Discord</a>
<a href="/#download">Download</a>
</div>
</div></footer>
<script src="site.js?v=9" defer></script>
</body>
</html>