How to use Ollama AI models offline in ONLYOFFICE

15 May 2025By Dasha

Integrating Ollama’s local LLMs with the ONLYOFFICE editors brings cutting‑edge AI features directly into your editors, without sacrificing privacy or speed. Follow the steps above to unlock a powerful, offline AI assistant for all your text‑related workflows.

How to use Ollama AI models offline in ONLYOFFICE

Why local AI models matter

Local AI model deployment ensures that sensitive documents never leave your machine, preserving confidentiality and compliance with data regulations.

Running models offline eliminates network latency, delivering near‑instantaneous results for tasks like summarization, translation, and content generation.

You decide which models to run—Ollama provides a lightweight, extensible framework for various local LLMs, including the Ollama family, DeepSeek, Mistral, and more.

Step 1. Install Homebrew (Optional)

If you prefer using Homebrew to manage packages on macOS or Linux, install it by running:

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

If you choose to install Ollama using another method, you can skip this step.

Step 2. Install Ollama

To install Ollama, use the official installation script:

curl -fsSL https://ollama.com/install.sh | sh

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

brew install ollama

Once installed, Ollama exposes commands for serving, listing, inspecting, and running models on your machine.

Step 3. Launch the local AI server

To allow ONLYOFFICE to communicate with your local Ollama server, you’ll need to configure it to accept requests from web applications.

In the Terminal, run:

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 a model

Open another Terminal window and pull the model you’d like to use. For example, to install and run Llama 3.2:

ollama run llama3.2

This will download the model and start it locally. You can install as many models as you like. Each one will appear in the ONLYOFFICE model selection list. Explore more models on the official Ollama model list.

Note: Before the installation, be sure your machine has sufficient memory and disk space for models.

Step 5. Set up the AI plugin in ONLYOFFICE

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

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

How to use Ollama AI models offline in ONLYOFFICE

Activate the plugin via Plugins  -> Background plugins.

How to use Ollama AI models offline in ONLYOFFICE

Step  6. Add Ollama models

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

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

How to use Ollama AI models offline in ONLYOFFICE

Select your installed model (e.g., llama3.2:latest) from the dropdown and confirm.

Step  7. Assign tasks to Ollama models

Go back to the AI configuration. From the drop-down list, select the installed AI models that will perform these tasks, such as text processing, summarization, or code generation, and save the settings.

The model is now connected and ready for use in ONLYOFFICE editors.

How to use Ollama AI models with ONLYOFFICE editors

Once you’ve set up Ollama and connected your preferred models, you can start interacting with it directly from the ONLYOFFICE editors. Navigate to the AI tab or simply right-click any selected text to access AI-driven features.

Open the AI tab or right-click selected text to rephrase, explain, or summarize content. Choose how to insert the result: replace the original, add a comment, or place it below the text.

How to use Ollama AI models offline in ONLYOFFICE

You can use AI models to:

  • Generate new content or ideas for your reports, blog posts, or emails
  • Summarize complex documents or articles instantly
  • Translate text between languages
  • Improve writing clarity and grammar
  • Get quick coding help or examples (if the model supports it)
  • Explore context and usage of terms in your writing

Please note: The AI responses are generated by third-party models. ONLYOFFICE does not take responsibility for the accuracy of the content produced by these tools. Always double-check sensitive or mission-critical results.

Create your free ONLYOFFICE account

View, edit and collaborate on docs, sheets, slides, forms, and PDF files online.