Open-source gym management that's fast and easy to use.
Members, memberships, class scheduling, QR check-ins and billing, plus a member portal and a public join page — in a keyboard-friendly UI. Self-host for free, or use Freeweight Cloud.
Freeweight is open core: the core is licensed under MIT, with separately licensed enterprise features. Copy .env.example to .env for self-hosted setup. Report vulnerabilities privately through SECURITY.md.
- Members: searchable roster, statuses, locations, per-member balances and portal invite links
- Memberships: plans (monthly/weekly/yearly, signup fee, class credits) and member subscriptions; charges generated automatically
- Schedule: class types with colors, recurring session creation, capacity, waitlist with automatic promotion, instructors
- Check-ins: QR code per member (
fw1.HMAC tokens), kiosk-style quick check-in, today's check-in feed - Billing: charges, payments, member balances; Stripe Checkout/Connect for online card payments
- Member portal: QR check-in card, balances + pay online, upcoming classes, book/cancel sessions
- Public join page (
/j/[gym]): gym info, listed plans, weekly schedule, anti-spam join form - Command palette (⌘K),
d/m/s/c/b/p/tnav shortcuts - REST API + API keys (
fw_), signed webhooks (x-freeweight-signature), and an MIT SDK inpackages/sdk - Basic SAML/OIDC SSO and passkeys: included in the free self-hosted core; connect your own identity provider
- BYOK AI: included in the free self-hosted core; use your own API key or a compatible local model endpoint
Out of scope by design: payroll, workout programming, and access-control hardware. Webhooks + the REST API are the integration surface.
cp .env.example .env
# In .env set BETTER_AUTH_SECRET and POSTGRES_PASSWORD to separate outputs of openssl rand -hex 32.
# Set DATABASE_URL=postgres://freeweight:<POSTGRES_PASSWORD>@localhost:5432/freeweight
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d db
pnpm install
node --env-file=.env scripts/migrate.ts
pnpm devOpen http://localhost:5173, create an account, then click Explore with demo data.
| Target | How |
|---|---|
| Docker | Configure persistent secrets in .env (see quick start), then docker compose up -d. |
| Railway | Manual setup: deploy the Dockerfile with railway.json, add PostgreSQL, and configure DATABASE_URL and BETTER_AUTH_SECRET. |
| Vercel | Button above. Uses @sveltejs/adapter-vercel automatically when VERCEL=1. Migrations run during the build. |
| Render | Button above. render.yaml provisions a Docker web service and a Postgres database. |
| Koyeb | Manual setup: deploy the Dockerfile, add PostgreSQL, and configure DATABASE_URL and BETTER_AUTH_SECRET. |
| DigitalOcean | Button above. .do/deploy.template.yaml creates the app and a dev Postgres on App Platform. |
| Hostinger | Manual VPS Docker Manager setup: deployment guide. |
| Any VPS | docs/deploy-vps.md — same compose file on a ~$4 Hetzner VM or Oracle's always-free tier. |
| Fly.io | docs/deploy-fly.md — fly launch using fly.toml, scales to zero when idle. |
| PikaPods | Not yet in their app catalog — once submitted, a Run on PikaPods badge goes here (~$1.50/mo managed). |
Environment variables are documented in src/env.ts.
Setting FREEWEIGHT_PROFILE_URL to a Leroa Profile service (any install of Leroa running LEROA_PROFILE_HUB=true) turns on two things:
- Unified sign-in — the login page shows "Continue with Leroa". Members sign in through the profile service and land back here as an account keyed to the same identity across the whole suite (Leroa, Tredaro, Freeweight).
- Shared contact profile — portal members get a "Connect your Leroa profile" card. With one consent they grant
identity+contactscopes; the app then syncs name/email/phone into theirgym_memberrecords at every gym where they opted in (profile_syncflag), on portal load and from the daily cron. Disconnecting revokes the hub grant and clears the flags.
Access tokens are sealed server-side (HKDF from BETTER_AUTH_SECRET) and stored hashed at the hub; demo mode (FREEWEIGHT_DEMO) disables the feature.
Basic SAML/OIDC SSO, passkeys and BYOK AI are included without an enterprise key or Cloud subscription. See the configuration guide. You supply your identity provider and any model-provider credentials; provider usage fees are separate. Credentials stay on the server. Public demos continue to block SSO/passkey configuration.
Membership billing (creating the next period's charge and marking overdue charges) runs whenever someone opens the app. To run it on time every day, set CRON_SECRET and call GET /api/cron with Authorization: Bearer $CRON_SECRET. On Vercel, the cron in vercel.json does this for you. Elsewhere, use any scheduler, for example:
curl -fsS -H "Authorization: Bearer $CRON_SECRET" https://gym.example.com/api/cronKeys are created in Settings → API keys and are org-scoped, with per-resource read/write grants. GET /api/v1/openapi.json serves a machine-readable spec.
curl -H "Authorization: Bearer fw_..." https://gym.example.com/api/v1/membersWebhooks (Settings → Webhooks) are signed with HMAC-SHA256 in x-freeweight-signature (Standard Webhooks style; see packages/sdk).
MIT for the core, including basic SSO, passkeys and BYOK AI. Files under src/lib/server/ee/ or marked /* @license Enterprise */ use the Freeweight Enterprise License in ee/LICENSE; production use of those paid administrative features requires a valid subscription or Freeweight Cloud. packages/sdk is MIT.
Existing members use the member portal for bookings and purchases; public forms are for new visitors.
For a reverse proxy, set TRUSTED_PROXY_IPS to a comma-separated list of its exact socket peer IP addresses (including IPv6 notation if used). Only these peers may supply X-Forwarded-For; the proxy must overwrite that header and direct access to its address must be restricted. Direct Docker connections use the socket address for rate limits.
This is pre-1.0 software. Start with a disposable evaluation and check your workflows before using real customer data. Review SECURITY.md, test your identity provider and payment webhooks, verify scheduled jobs, and perform a backup/restore drill for your installation.
For Docker self-hosting, create .env once and keep its authentication secret across upgrades. Optional SSO/AI/provider settings in .env are passed to the application container. Use docker compose up -d --build when building this checkout; published images use version tags rather than an unversioned latest tag.
The source Compose setup builds this checkout and requires Docker Compose 2.24 or newer for its optional .env file. Rebuild after updating source to pick up security fixes.
Compose requires an explicit POSTGRES_PASSWORD; no shared database password is supplied. For an existing volume, set it to the database's current password before upgrading. Changing .env alone does not rotate an initialized database: coordinate any password change with PostgreSQL and update all clients. Back up before upgrading, and keep both secrets persistent.