Skip to content

Commit 32e009e

Browse files
committed
docs(site): simplify quick start flow
1 parent 1d38517 commit 32e009e

1 file changed

Lines changed: 65 additions & 42 deletions

File tree

Lines changed: 65 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
---
22
title: Quick Start
3-
description: Run Codex Pooler locally, create the first owner, and issue a first Pool API key.
3+
description: Start Codex Pooler locally, create the first owner, and issue a Pool API key.
44
---
55

6-
This quick start runs Codex Pooler locally with Docker Compose and a local Postgres database. It is meant for first evaluation, local smoke checks, and small self-hosted trials.
6+
Use this guide to get from a fresh checkout to a local Pool API key you can put in a Codex or OpenAI-compatible client.
77

88
:::note[Work in Progress]
99
No published release exists yet. Expect setup details and docs to change before the first release.
1010
:::
1111

12-
## Prerequisites
12+
## What You Need
1313

1414
- Docker with Compose
1515
- `openssl`
16-
- A browser for the owner bootstrap and admin UI
16+
- A browser for the owner setup and admin UI
17+
- At least one Codex account credential to import when you create your first upstream
1718

18-
## Start The Local Stack
19+
## 1. Start Codex Pooler
1920

20-
Clone the repository, generate local secrets, and start the Compose stack.
21+
Clone the repository, generate local secrets, and start the app with Postgres.
2122

2223
```bash
2324
git clone https://github.com/icoretech/codex-pooler.git
@@ -28,83 +29,105 @@ docker compose pull
2829
docker compose up -d
2930
```
3031

31-
Open `http://localhost:4000`.
32+
Open [http://localhost:4000](http://localhost:4000). The first page should take you to owner setup.
3233

33-
Useful local commands:
34+
If the page does not load, check the containers and app logs:
3435

3536
```bash
3637
docker compose ps
3738
docker compose logs -f app
38-
docker compose down
3939
```
4040

41-
To remove the local database too, run:
41+
## 2. Create The Owner Account
4242

43-
```bash
44-
docker compose down -v
45-
```
43+
Create the first account from the bootstrap screen. This account is the instance owner, so store the password somewhere safe.
4644

47-
## First Login
45+
After setup, sign in and keep these admin pages open as your first-run checklist:
4846

49-
On the first visit, create the owner account from the bootstrap flow. If the app redirects you to sign in, use the owner account you just created.
47+
- [Pools](http://localhost:4000/admin/pools)
48+
- [Upstreams](http://localhost:4000/admin/upstreams)
49+
- [API keys](http://localhost:4000/admin/api-keys)
5050

51-
After login, start from the admin UI:
51+
Use separate operator accounts later for day-to-day work. Keep the bootstrap owner for instance-wide administration.
5252

53-
- `http://localhost:4000/admin/pools`
54-
- `http://localhost:4000/admin/upstreams`
55-
- `http://localhost:4000/admin/api-keys`
53+
## 3. Create A Pool
5654

57-
The bootstrap account is the instance owner. Keep its credentials private and create separate operator accounts for day-to-day access.
55+
Open [Pools](http://localhost:4000/admin/pools) and create your first Pool.
5856

59-
## Health Checks
57+
A Pool is the capacity boundary your clients use. API keys attach to a Pool, and Codex Pooler chooses an eligible upstream account inside that Pool for each request.
6058

61-
Check that the web process answers before creating runtime credentials.
59+
For a local trial, one Pool is enough. Use a plain name such as `local-dev` or `default`.
6260

63-
```bash
64-
curl -fsS http://localhost:4000/healthz
65-
curl -fsS http://localhost:4000/readyz
66-
```
61+
## 4. Add An Upstream Account
6762

68-
Both checks should return a successful response. If they don't, inspect the app logs with `docker compose logs -f app`.
63+
Open [Upstreams](http://localhost:4000/admin/upstreams) and import or connect a Codex account.
6964

70-
## Create Your First Pool And API Key
65+
Treat imported Codex account material as owned by Codex Pooler after import. Do not keep the same credential active in other automation unless you accept that provider refresh-token rotation can force one copy to reauthenticate.
7166

72-
1. Create a Pool in `/admin/pools`.
73-
2. Add or import an upstream account in `/admin/upstreams`.
74-
3. Create a Pool API key in `/admin/api-keys`.
75-
4. Copy the raw key once and store it in your client or secret manager.
67+
After import, assign the upstream to the Pool you created. The upstream should show as usable before you expect client requests to route successfully.
7668

77-
The Pool API key represents the Pool, not a single upstream account. Codex Pooler can then choose an eligible upstream for each request.
69+
## 5. Create A Pool API Key
7870

79-
Treat imported Codex account material as owned by Codex Pooler after import. Don't keep the same account credential active in other automation unless you accept that provider refresh-token rotation can force one copy to reauthenticate.
71+
Open [API keys](http://localhost:4000/admin/api-keys) and create a key for your Pool.
8072

81-
## Point A Client At The Local Gateway
73+
Copy the raw key immediately. Codex Pooler shows it only once. Store it in the client environment variable you plan to use, for example:
8274

83-
For Codex backend clients, use the Codex backend compatibility route:
75+
```bash
76+
export CODEX_POOLER_API_KEY="<pool-api-key>"
77+
```
78+
79+
The Pool API key represents the Pool, not one upstream account. Do not use this key for `/mcp`; operator MCP tokens are separate.
80+
81+
## 6. Point Your First Client At The Gateway
82+
83+
For Codex backend clients, use the backend compatibility route:
8484

8585
```text
8686
Base URL: http://localhost:4000/backend-api/codex
8787
Authorization: Bearer <pool-api-key>
8888
```
8989

90-
For selected OpenAI-style SDK clients, use the narrow OpenAI-compatible `/v1` surface:
90+
For OpenAI-compatible SDK clients, use the narrow `/v1` route:
9191

9292
```text
9393
Base URL: http://localhost:4000/v1
9494
Authorization: Bearer <pool-api-key>
9595
```
9696

97-
For trusted operator metadata tools, use the operator MCP endpoint with an operator MCP token, not a Pool API key:
97+
For trusted operator metadata tools, use `/mcp` with an operator MCP token, not a Pool API key:
9898

9999
```text
100100
MCP URL: http://localhost:4000/mcp
101101
Authorization: Bearer <operator-mcp-token>
102102
```
103103

104-
For deployed examples, replace the local host with `https://pooler.example.com`, such as `https://pooler.example.com/v1`.
104+
For deployed instances, replace `http://localhost:4000` with your HTTPS host, for example `https://pooler.example.com`.
105+
106+
## If Something Is Stuck
107+
108+
Use these checks only when the page or client path is not behaving as expected.
109+
110+
```bash
111+
docker compose ps
112+
docker compose logs -f app
113+
curl -fsS http://localhost:4000/healthz
114+
curl -fsS http://localhost:4000/readyz
115+
```
116+
117+
If the app is running but client requests fail, check the Pool assignment first: the Pool needs an active API key, at least one usable upstream assignment, and a model the upstream account can serve.
118+
119+
To stop the local stack:
120+
121+
```bash
122+
docker compose down
123+
```
124+
125+
To remove the local database too:
105126

106-
## Support Boundary
127+
```bash
128+
docker compose down -v
129+
```
107130

108-
The quick start checks that Codex Pooler starts, accepts owner setup, and can issue a Pool API key. It does not prove your upstream account is permitted for every model, that every SDK route is supported, or that your deployment is production-ready.
131+
## Safety Notes
109132

110-
For responsible operation, give Pool API keys only to trusted clients, keep MCP tokens separate from runtime credentials, and don't paste prompts, tokens, cookies, or account secrets into support requests.
133+
Give Pool API keys only to trusted clients. Keep MCP tokens separate from runtime credentials. Do not paste prompts, tokens, cookies, account secrets, or imported account material into support requests.

0 commit comments

Comments
 (0)