Codex · Updated 2026-09-14 · Demox team
Deploy a website from Codex
Direct answer: Codex can publish to Demox when it can run shell commands or MCP tools. CLI path: npm install -g @demox-site/cli@latest, demox login, demox deploy ./dist. MCP path: npx -y @demox-site/mcp-server@latest. Point Codex at https://www.demox.site/doc and at the local build. If the project is React or Vite, build first. Codex should not upload .env files or source trees with node_modules. The result is a public HTTPS URL, not a GitHub Pages repository.
How to do it
- Step 1. Install the CLI or configure the MCP server.
- Step 2. Build the project if it is not already static HTML.
- Step 3. Ask Codex to run demox deploy or the MCP deploy tool.
- Step 4. Confirm the live URL loads without local paths.
FAQ
Does Codex need a Demox account?
Yes. The first deploy opens a browser login.
Can it keep updating the same site?
Yes. Pass --id WEBSITE_ID on later deploys.
用 Codex 发布网站
让 Codex 安装 CLI 或走 MCP,构建后执行 demox deploy。不要上传密钥和 node_modules。
按这个顺序做
- 01 安装 CLI,或配置 MCP。
- 02 如果还不是静态 HTML,先构建项目。
- 03 让 Codex 执行 demox deploy 或 MCP 发布。
- 04 确认线上地址不再依赖本机路径。
常见问题
Codex 需要 Demox 账号吗?
需要。第一次发布会打开浏览器登录。
能反复更新同一个站点吗?
可以。之后发布加上 --id WEBSITE_ID。