Skip to content

How-ToGPU

How to Use LibreOffice Writer With a Local AI Model via Ollama and Localwriter

LibreOffice has no built-in AI, but the free localwriter extension adds AI rewriting and text continuation to Writer using a model on your own PC. We show how to install it, connect it to Ollama and use its Edit and Extend Selection commands.

By , Systems & Technical Editor

4 min read

How to Use LibreOffice Writer With a Local AI Model via Ollama and Localwriter

LibreOffice has no built-in AI assistant, but a free extension called localwriter adds two AI editing commands to Writer and points them at a language model running on your own PC. Nothing in your document has to leave the machine, which makes it a sensible option for confidential letters, reports and drafts.

It is based on the localwriter README and releases page on GitHub, read on 2 December 2026.

What localwriter does

The developer describes localwriter as a LibreOffice Writer extension "that enables inline generative editing with local inference". It works with models served by Ollama or text-generation-webui, and it adds two commands:

  • Extend Selection (Ctrl + Q): the model predicts what comes after the text you have selected. The README suggests using it to continue a story or email from a prompt, add items to a list, or summarise the selected text.

  • Edit Selection (Ctrl + E): a dialog box asks for an instruction, such as "make this more formal" or "translate this into French", and the selected text is replaced with the edited version.

Those are the only two commands. The README doesn't describe a chat sidebar or whole-document analysis. It is a quick way to rewrite or continue text in place.

The extension is open source under the Mozilla Public License 2.0. At the time of writing, the newest build on the releases page was v0.0.8, published on 31 August 2025, so expect a small hobby project rather than a polished commercial add-in.

What you need

  • LibreOffice on Windows, macOS or Linux.

  • Ollama, the easiest backend according to the README. Our guide to installing Ollama on Linux covers Linux. On Windows and macOS, use the installer from ollama.com.

  • A model that fits your hardware. For general writing, a small instruction-tuned model is a sensible start; the README says Gemma 3 "isn't bad". How big a model you can run depends on your RAM and VRAM, which we explain in how much RAM you need for local AI.

Step 1: Install Ollama and download a model

  1. Install Ollama and make sure it is running. By default it serves its API on port 11434.

  2. Download a model from a terminal, for example ollama pull gemma3.

  3. Run ollama list and note the exact model name and tag, such as gemma3:latest. You will need to type it into localwriter later.

If you have a graphics card, check that Ollama is actually using it. Writing help feels much slower on the CPU. Our guide on how to check if Ollama is using your GPU shows how.

Step 2: Install the localwriter extension

  1. Download the latest .oxt file from the localwriter releases page on GitHub.

  2. Open LibreOffice and go to Tools > Extensions.

  3. Click Add, select the downloaded .oxt file and follow the prompts.

  4. Restart LibreOffice if prompted. A localwriter menu should appear in Writer's menu bar, with Extend Selection, Edit Selection and Settings.

Step 3: Point localwriter at Ollama

Open localwriter > Settings and fill in the main fields:

  • Endpoint URL: http://localhost:11434 (Ollama's default port). The README says this became the default in version 0.0.9, so on older builds you may need to type it yourself.

  • Model: type the model name exactly as ollama list shows it. The README says setting the model name manually "is required for Ollama to work".

  • API Key: leave this blank for a local Ollama server.

  • API Type: completions is the default. Switch to chat for servers that offer a /chat/completions endpoint.

There are also token limits and system prompts for each command. A short system prompt such as "Reply in British English and keep the original meaning" helps keep edits consistent. localwriter saves its settings to a localwriter.json file, which on Windows is at %APPDATA%\LibreOffice\4\user\localwriter.json.

Step 4: Use it in a document

  1. Select a paragraph and press Ctrl + E. Type an instruction, such as "shorten this to two sentences", and confirm. The selection is replaced with the model's version.

  2. To continue a draft, select the opening lines and press Ctrl + Q. The model's continuation is added after your text.

  3. If you don't like the result, try Undo (Ctrl + Z), and save a copy of important documents before making big edits. Always read AI edits before you send a document. Small local models can change meaning or invent details.

Using LM Studio or another server instead

localwriter also supports text-generation-webui through its OpenAI-compatible API (the README uses http://localhost:5000). The settings include switches for OpenAI-compatible endpoints and for Open WebUI, which changes the API path, so other local servers that follow the OpenAI format should be usable too. We haven't confirmed each one ourselves.

Troubleshooting

  • Nothing happens or you get an error: check that Ollama is running and the endpoint uses port 11434. Then check that the model name matches ollama list exactly.

  • Very slow responses: use a smaller model, or check that the model fits in your graphics card's VRAM. Our guide to keeping Ollama models loaded also saves the wait for a model to reload after it has been idle.

  • You want a full office suite with AI chat: ONLYOFFICE Desktop Editors has a more complete AI add-on that also works with Ollama. See our ONLYOFFICE AI vs LibreOffice localwriter comparison and our best office and email apps with local AI. For the two suites in general, see LibreOffice vs ONLYOFFICE.

The bottom line

Localwriter is the simplest way to add private, local AI rewriting to LibreOffice Writer. Install Ollama and a small model, add the .oxt extension, set the endpoint to localhost:11434 and type the model name by hand, then use Ctrl + E to edit and Ctrl + Q to continue text. It only covers those two commands, and the extension hasn't had a release since August 2025.

Sources

  1. 01localwriter README (GitHub, balisujohn/localwriter)
  2. 02localwriter releases (GitHub)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Office and Email Apps With Local AI in 2026

Best Picks

Best Office and Email Apps With Local AI in 2026

Want AI help with documents and email without sending them to the cloud? We pick the best free office and email apps that work with local models via Ollama or LM Studio: ONLYOFFICE, Thunderbird with ThunderAI, LibreOffice with localwriter and PowerToys.

Hannah Vance5 min