How to use LM Studio with ONLYOFFICE for secure, local AI document editing
Artificial intelligence is changing the way we work — but most AI tools today come with a trade-off: you get speed and convenience, but you also send your data to external servers. For educators, businesses, NGOs, and anyone dealing with sensitive information, that’s not an acceptable risk.
That’s where the LM Studio and ONLYOFFICE combination comes in. By connecting a self-hosted AI model manager with a powerful, open-source office suite, you can have an AI assistant right inside your documents, spreadsheets, and presentations — all while keeping every bit of data on your own computer or server. This enhancement was implemented following a user request on our feedback portal and is designed to provide greater flexibility, security, and control.
In this guide, we’ll walk you through what LM Studio is, how to set it up, and how to connect it to ONLYOFFICE so you can start working smarter without compromising privacy.
What is LM Studio and why use it with ONLYOFFICE
LM Studio is a local AI model manager. It allows you to download, run, and manage large language models (LLMs) on your own hardware, whether that’s a laptop, a desktop PC, or a dedicated server. This means you can perform AI-powered tasks without relying on external APIs. That means the AI processing never leaves your machine — no cloud, no external servers, no risk of unexpected access.
When you integrate LM Studio with ONLYOFFICE, you bring that local AI power straight into your favorite document, spreadsheet, and presentation editors. The result? Seamless editing, summarizing, and generating content without exposing sensitive information to third parties.
Integration of LM Studio into your ONLYOFFICE desktop office suite lets you create your personal AI server, giving you the same power as online services, but with full data sovereignty. Let’s dive into the details.
Installing LM Studio
Before you can connect LM Studio to ONLYOFFICE, you’ll need to get it up and running on your device.
- Download the app for Windows, macOS, or Linux from the official LM Studio website.
- Install it like any standard desktop program.
- Launch it and choose a local folder where your AI models will be stored.
- Enable the API server and note the port number (e.g., http://127.0.0.1:1234).
Once installed, please make sure that your server is on. On the top left, please switch from Stopped to Running or simply press Cmd+R.
Consult the catalog to choose your AI model, pick one that suits your needs before you download it. For example, a general-purpose model for everyday tasks or a specialized one for summarizing text. LM Studio will handle the download and setup automatically.
At the end of this step, you have a fully functional local AI engine ready to connect to ONLYOFFICE Desktop Editors.
Setting up LM Studio’s Local API Server
You get to pick a model that will power your AI assistant. LM Studio can turn your computer into an API server that ONLYOFFICE can talk to.
To enable it:
- Open LM Studio and go to the Server tab, and right after that → the “Models” tab.
- Download an open-source LLM you want to use (LLaMA, Mistral, or any other supported model, for example: Meta Llama 3 8B for general work, or Phi-3 Mini for lightweight tasks).
Please note: Larger models usually provide better accuracy, but smaller ones run faster on lower-end hardware. You can always experiment to find the right balance. If your system has 8–16 GB of RAM, choose the 7–8B (Q4_K_M) model. For powerful GPUs or Apple Silicon, go for 13B or larger. Remember: longer context requires more memory.
Once your chosen model is downloaded, it’s stored locally — meaning all processing happens right there on your machine. So, you’ve basically created your own private AI endpoint that ONLYOFFICE can send requests to — all staying on your own network. In short, this is the bridge between your AI model and your office suite.
Connecting LM Studio to ONLYOFFICE
ONLYOFFICE comes with a built-in AI plugin feature that works with various providers, and thanks to LM Studio, you can plug in your local AI as if it were any other service.
Here’s how:
- Open ONLYOFFICE Desktop Editors version 9.0.4 or higher (Document, Spreadsheet, or Presentation).
- Go to Plugins → Plugin Manager → Install or update the AI plugin
- Close the Plugin Manager and enable the AI plugin among Background Plugins.
- Go to the AI tab. Click Settings to open the configuration window.
- Click Edit AI models → Tap + to add one.
- Specify all the parameters (name, URL, etc.) and assign the tasks.
- Save your settings and test the connection.
From now on, whenever you open the AI assistant inside ONLYOFFICE, you’ll be using the model you chose in LM Studio without any internet connection required.
Using LM Studio with AI Agent in ONLYOFFICE
Now that the connection is live, you can use AI directly inside your documents:
- Press Ctrl + / to open the AI prompt or ⌘ + / if you use macOS
- Ask it to perform a needed action (summarize a long report, translate a paragraph, create quiz questions from your lecture notes, suggest formulas in spreadsheets, rewrite a paragraph for clarity, and so on)
- Press Ctrl + Alt + / (⌘ + ⌥ + / for macOS) to reset the conversation or Esc to close it
Real-world examples for different users
AI isn’t just for programmers or tech hobbyists anymore; it’s a tool that can simplify everyday work for all kinds of people. Whether you’re in a classroom, an office, or a government agency, the LM Studio + ONLYOFFICE combination can fit right into your workflow.
For example:
- Educators can instantly prepare lesson outlines, quizzes, or concise summaries for their classes.
- Students can rework their notes into clearer study guides, translate foreign-language materials, or get quick explanations of difficult concepts.
- Business teams can speed up report writing, polish meeting notes, or brainstorm fresh ideas together, all without leaving their secure environment.
- The government can use AI assistance for drafting and organizing sensitive documents without sending any information outside its network.
If your work involves creating, editing, or managing information, this setup can save you valuable time while keeping your data private.
Advantages of the LM Studio + ONLYOFFICE combo
When you put LM Studio and ONLYOFFICE together, you’re not just getting a clever add-on — you’re building a smarter, safer workspace. This pairing gives you:
- Privacy. All AI processing happens on your own hardware, with no third-party servers involved.
- Cost savings. Use open-source AI models without paying subscription fees.
- Flexibility. Choose the model that best suits your needs and switch whenever you want.
- Offline readiness. Keep working with AI even without an internet connection once the models are downloaded.
- Productivity. Access AI directly from your documents, spreadsheets, and presentations without juggling multiple apps.
The real value lies in getting enterprise-grade AI features, like smart text generation, instant summaries, and precise translations, while avoiding the privacy risks and high costs that usually come with them. You’re in control of both your tools and your data.
Conclusion
AI can make document editing, research, and collaboration faster and more efficient, but not at the cost of your privacy. With LM Studio providing local AI capabilities and ONLYOFFICE offering a powerful, familiar editing environment, you get the best of both worlds: modern AI features and complete data control.
Whether you’re an educator, a student, a business professional, or part of a public institution, this setup gives you the best of both worlds — powerful AI at your fingertips and your information safely in your hands.
FAQ: LM Studio + ONLYOFFICE Desktop Editors
Q. Do I need an internet connection to use LM Studio with ONLYOFFICE?
No. Once you’ve downloaded your chosen AI model in LM Studio, everything runs locally on your computer. This means you can use AI-powered features in ONLYOFFICE Desktop Editors even without internet access.
Q. Is my data sent to the cloud when I use local AI models?
Not at all. With LM Studio running locally, all document processing happens on your machine. No text, files, or prompts are uploaded to third-party servers, which ensures full privacy and compliance with strict data protection policies.
Q. What hardware do I need for smooth performance?
AI models vary in size and resource demands. As a general rule:
- 8–16 GB RAM is enough for smaller models like 7B–8B parameters.
- For larger models (13B+), a powerful GPU or Apple Silicon chip is recommended.
More RAM and GPU power will allow for faster responses and the use of long-context models.
Q. Can I switch between different AI models for different tasks?
Yes. LM Studio lets you install and manage multiple models at once. You can easily swap them depending on your needs — for example, using a smaller model for quick text edits and a larger one for complex summaries or creative writing.
Q. Is LM Studio compatible with all ONLYOFFICE features?
While AI can assist with a wide range of tasks, like text generation, rewriting, summarization, translations, OCR, and more, the actual editing, formatting, and collaboration features remain fully native to ONLYOFFICE. LM Studio simply adds the AI layer on top of your familiar workflow.
Useful links
How to connect LocalAI to ONLYOFFICE on Linux
How to use Ollama AI models offline in ONLYOFFICE
Connect AI with ONLYOFFICE editors: Stability AI / Mistral AI / Groq / Together AI / Ollama / DeepSeek / Anthropic / Gemini AI
Create your free ONLYOFFICE account
View, edit and collaborate on docs, sheets, slides, forms, and PDF files online.