opencodex Docker & Self-Hosted Deployment

GitHub

Universal provider proxy for OpenAI Codex & Claude Code β€” use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

8,749 stars TypeScript TypeScript 1 file Β· ~8,871 tokens #ai-gateway#ai-tools#anthropic#chatgpt#claude#claude-code#codex#codex-cli
RAW Compose
1. Pull Image (DOCKERHUB) docker pull library/opencodex
2. Docker Run (1-Click Launch) docker run -d --name opencodex -p 10100:10100 --restart always opencodex:local
3. Podman Run podman run -d --name opencodex -p 10100:10100 --restart always opencodex:local
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/library/opencodex:local
5. ORAS Pull (OCI Artifact) oras pull opencodex:local
6. Compose Deployment docker compose up -d
compose.yaml
Download .yml
name: opencodex

services:
  hub:
    image: opencodex:local
    build:
      context: .
      dockerfile: Dockerfile
      target: runtime
      args:
        # Required when context is a remote Git URL; harmless for local clones.
        BUILDKIT_CONTEXT_KEEP_GIT_DIR: "1"
    init: true
    read_only: true
    environment:
      # A custom CODEX_HOME also requires a matching writable volume target below.
      CODEX_HOME: /home/bun/.codex
    ports:
      - "${OPENCODEX_BIND_ADDRESS:-127.0.0.1}:${OPENCODEX_PORT:-10100}:10100"
    volumes:
      - ocx-state:/home/bun/.opencodex
      - codex-state:/home/bun/.codex
    tmpfs:
      - /tmp:size=64m,mode=1777
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    restart: unless-stopped
    stop_grace_period: 30s

volumes:
  ocx-state:
  codex-state: