> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 取得協助

### Doctor 診斷工具

Overleaf Toolkit 附帶一個方便的 `doctor` 腳本，可協助偵錯。執行 `bin/doctor` 後，該腳本會列印出你的主機環境、設定，以及 Toolkit 所需相依項目的相關資訊。這些輸出也能協助我們診斷你的 Ayakaleaf Pro 安裝所遇到的問題。

<Info>
  Overleaf Pro 的使用者可以[在 GitHub 上提出 issue](https://github.com/ayaka-notes/overleaf/issues)。

  建議在你的訊息中附上 `bin/doctor` 腳本的輸出內容。
</Info>

### 執行 Doctor 診斷

執行 doctor 腳本：

```bash title="Run doctor" theme={null}
bin/doctor
```

你會看到類似以下範例的輸出。

<Accordion title="完整輸出範例">
  ```text theme={null}
  ====== Overleaf Doctor ======
  - Host Information
      - Linux
      - Output of 'lsb_release -a':
              No LSB modules are available.
              Distributor ID:	Ubuntu
              Description:	Ubuntu 22.04.5 LTS
              Release:	22.04
              Codename:	jammy
  - Dependencies
      - bash
          - status: present
          - version info: 5.1.16(1)-release
      - docker
          - status: present
          - version info: Docker version 28.0.4, build b8034c0
      - docker compose
          - status: present
          - version info: Docker Compose version v2.34.0
      - realpath
          - status: present
          - version info: realpath (GNU coreutils) 8.32
      - perl
          - status: present
          - version info: 5.034000
      - awk
          - status: present
          - version info: mawk 1.3.4 20200120
  - Docker Daemon
      - status: up
  ====== Configuration ======
  - config/version
      - status: present
      - version: 5.4.0
  - config/overleaf.rc
      - status: present
      - values
          - OVERLEAF_DATA_PATH: data/overleaf
          - OVERLEAF_LOG_PATH: data/overleaf/logs
          - SERVER_PRO: true
          - SIBLING_CONTAINERS_ENABLED: true
              - logged in to quay.io: true
          - MONGO_ENABLED: true
          - REDIS_ENABLED: true
  - config/variables.env
      - status: present
      - values
          - OVERLEAF_FILESTORE_BACKEND: fs
          - OVERLEAF_HISTORY_BACKEND: fs

  ====== Warnings ======
  - None, all good
  ====== End ======
  ```
</Accordion>

### 主機資訊

`Host Information` 區段包含執行 Toolkit 之機器的相關資訊（例如 Linux 發行版與版本）。

<Accordion title="主機資訊輸出範例">
  ```text theme={null}
  - Host Information
      - Linux
      - Output of 'lsb_release -a':
              No LSB modules are available.
              Distributor ID:	Ubuntu
              Description:	Ubuntu 22.04.5 LTS
              Release:	22.04
              Codename:	jammy
  ```
</Accordion>

### 相依項目

`Dependencies` 區段列出 Toolkit 運作所需的工具。若工具存在，會標示為 `status: present` 並附上版本資訊；若缺少，則會標示為 `status: MISSING!`，並在 `doctor` 輸出的最下方加入一則警告。

<Accordion title="相依項目輸出範例（存在）">
  ```text theme={null}
  - docker
      - status: present
      - version info: Docker version 28.0.4, build b8034c0
  ```
</Accordion>

<Accordion title="相依項目輸出範例（缺少）">
  ```text theme={null}
  - docker
      - status: MISSING!
  ```
</Accordion>

如果缺少任何相依項目，Toolkit 幾乎肯定無法運作。

### 設定

`Configuration` 區段包含 `config/` 目錄中檔案的相關資訊。對於 `config/overleaf.rc`，doctor 會列印出一些關鍵值。缺少的檔案會標示為 `status: MISSING!`，並在 `doctor` 輸出的最下方加入一則警告。

<Accordion title="設定輸出範例">
  ```text theme={null}
  ====== Configuration ======
  - config/version
      - status: present
      - version: 5.4.0
  - config/overleaf.rc
      - status: present
      - values
          - OVERLEAF_DATA_PATH: /tmp/overleaf
          - SERVER_PRO: false
          - MONGO_ENABLED: false
          - REDIS_ENABLED: true
  - config/variables.env
      - status: MISSING!
  ```
</Accordion>

上述範例的說明：

* `OVERLEAF_DATA_PATH` 設為 `/tmp/overleaf`，可能不是存放重要資料的安全位置。
* `MONGO_ENABLED: false` 表示 Toolkit 不會自行佈建 MongoDB；如有需要，請確保 `MONGO_URL` 指向外部管理的 MongoDB。
* 範例中缺少 `config/variables.env`。

### 警告

`Warnings` 區段彙整了 doctor 腳本發現的問題。若沒有任何問題，此區段也會加以說明。

<Accordion title="警告輸出範例">
  ```text theme={null}
  ====== Warnings ======
  - configuration file variables.env not found
  - rc file, OVERLEAF_DATA_PATH not set
  ====== End =======
  ```
</Accordion>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.