How to use Ollama AI models offline in ONLYOFFICE

Written by
Audrey Miles
Updated on:June-21st-2025
Recommendation

Leverage the integration of ONLYOFFICE and Ollama AI models to achieve efficient offline text editing with AI support.

Core content:
1. Introduce advanced AI features of ONLYOFFICE editors by integrating Ollama AI models
2. Locally deploy AI models to protect data privacy and meet compliance requirements
3. Install Ollama and start the local AI server to implement AI plugin settings for ONLYOFFICE

Yang Fangxian
Founder of 53A/Most Valuable Expert of Tencent Cloud (TVP)



The Importance of Local AI Models

Local deployment of AI models ensures that sensitive documents always remain on your device, effectively protecting data confidentiality and meeting compliance requirements.  

Running offline not only avoids network delays, but also   provides fast response for tasks such as summary generation, translation, and content creation.

Ollama provides a lightweight and extensible framework that supports a variety of local large language models (LLMs), including  the Ollama  series, DeepSeek , Mistral, etc., allowing you to freely choose the model you need.

Step 1. Install Homebrew (optional)

First, install  Homebrew ( https://brew.sh/ ). This is a package manager on macOS and Linux systems that simplifies the installation process of command line tools and does not require sudo permissions. Open the terminal and run the following command to start the installation:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2: Install Ollama

To install Ollama, use the official installation script:

curl -fsSL https: //ollama.c om/ install.sh | sh

Alternatively, if you use Homebrew, you can install Ollama by running:

brew install ollama

Once installed, Ollama provides a series of commands for managing, viewing, and running local models on your device.

Step 3. Start the local AI server

In order for ONLYOFFICE to communicate with the local Ollama server, it needs to be configured to accept requests from web applications.

Run in terminal:

export OLLAMA_ORIGINS=http: //*,https://*

To start Ollama now and restart at login:

brew services start ollama

Or, if you don't want/need a background service, you can just run:

ollama serve

Step 4. Download and run the model

Open a new terminal window and pull the model you need. For example, to install and run Llama 3.2, execute the following command:

ollama run llama3.2

After the download is complete, the model will be automatically launched locally. You can install as many models as you want, and each model will appear in the model selection list of ONLYOFFICE. For more available models, visit  the Ollama official model repository : https://github.com/ollama/ollama

Note: Before installing, make sure your computer has enough memory and disk space to install the model.

Step 5: Set up AI plugin in ONLYOFFICE

First, install AI plugin for ONLYOFFICE editors. If you already have AI plugin installed, follow the steps below.

Open any ONLYOFFICE editor in a web browser. Go to Plugins- >Plugin Manager, find  the AI  ​​plugin, and click Install.

Activate the plugin via Plugins-  >  Backend Plugins .

Step 6 : Add the Ollama model

Navigate to the AI ​​tab in ONLYOFFICE and click the Settings icon. Under Edit AI model , click the + icon.  

Select Ollama as the provider and set the URL to  http://localhost:11434.

Select your installed model from the drop-down menu (e.g. llama3.2:latest) and confirm.

Step 7: Assign tasks to the Ollama model

Return to the AI ​​configuration page, select an installed AI model from the drop-down list to perform a specific task (such as text processing, summary generation, or code writing), and save your settings.

Now the selected model is connected and available in ONLYOFFICE editors.

How to use Ollama AI models with ONLYOFFICE editors

Once you have set up Ollama and connected the required models, you can use AI features directly in ONLYOFFICE editors. Click the AI ​​tab or right-click on selected text to access intelligent features such as paraphrase, explain, summarize, etc.  

After performing an action, you can choose to have the result replace the original text, add it as a comment , or insert it below the text.

You can use AI models to:

  • Generate new content or ideas for reports, blog posts or emails

  • Instantly summarize complex documents or articles

  • Translate text between languages

  • Improve writing clarity and grammar

  • Get quick coding help or examples (if supported by the model)

  • Explore the context and usage of terms in writing

Please note: AI-generated content is provided by third-party models, and ONLYOFFICE is not responsible for its accuracy. We recommend that you double-check results involving sensitive or critical tasks.