<!-- Deploy a Website from Codex | Demox -->
Source: https://www.demox.site/codex-deploy-website

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

1. **Step 1.** Install the CLI or configure the MCP server.
2. **Step 2.** Build the project if it is not already static HTML.
3. **Step 3.** Ask Codex to run demox deploy or the MCP deploy tool.
4. **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。

### 按这个顺序做

1. **01** 安装 CLI，或配置 MCP。
2. **02** 如果还不是静态 HTML，先构建项目。
3. **03** 让 Codex 执行 demox deploy 或 MCP 发布。
4. **04** 确认线上地址不再依赖本机路径。

### 常见问题

### Codex 需要 Demox 账号吗？

需要。第一次发布会打开浏览器登录。

### 能反复更新同一个站点吗？

可以。之后发布加上 --id WEBSITE_ID。

## Related Demox pages

- [Free static website hosting with CLI and MCP](https://www.demox.site/free-static-site-hosting)
- [Deploy AI-generated websites in seconds](https://www.demox.site/ai-website-deployment)
- [Deploy a website from MCP](https://www.demox.site/mcp-website-deployment)
- [Deploy a static site from the CLI](https://www.demox.site/cli-static-site-deploy)
- [You have an AI-generated page. How do you publish it?](https://www.demox.site/deploy-ai-generated-website)
- [Deploy a website from Claude Code](https://www.demox.site/claude-code-deploy-website)
- [CLI and MCP docs](https://www.demox.site/doc)
- [When to use Demox](https://www.demox.site/when-to-use-demox)

[Upload and publish](https://www.demox.site/console/projects) · [Read the docs](https://www.demox.site/doc)
