> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-pro.ayaka.space/on-premises/zh-tw/ru-men-zhi-nan/what-is-the-overleaf-toolkit.md).

# 什麼是 Overleaf Toolkit？

Overleaf Toolkit 是建議用於 Community Edition、Server Pro 或 Overleaf Pro 的本機安裝部署方式；其設計可配合最常見的環境：單一實體伺服器或虛擬機器。Toolkit 使用 `docker compose` 用來管理伺服器的 Docker 容器，並提供一組包裝 `docker` 指令，以協助處理管理 Overleaf 本機版較為技術性的部分。

#### 這個 `bin/docker-compose` 包裝器

這個 `bin/docker-compose` 腳本是對 `docker compose`。它會從 `config/` 目錄載入設定，然後再呼叫 `docker compose` 並使用傳遞給腳本的任何引數。

你可以將 `bin/docker-compose` 視為 `docker compose` 你電腦上安裝的程式的透明包裝器。

範例：

{% code title="檢查執行中的容器" %}

```bash
$ bin/docker-compose ps
```

{% endcode %}

#### 便利輔助工具

除了 `bin/docker-compose`之外，Toolkit 還提供方便的腳本來協助常見工作：

* `bin/up`：快捷方式為 `bin/docker-compose up`
* `bin/start`：快捷方式為 `bin/docker-compose start`
* `bin/stop`：快捷方式為 `bin/docker-compose stop`
* `bin/shell`：在 **sharelatex** 容器內啟動 shell
* `bin/doctor`：用來收集安裝與部署資訊的腳本。請參閱下方的「檢查您的伺服器」一節
* `bin/mongo`：在 **mongo** 容器，並切換到正確的資料庫（**sharelatex**)
* `bin/backup-config`：建立目前設定的副本（zip 或 tar），並將其儲存在你選擇的目標目錄中
* `bin/logs`：檢視／追蹤服務記錄
* `bin/error-logs`：檢視／追蹤服務錯誤記錄
* `bin/rename-env-vars-5-0`：用於更新 **config/variables.env** （從 ShareLaTeX 重新品牌化為 Overleaf）
* `bin/rename-rc-vars`：用於更新 **config/overleaf.rc** （從 ShareLaTeX 重新品牌化為 Overleaf）
* `bin/run-script`：用來簡化執行儲存在 **sharelatex** 容器內啟動 shell
* `bin/upgrade`：協助執行執行個體升級。腳本會檢查 Toolkit 更新（透過 git），並提供拉取變更；也會檢查最新的 Docker 映像版本，並提供更新。它提供逐步確認、備份目前設定的選項，並處理停止／啟動 Docker 服務。更多資訊請參閱「升級您的部署」：<https://docs.overleaf.com/on-premises/maintenance/upgrading-your-deployment>

{% hint style="info" %}
如果你希望在不連接 Docker 記錄的情況下執行執行個體，可以執行 `bin/up -d` 以分離模式執行。
{% endhint %}

#### 檢查您的伺服器

Overleaf Toolkit 包含一個方便的腳本，稱為 `bin/doctor` 它會產生一份報告，指出任何未滿足的相依項。

在繼續之前，請執行 `bin/doctor` 腳本，並檢查一切是否正常運作：

{% code title="執行 Overleaf Doctor" %}

```bash
bin/doctor
```

{% endcode %}

範例輸出（已截斷／示意）：

<details>

<summary>bin/doctor 的範例輸出</summary>

```
====== Overleaf Doctor ======
- 主機資訊
    - Linux
    - 「lsb_release -a」的輸出：
            沒有可用的 LSB 模組。
            發行版 ID:     Ubuntu
            描述:        Ubuntu 22.04.5 LTS
            版本:    22.04
            代號:   jammy
- 相依項
    - bash
        - 狀態：已存在
        - 版本資訊：5.1.16(1)-release
    - docker
        - 狀態：已存在
        - 版本資訊：Docker version 27.3.1, build ce12230
    - realpath
        - 狀態：已存在
        - 版本資訊：realpath (GNU coreutils) 8.32
    - perl
        - 狀態：已存在
        - 版本資訊：5.034000
    - awk
        - 狀態：已存在
        - 版本資訊：GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
    - openssl
        - 狀態：已存在
        - 版本資訊：OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
    - docker compose
        - 狀態：已存在
        - 版本資訊：Docker Compose version v2.29.7
- Docker Daemon
    - 狀態：已啟動
====== 設定 ======
- config/version
    - 狀態：已存在
    - 版本：5.1.1
- config/overleaf.rc
    - 狀態：已存在
    - 值
        - OVERLEAF_DATA_PATH: data/overleaf
        - OVERLEAF_LOG_PATH: data/overleaf/logs
        - SERVER_PRO: true
            - 已登入 quay.io: true
        - SIBLING_CONTAINERS_ENABLED: true
        - OVERLEAF_LISTEN_IP: 0.0.0.0
        - OVERLEAF_PORT: 80
        - MONGO_ENABLED: true
        - MONGO_IMAGE: mongo
        - MONGO_VERSION: 6.0
        - MONGO_DATA_PATH: data/mongo
        - REDIS_ENABLED: true
        - REDIS_IMAGE: redis:6.2
        - REDIS_DATA_PATH: data/redis
- config/variables.env
    - 狀態：已存在
    - 值
        - OVERLEAF_FILESTORE_BACKEND: fs
        - OVERLEAF_HISTORY_BACKEND: fs
====== 警告 ======
- 無，全部正常
====== 結束 ======
```

</details>

如果有任何相依項缺失，doctor 會印出警告。如果你遇到問題，請先執行 `bin/doctor` 並檢查其輸出是否有警告。

{% hint style="info" %}

* 免費 Community Edition 的使用者應在 GitHub 上提出 issue：<https://github.com/overleaf/toolkit/issues>
* Server Pro 的使用者應聯絡支援：mailto:<support+serverpro@overleaf.com>

在這兩種情況下，請在你的訊息中附上 `bin/doctor` 的輸出。
{% endhint %}


---

# 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://overleaf-pro.ayaka.space/on-premises/zh-tw/ru-men-zhi-nan/what-is-the-overleaf-toolkit.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.
