You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run OpenCodex as a self-contained containerized proxy/dashboard without installing OpenCodex globally on the host.
The intended deployment shape is:
Codex CLI / Codex App / Claude Code on host or remote clients
↓
localhost / LAN
↓
OpenCodex container (:10100)
↓
configured providers / account pools
OpenCodex already contains meaningful Docker-aware runtime behavior, and users are already running it under Docker, Docker Compose, k3s, and other external supervisors. However, there is no official Dockerfile, Compose example, published container image, or container-specific deployment guide.
Why this is worth making first-class
Existing issues show that Docker is already an intended/real deployment shape rather than an unsupported experiment:
Today operators have to reconstruct the container contract themselves: which process to run, which directories to persist, which ports to expose, how to handle non-loopback authentication, and which commands must not be used inside a container.
What should OpenCodex do?
Provide a small, supported container deployment surface.
At minimum:
Official Dockerfile or published image
Node 22 base (or another maintainer-selected supported base).
Run OpenCodex in foreground with ocx start.
Do not rely on systemd, launchd, Windows Task Scheduler, or ocx service inside the container.
Prefer a non-root runtime user.
Pin/package the same released OpenCodex version as the image tag.
Official compose.yaml example
Persistent OPENCODEX_HOME volume.
Port 10100 exposed to the host.
Example of host-only publication such as 127.0.0.1:10100:10100.
Clear example for hostname: "0.0.0.0" inside the container.
OPENCODEX_API_AUTH_TOKEN handling for non-loopback binds.
Restart policy managed by Docker/Compose instead of ocx service.
Health/readiness contract
Docker HEALTHCHECK example using /healthz or /readyz.
Document when /readyz should be used instead of liveness.
Persistent data contract
Document which state belongs under OPENCODEX_HOME and should be persisted.
Document optional CODEX_HOME / auth mounts when native ChatGPT/Codex credentials are used.
Prefer read-only credential mounts where possible.
OAuth/headless guidance
Document callback ports required by current OAuth flows.
Operators can already build a custom image by installing the npm package into a Node image and running ocx start, or clone the repository and run the Bun entrypoint directly. That works, but every operator has to rediscover the same details:
foreground-only lifecycle;
service manager is unsupported/unnecessary in Docker;
persistent OPENCODEX_HOME;
0.0.0.0 bind + admission token;
OAuth callback routing;
native Codex auth mounts;
container-safe upgrade behavior.
The runtime already contains Docker-specific handling, so documenting and packaging that contract would reduce duplicated deployment work and make existing Docker support easier to test continuously.
Area
Installation or packaging
What are you trying to accomplish?
Run OpenCodex as a self-contained containerized proxy/dashboard without installing OpenCodex globally on the host.
The intended deployment shape is:
OpenCodex already contains meaningful Docker-aware runtime behavior, and users are already running it under Docker, Docker Compose, k3s, and other external supervisors. However, there is no official Dockerfile, Compose example, published container image, or container-specific deployment guide.
Why this is worth making first-class
Existing issues show that Docker is already an intended/real deployment shape rather than an unsupported experiment:
ocx startdirectly rather than use the service manager.Today operators have to reconstruct the container contract themselves: which process to run, which directories to persist, which ports to expose, how to handle non-loopback authentication, and which commands must not be used inside a container.
What should OpenCodex do?
Provide a small, supported container deployment surface.
At minimum:
Official Dockerfile or published image
ocx start.ocx serviceinside the container.Official
compose.yamlexampleOPENCODEX_HOMEvolume.10100exposed to the host.127.0.0.1:10100:10100.hostname: "0.0.0.0"inside the container.OPENCODEX_API_AUTH_TOKENhandling for non-loopback binds.ocx service.Health/readiness contract
HEALTHCHECKexample using/healthzor/readyz./readyzshould be used instead of liveness.Persistent data contract
OPENCODEX_HOMEand should be persisted.CODEX_HOME/ auth mounts when native ChatGPT/Codex credentials are used.OAuth/headless guidance
Container lifecycle guidance
ocx serviceis not used in Docker.ocx codex-shim installis meaningful only when Codex itself runs in the same container.Example interface
A minimal supported Compose deployment could look approximately like this (exact image/name/config are illustrative):
With container-side config:
{ "port": 10100, "hostname": "0.0.0.0" }And a healthcheck along the lines of:
Alternatives or workarounds
Operators can already build a custom image by installing the npm package into a Node image and running
ocx start, or clone the repository and run the Bun entrypoint directly. That works, but every operator has to rediscover the same details:OPENCODEX_HOME;0.0.0.0bind + admission token;The runtime already contains Docker-specific handling, so documenting and packaging that contract would reduce duplicated deployment work and make existing Docker support easier to test continuously.
Scope / non-goals
This request does not require:
A minimal official image + Compose example + container deployment documentation would already close the main packaging gap.
Acceptance criteria
ocx startdirectly and does not depend on a service manager./healthzand/or/readyzare wired into a documented container healthcheck.Checks