# Codex on Windows

> How Codex runs on Windows today, the install commands, and the route with nothing to install: an always-on Linux workspace you open in Edge or Chrome, signed in once from the Launch menu.

_Updated November 23, 2026 · Checked against Codex 0.157.1 in EnvHaven v1.9.0_

Codex runs on Windows natively or through WSL. Under WSL it needs WSL2: its Linux sandbox moved to bubblewrap in Codex 0.115, which ended WSL1 support. ([Codex documentation](https://learn.chatgpt.com/docs/windows/wsl))

There is also a way that leaves Windows out of it: in EnvHaven, Codex runs on a Linux workspace of its own and the PC is only the window. Nothing to install on the PC, no WSL to set up, and the PC can sleep while Codex works.

## Codex from Windows, on EnvHaven

1. Open your workspace in Edge or Chrome.
2. Tap **Launch**, choose Codex and tap **Sign in**: it runs `codex login --device-auth`, which shows a one-time code to approve in ChatGPT (turn on device code sign-in in ChatGPT's security settings first).
3. Start it with one tap: signed in, Codex gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (0.157.1), so there is nothing to install or update.
4. Give it a task. The image writes both settings into `~/.codex/config.toml`, so `codex` starts without approvals.
5. Prefer a terminal window? Windows' built-in OpenSSH client (`ssh` in Windows Terminal or PowerShell) connects to the workspace and lands in the same session. First add your public key, or import it from GitHub, under Remote Access in the workspace's EnvHaven sidebar.

## Install Codex on Windows itself

PowerShell:

```powershell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
```

npm:

```bash
npm install -g @openai/codex
```

## Through WSL

WSL runs a Linux distribution inside Windows ([Microsoft's guide](https://learn.microsoft.com/en-us/windows/wsl/install)). Install it from an administrator PowerShell and restart:

```powershell
wsl --install
```

Then install Codex in the Ubuntu terminal it opens:

```bash
curl -fsSL https://chatgpt.com/codex/install.sh | sh
```

## Keep reading

- [Codex](https://envhaven.com/agents/codex)
- [Codex in the browser](https://envhaven.com/agents/codex/browser)
- [Codex on iPhone](https://envhaven.com/agents/codex/iphone)
- [Codex on iPad](https://envhaven.com/agents/codex/ipad)
- [Codex on Android](https://envhaven.com/agents/codex/android)
- [Codex on a Chromebook](https://envhaven.com/agents/codex/chromebook)
- [Coding agents on Windows](https://envhaven.com/agents/windows)

Source: https://envhaven.com/agents/codex/windows
