在美国服务器上跑Codex CLI

12次阅读
没有评论

为什么要在美国的服务器上跑Codex CLI ?

因为我不想被封号,后续还要使用Cluade Code。

由于是要SSH到美东地区的服务器,网络不是很稳定,如果我们codex执行任务的期间掉线了,那么任务会中断,为了保证任务执行不中断,我这边使用screen来实现。

apt install screen
screen -R Codex

安装screen后,我们还需要安装fnm,通过fnm去安装Node.js和NPM,然后再通过NPM去安装Codex CLI。

curl -fsSL https://fnm.vercel.app/install | bash
fnm install --lts
npm i -g @openai/codex

输入Codex,然后选择第2种方式去认证,因为我们是在remote or headless machine

2. Sign in with Device Code                                                                                                                                                          Sign in from another device with a one-time code

然后按照提示打开链接,输入机器码即可。

正文完
 0
wujingquan
版权声明:本站原创文章,由 wujingquan 于2026-04-11发表,共计427字。
转载说明:Unless otherwise specified, all articles are published by cc-4.0 protocol. Please indicate the source of reprint.
评论(没有评论)

WUJINGQUAN