# Can't set up environment with Codex cloud

**URL:** <https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029>\
**Category:** Codex\
**Created:** [May 17, 2025, 6:58pm UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029 "2025-05-17T18:58:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigzyg](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bigzyg](https://community.openai.com/u/bigzyg)\
**Post date:** [May 17, 2025, 6:58pm UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/1 "2025-05-17T18:58:40Z")

</div>

I can’t set up my environment on codex cloud, because apt-get seems to have no network access, and I cannot use my own container. Relevant parts of the environment config script:

```auto
sudo apt-get update
sudo apt-get install -y \
  postgresql postgresql-contrib redis-server build-essential \
  libpq-dev curl

```

resultant output:

```auto
... (truncated)
Err:8 http://archive.ubuntu.com/ubuntu noble-updates Release
  Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.82). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.81). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.81). - connect (101: Network is unreachable)

0% [Working]
            
Err:9 http://security.ubuntu.com/ubuntu noble-security Release
  Cannot initiate the connection to security.ubuntu.com:80 (185.125.190.81). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (91.189.91.83). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (185.125.190.83). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (185.125.190.82). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (91.189.91.81). - connect (101: Network is unreachable)

0% [Working]
            
Err:10 http://archive.ubuntu.com/ubuntu noble-backports Release
  Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.82). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.81). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (185.125.190.83). - connect (101: Network is unreachable) Cannot initiate the connection to archive.ubuntu.com:80 (91.189.91.81). - connect (101: Network is unreachable)

10% [Working]
             

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 6%

Reading package lists... 6%

Reading package lists... 55%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 67%

Reading package lists... 69%

Reading package lists... 69%

Reading package lists... 74%

Reading package lists... 74%

Reading package lists... 79%

Reading package lists... 79%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 85%

Reading package lists... 89%

Reading package lists... 89%

Reading package lists... 93%

Reading package lists... 93%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... 99%

Reading package lists... Done

E: The repository 'http://apt.llvm.org/noble llvm-toolchain-noble-19 Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu noble Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu noble-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://security.ubuntu.com/ubuntu noble-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://archive.ubuntu.com/ubuntu noble-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

```

Codex cloud is advertised as being “for professional dev work on production repos”, but doesn’t seem appropriate for any project more difficult to configure than a freshman university project. My actual environment setup is much more complicated than this, but I cannot even get past installing basic ubuntu deps, nor can I use my own container.

---

<div class="post-metadata">

**Author:** ![knavillus](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/knavillus/32/632761_2.png) [@knavillus](https://community.openai.com/u/knavillus)\
**Post date:** [May 17, 2025, 8:21pm UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/2 "2025-05-17T20:21:26Z")

</div>

This is being discussed in this thread [Codex cloud agent unable to install pnpm dependencies - #7 by vb](https://community.openai.com/t/codex-cloud-agent-unable-to-install-pnpm-dependencies/1263574/7)

All environment setup needs to be specified in the Environment setup which is configured through the Codex web app. The agent will have no network access once environment is setup.

---

<div class="post-metadata">

**Author:** ![bigzyg](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bigzyg](https://community.openai.com/u/bigzyg)\
**Post date:** [May 18, 2025, 1:15am UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/3 "2025-05-18T01:15:33Z")

</div>

Thanks for responding, but this is not the same issue, because I **am** configuring the environment in the advanced tab of the environment setup on the web app

---

<div class="post-metadata">

**Author:** ![knavillus](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/knavillus/32/632761_2.png) [@knavillus](https://community.openai.com/u/knavillus)\
**Post date:** [May 18, 2025, 1:50am UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/4 "2025-05-18T01:50:24Z")

</div>

Sounds like there are other issues too, e.g. bun install on environment setup …I’ve only used pip thus far but sounds like beta test preview blues for a lot of people including you. Hopefully they iron details out.

---

<div class="post-metadata">

**Author:** ![nils.k](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@nils.k](https://community.openai.com/u/nils.k)\
**Post date:** [May 18, 2025, 5:06am UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/5 "2025-05-18T05:06:04Z")

</div>

Seems that the environment variables can only be accessed through the setup script within the advanced script, not from any scripts in your actual repo

---

<div class="post-metadata">

**Author:** ![swombat](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@swombat](https://community.openai.com/u/swombat)\
**Post date:** [May 18, 2025, 3:00pm UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/6 "2025-05-18T15:00:17Z")

</div>

This is solved by doing `apt-get update` instead of `sudo apt-get update` in the deploy script.

No sudo needed, the script is running as root already.

---

<div class="post-metadata">

**Author:** ![lukebyrne](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/lukebyrne/32/631986_2.png) [@lukebyrne](https://community.openai.com/u/lukebyrne)\
**Post date:** [May 19, 2025, 10:50am UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/7 "2025-05-19T10:50:45Z")

</div>

I am seeing the same issues.

It means I cant get my tests to run before I ask it to create a pull commit.

I asked `I have setup env vars in the advanced settings/environment, can you read them?'`

Answer:

> It looks like the current runtime environment does not expose your custom environment variables. When listing the container’s variables, only default values such as proxy settings and paths are visible, and nothing matches a custom variable you might have set. Therefore, I’m unable to see those variables.

---

<div class="post-metadata">

**Author:** ![lukebyrne](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/lukebyrne/32/631986_2.png) [@lukebyrne](https://community.openai.com/u/lukebyrne)\
**Post date:** [May 19, 2025, 11:20am UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/8 "2025-05-19T11:20:49Z")

</div>

This feels either a:

1. Skill issue on my part
2. Me not understanding how to get the tests to run before a commit
3. OpenAI not expecting how some users might want to use Codex

---

<div class="post-metadata">

**Author:** ![bigzyg](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bigzyg](https://community.openai.com/u/bigzyg)\
**Post date:** [May 20, 2025, 4:41pm UTC](https://community.openai.com/t/cant-set-up-environment-with-codex-cloud/1264029/9 "2025-05-20T16:41:06Z")

</div>

This fixed it! However, I wouldn’t have expected sudo as root to have different behaviour like this, do you have any idea what might be causing it on openai’s side? Not urgent at all because I’m happy to simply remove the sudo call
