{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "aafqaq-codex-lb-enhanced--self-host-codex-account-pool-gateway",
 "repo": "aafqaq/codex-lb-enhanced",
 "repo_url": "https://github.com/aafqaq/codex-lb-enhanced",
 "repo_slug": "aafqaq-codex-lb-enhanced",
 "title": "Run a self-hosted Codex account-pool gateway with Docker",
 "page_title": "How to run a self-hosted Codex account-pool gateway with Docker with Codex LB Enhanced",
 "summary": "Start the gateway in a container, add accounts, and create an API key in the dashboard.",
 "who": "A developer or small team that wants one local endpoint for Codex and OpenAI-compatible clients, backed by several upstream accounts they control.",
 "problem": "Single upstream accounts hit quota limits or drop long Codex sessions, and each client needs its own setup.",
 "outcome": "A running gateway at localhost:2455 with accounts added, an API key created, and a persistent SQLite data volume.",
 "steps": [
  "Create the Docker network if it does not exist: `docker network inspect codex-lb-net >/dev/null 2>&1 || docker network create codex-lb-net`",
  "Create the data volume: `docker volume create codex-lb-enhanced-data`",
  "Start the container: `docker run -d --name codex-lb-enhanced --restart unless-stopped -e CODEX_LB_HTTP_RESPONSES_SESSION_BRIDGE_AMBIGUOUS_CONTINUATION_RECOVERY_MODE=server_indefinite_recovery --network codex-lb-net -p 2455:2455 -p 1455:1455 -v codex-lb-enhanced-data:/var/lib/codex-lb ghcr.io/aafqaq/codex-lb-enhanced:1.25.3` (inferred, check the README)",
  "Open http://localhost:2455, complete initialization, and add your accounts.",
  "Create an API key in the dashboard and save it for your clients."
 ],
 "agent_prompt": "In the aafqaq/codex-lb-enhanced repo, run the Docker quick start to start the gateway as the container named codex-lb-enhanced, using the target directory <workdir>. Report the container status from `docker ps` and confirm that http://localhost:2455 responds. Verify that the data volume codex-lb-enhanced-data exists before you finish.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The README says account-pool switching can still occasionally fail to recover, so check important sessions instead of trusting failover blindly.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Docker installed and running, or uv installed for running from source",
  "Upstream ChatGPT accounts you are authorized to use, to add in the dashboard",
  "A browser to open the dashboard at localhost:2455",
  "Codex CLI, desktop, or IDE integration, or another OpenAI-compatible client, if you plan to connect one"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "account-pooling",
   "notice": "Pooling several upstream accounts behind one endpoint may conflict with the terms of the upstream services, so confirm you are allowed to do this before you add accounts."
  },
  {
   "tag": "credentials",
   "notice": "The dashboard stores upstream account data and API keys in the data volume, so protect that volume and the admin port."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/aafqaq-codex-lb-enhanced/self-host-codex-account-pool-gateway/",
 "md": "https://dedupedai.com/use-cases/aafqaq-codex-lb-enhanced/self-host-codex-account-pool-gateway/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/aafqaq-codex-lb-enhanced--self-host-codex-account-pool-gateway.json",
 "api_version": "v1"
}
