
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A wiki and document store built with React and Express.
Single-user personal knowledge base - A full-stack TypeScript application that provides a beautiful, intuitive interface for creating and managing markdown documents organized in a hierarchical folder structure.
⚠️ Note: Codex is designed as a single-user application. It does not support concurrent multi-user editing or collaboration features. Perfect for personal wikis, note-taking, and documentation.
data/templates/).md files to navigate within the app; anchor links scroll to headingsWhen creating a new page, Codex can start from a template instead of a blank page.
data/templates/*.mdtemplate: Your Template Name (display name)autoname: true|false (auto-generate a filename when creating)Codex supports Mermaid diagrams in markdown via fenced code blocks:
md```mermaid graph TD A --> B ```
Codex includes several security features to protect your data:
AUTH_PASSWORD (not recommended for public deployments)429 Too Many Requests when limit is exceededAll login attempts are logged with timestamps and IP addresses:
✓ Successful login from 192.168.1.100 - Successful authentication✗ Failed login attempt from 192.168.1.100 - Invalid passwordLogin attempt without password from 192.168.1.100 - Missing passwordLogin attempt when auth disabled from 192.168.1.100 - Auth not configuredHTTP request logging (via morgan):
Helmet middleware provides:
AUTH_PASSWORD for deploymentsSESSION_SECRET in productionNODE_ENV=production)Codex is designed to be accessible to all users, including those using assistive technologies:
<header>, <nav>, <main>, <section>, <aside>, and <article> elementsaria-live) announce dynamic content updatesrole="tree", role="button", role="dialog") for enhanced navigationtabIndex attributesj/k) in folder tree, page list, and search resultsThe accessibility features ensure Codex can be used effectively by people with:
CODE_TOKEN_2
Create a .env file in the root directory:
CODE_TOKEN_3
CODE_TOKEN_4
The fastest way to get started using the Makefile:
CODE_TOKEN_5
Then open http://localhost:3000 in your browser!
CODE_TOKEN_6
CODE_TOKEN_7
CODE_TOKEN_8
Option 1: Using Make (Recommended)
CODE_TOKEN_9
Option 2: Using npm
CODE_TOKEN_10
The application will be available at:
CODE_TOKEN_11
This creates optimized production builds in:
server/dist/ - Compiled backendclient/dist/ - Optimized frontend bundleCodex can be run in Docker for simplified deployment. In production mode, Express serves both the API and the React UI from a single port (3001).
Official multi-architecture (AMD64/ARM64) images are available on Docker Hub:
CODE_TOKEN_12
Available tags:
latest - Latest stable release2.7.0 - Specific version (example)2.7 - Minor version (example)2 - Major version (example)Image verification (signed with Cosign): CODE_TOKEN_13
Supply chain security:
To inspect the SBOM: CODE_TOKEN_14
CODE_TOKEN_15
The application will be available at http://localhost:3001 (both UI and API on the same port).
CODE_TOKEN_16
Environment Variables (in docker-compose.yml):
NODE_ENV=production - Runs in production modePORT=3001 - Server port (default)AUTH_PASSWORD=your-password - Set to enable authentication (optional)TRUST_PROXY=true - Enable when behind a reverse proxy with HTTPSVolume Mounting:
./data:/app/data - Persists your wiki data outside the containerImportant: Due to secure cookie requirements, there are two ways to run Codex with authentication:
Option 1: Run Passwordless Locally (for testing)
Remove or comment out the AUTH_PASSWORD environment variable in docker-compose.yml:
CODE_TOKEN_17
This allows direct HTTP access without authentication, suitable for local testing.
Option 2: Deploy Behind a Reverse Proxy (for production)
For production with authentication, deploy behind a reverse proxy (nginx, Caddy, Traefik) that:
X-Forwarded-Proto: https headerTRUST_PROXY=true in the environment variablesExample with nginx: CODE_TOKEN_18
Why? In production mode, session cookies use secure: auto, which requires HTTPS. Direct HTTP access with a password set will fail because the browser won't send the secure cookie. The reverse proxy provides HTTPS termination while communicating with Codex via HTTP internally.
Codex includes a https://modelcontextprotocol.io/ (MCP) server that allows AI agents like Claude, GitHub Copilot, and other MCP-compatible clients to interact with your documentation.
Enable the MCP server by setting environment variables: CODE_TOKEN_19
Start the server (runs alongside the main app): CODE_TOKEN_20
Connect your MCP client to http://localhost:3002/mcp
The MCP server exposes 12 tools for AI agents:
| Tool | Description |
|---|---|
search_pages | Search documentation by query |
get_page | Read a page's content |
create_page | Create a new page |
update_page | Update an existing page |
delete_page | Delete a page |
rename_page | Rename a page |
move_page | Move a page to another folder |
list_folders | Get folder hierarchy |
list_pages | List pages in a folder |
create_folder | Create a new folder |
delete_folder | Delete an empty folder |
rename_folder | Rename a folder |
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
CODE_TOKEN_21
VS Code / GitHub Copilot (settings or mcp.json):
CODE_TOKEN_22
For full documentation, see server/src/mcp/README.md.
The REST API is available at http://localhost:3001/api
CODE_TOKEN_23
Response: CODE_TOKEN_24
Get Folder Tree
CODE_TOKEN_25
Response: CODE_TOKEN_26
Create Folder
CODE_TOKEN_27
Example: CODE_TOKEN_28
Delete Folder
CODE_TOKEN_29
Example: CODE_TOKEN_30
Rename Folder
CODE_TOKEN_31
Example: CODE_TOKEN_32
List Pages in Folder
CODE_TOKEN_33
Response: CODE_TOKEN_34
Get Page Content
CODE_TOKEN_35
Response: CODE_TOKEN_36
Example: CODE_TOKEN_37
Create Page
CODE_TOKEN_38
Example: CODE_TOKEN_39
Update Page
CODE_TOKEN_40
Example: CODE_TOKEN_41
Delete Page
CODE_TOKEN_42
Example: CODE_TOKEN_43
Rename Page
CODE_TOKEN_44
Example: CODE_TOKEN_45
Move Page
CODE_TOKEN_46
Example: CODE_TOKEN_47
make clean && make installMIT
Made with ❤️ for taking better notes
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 bocan/codex 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: