> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/tech/en/platform-development/onlyoffice-online-editing.md).

# Online Office File Editing in the File Library (ONLYOFFICE Docs Integration)

Network connection directions and requirements for online Office editing in the file library (ONLYOFFICE Docs), for customer network administrators planning firewall rules and domain allowlists. Curre

Office files in the file library (`.docx`, `.xlsx`, `.pptx`) can be edited online in a browser. The editor is provided by the ONLYOFFICE Document Server operated by MaiAgent (referred to below as the “document server”). After users close the editor, the edited file is saved back to the file library as a new version.

This page is for customer network administrators and information security staff. It explains where users' browsers need to connect, how documents flow between components, and the requirements for use. For editing instructions, see [File Library: Online Editing](https://docs.maiagent.ai/work/file-library#online-editing) in the user manual. This feature is currently available only on SaaS; for on-premises deployments, see the [note at the end of this page](#on-premise-deployment).

## Service Components <a href="#components" id="components"></a>

| Component                                    | Role                                                                                                                     |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Document server (ONLYOFFICE Document Server) | Provides the browser editor and collaborative editing; notifies MaiAgent to retrieve the finished file when editing ends |
| MaiAgent platform                            | Issues editing sessions, receives save notifications, and writes the edited file as a new version                        |
| Object storage                               | Stores original files and all versions in the file library                                                               |

## Connection Directions <a href="#network-paths" id="network-paths"></a>

### Connections to Allow on the Client Side <a href="#client-network" id="client-network"></a>

| Source → Destination                          | Purpose                                                             |
| --------------------------------------------- | ------------------------------------------------------------------- |
| User browser → MaiAgent admin domain (HTTPS)  | Opens the file library and obtains an editing session               |
| User browser → Document server domain (HTTPS) | Loads the editor and connects to the document server during editing |

The editor loads from the document server's own domain, rather than the MaiAgent admin domain. If your company network uses a domain allowlist, proxy server, or SSL inspection, also allow the document server domain. Contact your MaiAgent representative for the domain.

### Connections Within the Platform <a href="#platform-network" id="platform-network"></a>

All of the following connections take place within the environment operated by MaiAgent. Customers do not need to configure them; they are listed to explain document flows for security assessments:

| Source → Destination                | Purpose                                                                                          |
| ----------------------------------- | ------------------------------------------------------------------------------------------------ |
| Document server → Object storage    | Reads the original file through a short-lived download URL when opening a document               |
| Document server → MaiAgent platform | Sends a save notification when editing ends                                                      |
| MaiAgent platform → Document server | Performs health checks, retrieves edited files, and requests a save after users close the editor |

Editing configurations and save notifications between the platform and the document server are authenticated with signatures using a shared secret.

## Requirements <a href="#requirements" id="requirements"></a>

* The organization must have the file library and online editing enabled. Otherwise, the file menu will not show an editing option.
* Members need editing permission for the space.
* Only `.docx`, `.xlsx`, and `.pptx` files up to 10 MB per file are supported. Online editing is unavailable for legacy formats (`.doc`, `.xls`, `.ppt`).
* Downloading and printing are disabled in the editor. Files must be downloaded from the file library to maintain access controls.
* Autosaves during editing do not create versions. The content is saved back as a new version only after everyone closes the editor.

## When the Service Is Unavailable <a href="#availability" id="availability"></a>

Before offering the editing option, the platform checks whether the document server is healthy (the result is cached for approximately 30 seconds). If the check fails, the Office editing option is disabled. Opening the editor directly displays a message that the service is temporarily unavailable and asks users to upload a new version instead. Once the document server recovers, the editing option is automatically restored within approximately 30 seconds.

## Alternative Method <a href="#fallback" id="fallback"></a>

If the editing service is unavailable or a file exceeds the size limit, edit it on your computer and use <mark style="color:blue;">Upload New Version</mark> in the file library to upload it. This method does not depend on the document server.

If saving back fails, <mark style="color:blue;">Save failed. Click here to retry</mark> appears next to the file name, and the relevant members also receive an in-app announcement. Click the message to retry saving the file back.

## On-Premises Version <a href="#on-premise-deployment" id="on-premise-deployment"></a>

{% hint style="info" %}
Online Office editing is currently available only on SaaS. Contact your MaiAgent representative for the schedule for including it in the on-premises version.
{% 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/tech/en/platform-development/onlyoffice-online-editing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
