# Best open source AI tools for law firms

> For law firms, the core of a private AI stack is Ollama for running open models locally, LibreChat for a private chat interface and RAGFlow for answering questions over your documents, all running on your own servers so client files can stay on your infrastructure. Each pick was chosen by hand for its job and is shown with GitHub data from October 2026.

## Key facts

| Fact | Value |
|---|---|
| Question | What are the best open source AI tools for lawyers? |
| Picks | 19 |
| Top pick | Ollama (182,289 stars) |
| Data as of | Oct 7, 2026 |
| Canonical URL | https://appsgit.com/best/ai-tools-for-law-firms |

Client confidentiality is the obvious reason for a law firm to keep AI in-house. A self-hosted stack lets lawyers search and summarise their own documents with open models on the firm's servers.

## Run models on your own hardware

Model runners that serve open-weight LLMs on your own CPU or GPU, with an OpenAI-compatible API the other tools can call.

- [Ollama](https://appsgit.com/apps/ollama) (182,289 stars, MIT, Go, Docker, AI features): Ollama has 182,289 GitHub stars, uses the MIT license, ships a Docker image and had 1,083 commits in the last year; it replaces ChatGPT.
- [LocalAI](https://appsgit.com/apps/localai) (49,405 stars, MIT, Go, Docker, AI features): LocalAI has 49,405 GitHub stars, uses the MIT license, ships a Docker image and had 3,438 commits in the last year; it replaces ChatGPT.
- [LLM Harbor](https://appsgit.com/apps/llm-harbor) (3,237 stars, Apache-2.0, Python, Docker, AI features): LLM Harbor has 3,237 GitHub stars, uses the Apache-2.0 license, ships a Docker image and had 1,288 commits in the last year.

## Private chat interface

Chat front ends for your team. Point them at a local model and prompts never leave your network.

- [LibreChat](https://appsgit.com/apps/librechat) (45,318 stars, MIT, TypeScript, Docker, AI features): LibreChat has 45,318 GitHub stars, uses the MIT license, ships a Docker image and had 2,074 commits in the last year; it replaces ChatGPT and Lovable.
- [Open-WebUI](https://appsgit.com/apps/open-webui) (154,037 stars, Open WebUI License, source-available, Python, Docker, AI features): Open-WebUI has 154,037 GitHub stars, is source-available under the Open WebUI License (BSD-3-Clause plus branding clause) (not an open-source license), ships a Docker image and had 4,746 commits in the last year; it replaces ChatGPT and Lovable.
- [LobeHub](https://appsgit.com/apps/lobehub) (83,008 stars, LobeHub Community License, source-available, TypeScript, Docker, AI features): LobeHub has 83,008 GitHub stars, is source-available under the LobeHub Community License (not an open-source license), ships a Docker image and had 7,488 commits in the last year; it replaces ChatGPT and Lovable.
- [Onyx Community Edition](https://appsgit.com/apps/onyx-community-edition) (32,332 stars, MIT, Python, Docker, AI features): Onyx Community Edition has 32,332 GitHub stars, uses the MIT license, ships a Docker image and had 5,771 commits in the last year.

## Questions over your documents (RAG)

Retrieval-augmented generation: index your own files and ask questions about them.

- [RAGFlow](https://appsgit.com/apps/ragflow) (91,708 stars, Apache-2.0, Go, Docker, AI features): RAGFlow has 91,708 GitHub stars, uses the Apache-2.0 license, ships a Docker image and had 5,821 commits in the last year.
- [AnythingLLM](https://appsgit.com/apps/anythingllm) (66,738 stars, MIT, JavaScript, Docker, AI features): AnythingLLM has 66,738 GitHub stars, uses the MIT license, ships a Docker image and had 887 commits in the last year; it replaces ChatGPT.
- [Khoj](https://appsgit.com/apps/khoj) (37,565 stars, AGPL-3.0, Python, Docker, AI features): Khoj has 37,565 GitHub stars, uses the AGPL-3.0 license, ships a Docker image and had 120 commits in the last year; it replaces ChatGPT.

## Agents and workflows

Visual builders that chain models, tools and your own APIs into agents and automations.

- [Langflow](https://appsgit.com/apps/langflow) (155,530 stars, MIT, Python, Docker, AI features): Langflow has 155,530 GitHub stars, uses the MIT license, ships a Docker image and had 2,486 commits in the last year.
- [Dify.ai](https://appsgit.com/apps/dify-ai) (157,921 stars, Dify Open Source License, source-available, TypeScript, Docker, AI features): Dify.ai has 157,921 GitHub stars, is source-available under the Dify Open Source License (modified Apache 2.0) (not an open-source license), ships a Docker image and had 6,112 commits in the last year; it replaces ChatGPT and Lovable.
- [n8n](https://appsgit.com/apps/n8n) (206,738 stars, Sustainable Use License, source-available, TypeScript, Docker): n8n has 206,738 GitHub stars, is source-available under the Sustainable Use License 1.0 (not an open-source license), ships a Docker image and had 9,029 commits in the last year; it replaces Zapier and IFTTT.
- [Activepieces](https://appsgit.com/apps/activepieces) (24,913 stars, MIT, TypeScript, Docker, AI features): Activepieces has 24,913 GitHub stars, uses the MIT license, ships a Docker image and had 5,647 commits in the last year; it replaces Zapier and IFTTT.

## Speech and documents

Transcribe audio and turn scanned paper into searchable text before it goes into your AI stack.

- [whisper-asr-webservice](https://appsgit.com/apps/whisper-asr-webservice) (3,352 stars, MIT, Python, Docker, AI features): whisper-asr-webservice has 3,352 GitHub stars, uses the MIT license, ships a Docker image and had 31 commits in the last year.
- [Paperless-ngx](https://appsgit.com/apps/paperless-ngx) (46,308 stars, GPL-3.0, Python, Docker, AI features): Paperless-ngx has 46,308 GitHub stars, uses the GPL-3.0 license, ships a Docker image and had 1,625 commits in the last year.
- [Stirling-PDF](https://appsgit.com/apps/stirling-pdf) (93,634 stars, Apache-2.0, TypeScript, Docker): Stirling-PDF has 93,634 GitHub stars, uses the Apache-2.0 license, ships a Docker image and had 1,925 commits in the last year; it replaces Adobe Acrobat.

## What to connect it to

- [docassemble](https://appsgit.com/apps/docassemble) (989 stars, MIT, JavaScript, Docker): docassemble has 989 GitHub stars, uses the MIT license, ships a Docker image and had 253 commits in the last year.
- [Nextcloud](https://appsgit.com/apps/nextcloud) (37,003 stars, AGPL-3.0, PHP): Nextcloud has 37,003 GitHub stars, uses the AGPL-3.0 license and had 7,289 commits in the last year; it replaces Google Drive and Dropbox.

## How this list was made

- Apps were picked by hand from the appsgit catalog for each job, then checked against the snapshot: unknown or archived projects and projects with no commit in two years are dropped automatically.
- Inside each section the curated order is kept, most broadly useful first; an app appears only once on the page.
- Stars, license, Docker and activity facts come from the GitHub API as of October 2026.
- Source-available apps are labelled; they are not open source, so read their licenses before commercial use.

## FAQ

### Does self-hosted AI keep my data private?

It can. When the chat interface and RAG tools are pointed at a model running on your own server (for example through Ollama or LocalAI), prompts and documents are not sent to an outside AI provider, so client files stays on infrastructure you control. Several of these tools can also call cloud APIs, so check each connection you configure.

### Can I rely on AI answers for legal work?

Treat them as drafts. Language models can state wrong things confidently; RAG tools reduce that by quoting your own documents, but a lawyer still has to check every answer.

### Is Ollama free?

Yes. Ollama is open-source software released under the MIT license, so you can self-host it at no cost. You only pay for the server it runs on, and some projects also offer an optional paid cloud plan.

### Can I run this stack with Docker?

18 of the 19 apps here publish Docker images, including Ollama, LocalAI and LLM Harbor, so most of the stack can run side by side with Docker Compose on one server. Size the server for the heaviest app and add off-site backups.

## Related questions

- [What is the best open source software for law firms?](https://appsgit.com/best/open-source-software-for-law-firms)
- [What is the best open source HR and recruiting software?](https://appsgit.com/best/open-source-software-for-hr)
- [What are the best open source AI tools for HR?](https://appsgit.com/best/ai-tools-for-hr)
- [What is the best open source software for nonprofits?](https://appsgit.com/best/open-source-software-for-nonprofits)
- [What is the best open source software for content creators?](https://appsgit.com/best/open-source-software-for-creators)
- [What are the best open source AI tools for content creators?](https://appsgit.com/best/ai-tools-for-creators)
- [What is the best open source software for a gaming community?](https://appsgit.com/best/open-source-software-for-gaming-communities)
- [What is the best open source software for a smart home?](https://appsgit.com/best/open-source-software-for-smart-home)

## See also

- [All AI & LLM tools apps](https://appsgit.com/categories/ai-tools)
- [All low-code & backend apps](https://appsgit.com/categories/low-code)
- [All automation & workflows apps](https://appsgit.com/categories/automation)
- [All document management apps](https://appsgit.com/categories/document-management)
- [Open-source alternatives to ChatGPT](https://appsgit.com/alternatives/chatgpt)
- [Open-source alternatives to Lovable](https://appsgit.com/alternatives/lovable)
- [Open-source alternatives to Zapier](https://appsgit.com/alternatives/zapier)
- [Open-source alternatives to IFTTT](https://appsgit.com/alternatives/ifttt)
- [Open-source alternatives to Buffer / Hootsuite](https://appsgit.com/alternatives/hootsuite)
- [Open-source alternatives to Adobe Acrobat](https://appsgit.com/alternatives/adobe-acrobat)
- [Ollama vs LocalAI](https://appsgit.com/compare/ollama-vs-localai)
- [Open WebUI vs LibreChat](https://appsgit.com/compare/open-webui-vs-librechat)
- [n8n vs Activepieces](https://appsgit.com/compare/n8n-vs-activepieces)
- [n8n vs Node-RED](https://appsgit.com/compare/n8n-vs-node-red)
- [n8n vs Huginn](https://appsgit.com/compare/n8n-vs-huginn)
- [Paperless-ngx vs Docspell](https://appsgit.com/compare/paperless-ngx-vs-docspell)
- [How to self-host Ollama with Docker Compose](https://appsgit.com/guides/ollama)
- [How to self-host Open WebUI with Docker Compose](https://appsgit.com/guides/open-webui)
- [How to self-host n8n with Docker Compose](https://appsgit.com/guides/n8n)
- [How to self-host Paperless-ngx with Docker Compose](https://appsgit.com/guides/paperless-ngx)

---

Canonical page: https://appsgit.com/best/ai-tools-for-law-firms
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
