> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onerep.life/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-Hosting OneRep: What You Get and What You Need

> Run your own copy of OneRep on any machine with Docker. No plans, no paywall, and no AI cap — every account on your install is unlimited and unmetered.

Self-hosting OneRep means running the entire stack — the Convex backend, the food datasource, and the web app — on hardware you control. One script clones secrets, wires up the backend, and starts every service. When it finishes, you have a fully functional fitness app with no external dependencies beyond the optional integrations you choose to enable.

## What you get

Every account on your install is treated as Pro by default: no plans render, no paywall appears, and no monthly AI cap applies. You are the one paying for inference (via your own OpenRouter key), so nothing meters you. AI, food search, email, analytics, and authentication providers each switch on with their own environment variables and stay quiet without them — a deployment without an `OPENROUTER_API_KEY` still works, and any user can supply their own key in Settings to use the Coach on their own credential.

## Services started

When installation finishes, two services are available on localhost:

| Service   | URL                     |
| --------- | ----------------------- |
| App       | `http://127.0.0.1:8081` |
| Dashboard | `http://127.0.0.1:6791` |

To serve on a real domain, set `PUBLIC_HOST` before the first run, or update `CONVEX_CLOUD_ORIGIN`, `CONVEX_SITE_ORIGIN`, and `APP_URL` in `selfhost/.env` and re-run `./install.sh`. Full details are in the [Install guide](/selfhost/install).

## Prerequisites

<CardGroup cols={2}>
  <Card title="Docker with Compose v2" icon="docker">
    Runs the backend, dashboard, datasource, and app. Compose v2 is required — the installer uses `docker compose` (space, not hyphen).
  </Card>

  <Card title="Bun 1.3.4 or newer" icon="box">
    Required on the host to deploy the Convex functions during installation. Node.js 18+ also works as an alternative.
  </Card>

  <Card title="~10 GB disk (USDA)" icon="hard-drive">
    The USDA FoodData Central catalog requires roughly 10 GB of disk space. The datasource starts empty and serves whatever you import.
  </Card>

  <Card title="~25 GB disk (USDA + OFF)" icon="hard-drive">
    Add another \~15 GB if you also import the full Open Food Facts catalog. Partial imports are supported — you can load a slice first.
  </Card>
</CardGroup>

<Note>
  Xcode or Android Studio are only needed if you intend to build native iOS or Android apps. The PWA route requires no extra toolchain at all.
</Note>

## What runs in Docker

The installer brings up four containers, all defined in `selfhost/docker-compose.yml`:

* **Convex backend** — database, realtime sync, authentication, scheduled work, and every server-side integration.
* **Convex dashboard** — the admin UI at `http://127.0.0.1:6791` where you inspect data, run queries, and manage environment variables.
* **Datasource** — the self-hosted food and exercise API (Bun + SQLite), serving USDA, Open Food Facts, and wger data from whatever you've imported.
* **App** — a production build of the React web app, served at `http://127.0.0.1:8081`.
