Sign in with ChatGPT - Address in use (os error 98)
Resolved 💬 5 comments Opened Aug 25, 2025 by MateuszZelent Closed Sep 3, 2025
💡 Likely answer: A maintainer (gpeal, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.23.0
Which model were you using?
_No response_
What platform is your computer?
WSL ubuntu20.04
What steps can reproduce the bug?
🐛 Bug report: "Address in use (os error 98)" during login
Description
When trying to launch Codex CLI and sign in (Sign in with ChatGPT or Provide your own API key), the following error appears:
Address in use (os error 98)
---
Additional context
- Ports 8000, 3000, and 8080 are already in use on my system.
- It looks like Codex CLI tries to start its local server on one of those ports.
- I did not find any documented way to change the port manually (e.g. via
--portflag or environment variable).
---
❓ Question: Is there currently any way to specify a different port for the login process?
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
5 Comments
It’s right there in the README — it says to use localhost:1455.
I got the same issue on native Linux - I tried using
ssto check if port 1455 was already in use on my system but it wasn't. I managed to log in properly by runningcodex loginin the terminal directly.After trying many things from forums and even restarting PC and wsl many times, I finally found what the issue was for me. The culprit was windows NAT service who was blocking the 1455 port - among many others.
To see the ports that were blocked, I ran on a PowerShell with elevated privileges (admin):
netsh int ipv4 show excludedportrange protocol=tcp | findstr /r "^ *[0-9]"Got:
Seeing that the port was in one of the blocks, I stopped the winNat service with:
net stop winnatand restarted it:
net start winnatAfter doing this when I asked to sign in, it redirected me to OpenAI's page and got the Codex Cli working.
Hope this helps someone
For future users who encounter this, per the above comments, 1455 is the port to free on your system if you are having login issues.
macOS
Windows
In my case, closing Jet brains IDE solved the error.
I found a process used by jetbrains IDE is using the port by the command above. So I closed my Jetbrains IDE. After that, the error disappeared and I could signed in successfully. I hope this helps anyone using JetBrains IDE.