> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/zh-cn/an-zhuang/using-the-github-codespace.md).

# 使用 GitHub Codespace

设置你的 Overleaf Pro 最简单的方法是使用 GitHub Codespace，其中所有环境变量都已预先配置好，确保你可以开箱即用。

{% hint style="warning" %}
当你使用 GitHub Codespaces 运行 Docker 容器时，Codespace 不会自动关闭，并且会继续被 **计费**。有关 GitHub Codespaces 的计费规则，请参阅 [github codespaces 计费规则](https://docs.github.com/en/billing/concepts/product-billing/github-codespaces).

要管理你的 GitHub Codespaces，请访问 <https://github.com/codespaces>。当你不再需要它时，请及时删除你的 Codespace。
{% endhint %}

我们已经 **预先配置了** 以下功能：

* [x] 模板系统
* [x] 公开注册
* [x] 沙箱编译
* [x] Overleaf 的 Git Bridge
* [x] 审阅面板

{% stepper %}
{% step %}

### 创建你的 GitHub Codespace

点击下面的按钮来创建你的 GitHub Codespace。就服务器配置而言， **2 核 8 GB 内存** 通常足以满足个人日常编辑。如果你计划与 **小团队**协作，我们建议选择 **4 核或更多**.

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ayaka-notes/overleaf)
{% endstep %}

{% step %}

### 初始化 Overleaf 实例

当你的 codespace 准备就绪后，请在 bash 中运行以下命令来初始化你的 overleaf 实例。

{% code title="bash" %}

```bash
./init.sh
```

{% endcode %}

{% hint style="info" %}
你可能需要至少等待 3 分钟，我们会拉取你所需的所有 docker 镜像。
{% endhint %}

<figure><img src="/files/d9bec0f87a14edeff8588a588e636987599c5434" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 使 80 端口可用

切换到 **Ports** 选项卡，然后按照以下步骤将 80 端口设为公开。

<figure><img src="/files/e3f65c07c8aca74950ec4ea100094f31865ebe1a" alt=""><figcaption></figcaption></figure>

之后，你可以点击 **转发地址** 来访问你的 overleaf 实例。你可能需要添加 `/launchpad` 来访问 overleaf 欢迎页面。
{% endstep %}

{% step %}

### 创建你的管理员账户

输入你的管理员账户和密码，然后点击注册按钮。

<figure><img src="/files/7bdec7ab316bc02e3ff7336f4e74daf31986549a" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 享受写作

现在，尽情享受你的 $$\LaTeX$$ 写作吧！

<figure><img src="/files/f3b61f7b430f7a7412348fe28dbf6f19183a9626" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/zh-cn/an-zhuang/using-the-github-codespace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
