> 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/vi/cai-dat/air-gapped-offline-deployments.md).

# Triển khai cách ly mạng/ngoại tuyến

Overleaf Community Edition và Overleaf Pro đều đã được thiết kế để hoạt động ngoại tuyến, điều đó có nghĩa là không phải lúc nào cũng có thể truy cập registry ghcr.io để kéo về các `sharelatex` , `overleaf-pro` và các image TeX Live. Đây không phải là vấn đề vì Docker cung cấp các công cụ để xuất và nhập image, sẽ giúp bạn với một triển khai ngoại tuyến/air-gapped.

Ở mức tổng quan, bạn sẽ tải xuống các image cần thiết trên một thiết bị có kết nối Internet, xuất chúng sang một thiết bị di động (hoặc truyền chúng bằng SCP/Rsync), và nhập chúng trên máy chủ air-gapped.

Để làm điều này, bạn cần hoàn thành các bước sau:

* Kéo tất cả các image cần thiết ( `overleaf-pro`, `git-bridge`, `mongo`, `redis` + bất kỳ [image TeX Live](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/server-pro-only-configuration/sandboxed-compiles#available-tex-live-images) để sử dụng với [Biên dịch trong môi trường sandbox](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/server-pro-only-configuration/sandboxed-compiles)) trên một máy có kết nối Internet
  * `docker pull ghcr.io/ayaka-notes/overleaf-pro:6.1.2`
  * `docker pull quay.io/sharelatex/git-bridge:6.1.2` (thẻ phải giống với `overleaf-pro`)
  * `docker pull mongo:6` (Vui lòng đổi thành phiên bản thực)
  * `docker pull redis:6.2` (Vui lòng đổi thành phiên bản thực)
  * `docker pull ghcr.io/ayaka-notes/texlive-full:2024.1` (Vui lòng đổi thành phiên bản thực)
* Đối với **mỗi** image đã kéo về, sau đó bạn cần xuất chúng ra một tệp .tar. Ví dụ, `docker save ghcr.io/ayaka-notes/overleaf-pro:6.1.2 > overleaf-pro:6.1.2.tar`
* Bằng phương pháp bạn ưa thích, hãy chuyển `các tệp .tar` từ máy có kết nối Internet của bạn sang máy chủ ngoại tuyến/air-gapped
* Với mỗi tệp .tar, hãy dùng `docker load` lệnh để nạp image từ tệp .tar. Ví dụ, `docker load < overleaf-pro:6.1.2.tar`
* Cuối cùng, chạy `docker images` lệnh để xem/xác nhận việc nạp image đã thành công và chúng có sẵn

{% hint style="danger" %}
Theo mặc định, khi bạn chạy `bin/up` lệnh, Toolkit sẽ cố gắng tự động kéo về từng image TeX Live được thiết lập thông qua `ALL_TEX_LIVE_DOCKER_IMAGES` trong `config/variables.env`. Vì triển khai của bạn là air-gapped nên thao tác này sẽ thất bại -- bạn có thể ngăn điều này bằng cách sử dụng `SIBLING_CONTAINERS_PULL=false` trong `config/overleaf.rc`.
{% 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/vi/cai-dat/air-gapped-offline-deployments.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.
