CodexOnAnyDevices enables you to keep vibe coding from your phone while working out at the gym. It runs on the web to control your Codex.
-
Early Release & Better Remote Support: This project was released before the official Codex mobile app. Currently, the official version does not support remote control from a Windows machine out of the box (requiring tedious manual configuration, resulting in unstable connections, slow speeds, and missing features).
-
Account Flexibility: The official ecosystem strictly binds Codex Mobile and the desktop client to the same account. In contrast, CodexOnAnyDevices binds directly to your local Codex runtime, allowing you to use any account seamlessly.
-
Open Source & Customizable: While the official version still experiences stability issues, this project is completely open source, giving you full freedom to customize, mod, or add any features you need.
This repository currently contains:
-
phodex-bridge/: the local Node.js bridge that speaks to Codex -
web-client/: a local web UI for pairing, thread browsing, and chat -
relay/: the relay service used by local/self-hosted setups -
login via password (no need to QR pairing)
-
trusted reconnects, and local bridge sessions
-
better support windows and linux deployment
cd phodex-bridge
npm install
npm start- You could also deploy via https://www.npmjs.com/package/codex-on-any-devices
cd web-client
npm install
npm run set-password -- --generate --write-plaintext
npm start- You could also deploy via https://github.com/SeleiXi/CodexOnAnyDevices/pkgs/container/codex-on-any-devices-web-client
Then open http://127.0.0.1:8787.
The web UI uses a local admin password.
- Recommended:
npm run set-password -- --generate --write-plaintext - This generates a strong password, stores the hash in
web-client/state/auth-state.json, and writes the plaintext password toweb-client/state/admin-password.txt - You can also set your own password with
npm run set-password -- --password "<strong password>" - The script also accepts
REMODEX_WEB_ADMIN_PASSWORDif you prefer supplying it through an environment variable
You do not have to expose everything directly to the public internet. The practical options are:
Use the built-in local relay helper and advertise a hostname or IP that your phone can actually reach on the same network:
./run-local-remodex.sh --hostname <reachable-lan-ip-or-hostname> --port 9000Then start the web client locally and use the generated password to sign in.
This is the simplest setup when your phone and the machine running Codex are on the same LAN or Wi-Fi.
Yes, this is supported by the current architecture.
- Run
relay/on a host that has a public IP or public domain - Start
phodex-bridge/on your Windows, macOS, or Linux machine where Codex actually runs - Point the bridge at that relay with
REMODEX_RELAY - Run
web-client/wherever you want the browser UI to live, usually on the same machine as the bridge
Example bridge startup:
cd phodex-bridge
npm install
REMODEX_RELAY=wss://your-linux-host.example.com/relay npm startExample relay startup on Linux:
cd relay
npm install
npm start- You could also deploy via https://github.com/SeleiXi/CodexOnAnyDevices/pkgs/container/codex-on-any-devices-relay
In this mode, Codex and your repository stay on your own machine. The Linux box is only the relay transport hop.
If you do not want to open ports to the public internet, Tailscale is usually the cleanest option.
Typical setup:
- Install Tailscale on the machine running the relay or the all-in-one local launcher
- Install Tailscale on the phone and log it into the same tailnet
- Use the machine's Tailscale IP or MagicDNS name as the relay hostname
- Start the relay/bridge with that reachable Tailscale hostname
Example:
./run-local-remodex.sh --hostname <your-machine-tailnet-name-or-tailscale-ip> --port 9000Or, if the relay is separate:
cd phodex-bridge
REMODEX_RELAY=ws://<relay-tailnet-name-or-tailscale-ip>:9000/relay npm startIf you also want the web UI to be reachable only inside your tailnet, start the web client normally and expose 8787 through Tailscale Serve on that machine. Recent Tailscale versions use:
tailscale serve localhost:8787That keeps the web UI private to your tailnet. If you instead need a public internet URL, Tailscale Funnel is the public-sharing feature, but that is different from the private tailnet-only flow above.
The web client is intended for local administration and chat access against your own running bridge:
- it reads pairing JSON from a local file
- it keeps auth/security state under
web-client/state/ - it does not assume any hosted backend
- it now includes a mobile-oriented chat layout instead of a desktop-only squeeze-down
See web-client/README.md for details.
The project is promoted on and acknowledge v2ex and linux.do
.jpg)
.jpg)
.jpg)