pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/Soju06/codex-lb

GitHub - Soju06/codex-lb: Codex/ChatGPT account load balancer & proxy with usage tracking, dashboard, and OpenCode-compatible endpoints
Skip to content

Codex/ChatGPT account load balancer & proxy with usage tracking, dashboard, and OpenCode-compatible endpoints

License

Notifications You must be signed in to change notification settings

Soju06/codex-lb

Repository files navigation

codex-lb

Load balancer for ChatGPT accounts. Pool multiple accounts, track usage, view everything in a dashboard.

Screenshots

Main Dashboard View

main dashboard view

Accounts View

Accounts list and details

Quick Start

Docker

docker run -d --name codex-lb \
  -p 2455:2455 -p 1455:1455 \
  -v ~/.codex-lb:/var/lib/codex-lb \
  ghcr.io/soju06/codex-lb:latest

If you expect high traffic (60+ requests/min), prefer a Docker volume for the data directory to reduce SQLite I/O errors on some hosts.

docker volume create codex-lb-data
docker run -d --name codex-lb \
  -p 2455:2455 -p 1455:1455 \
  -v codex-lb-data:/var/lib/codex-lb \
  ghcr.io/soju06/codex-lb:latest

uvx

uvx codex-lb

Open localhost:2455 → Add account → Done.

Codex CLI & Extension Setup

Add to ~/.codex/config.toml:

model = "gpt-5.3-codex"
model_reasoning_effort = "xhigh"
model_provider = "codex-lb"

[model_providers.codex-lb]
name = "OpenAI"  # MUST be "OpenAI" - enables /compact endpoint
base_url = "http://127.0.0.1:2455/backend-api/codex"
wire_api = "responses"
chatgpt_base_url = "http://127.0.0.1:2455"
requires_openai_auth = true  # Required: enables model selection in Codex IDE extension

OpenCode Setup

Run:

opencode auth login

Then select OpenAI -> Manually enter API Key and enter any value.

Add the following to ~/.config/opencode/opencode.json:

{
  ...
  "provider": {
    "openai": {
      "options": {
        "baseURL": "http://127.0.0.1:2455/v1"
      }
    },
    ...
  }
}

Configuration

All settings use the CODEX_LB_ prefix and can be set via environment variables or .env.local.

Dashboard TOTP

Protect the dashboard with TOTP two-factor authentication.

  1. Set CODEX_LB_DASHBOARD_SETUP_TOKEN to any secret string:
CODEX_LB_DASHBOARD_SETUP_TOKEN=my-secret-token
  1. Open the dashboard and go to Settings to enable TOTP.
  2. Scan the QR code with your authenticator app and confirm.

Once enabled, the dashboard requires a TOTP code on every login. TOTP can be disabled from Settings while logged in.

Data

Data storage locations:

  • Local/uvx: ~/.codex-lb/
  • Docker: /var/lib/codex-lb/

Files:

  • store.db – accounts, usage logs
  • encryption.key – encrypts tokens (auto-generated)

Backup this directory to preserve your accounts.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Soju06
Soju06

💻 ⚠️ 🚧 🚇
Jonas Kamsker
Jonas Kamsker

💻 🐛 🚧
Quack
Quack

💻 🐛 🚧 🎨
Jill Kok, San Mou
Jill Kok, San Mou

💻 ⚠️ 🚧
PARK CHANYOUNG
PARK CHANYOUNG

📖
Choi138
Choi138

💻 🐛 ⚠️
LYA⚚CAP⚚OCEAN
LYA⚚CAP⚚OCEAN

💻 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

About

Codex/ChatGPT account load balancer & proxy with usage tracking, dashboard, and OpenCode-compatible endpoints

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 10

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy