Posted in

Build a Self-Hosted Policy Assistant with Onyx

Self-hosted Onyx policy assistant connecting policy, SOP, HR, and IT documents to a cited answer.

Employees lose time when policy answers are scattered across shared drives, wikis, PDFs, and departmental folders. A generative AI chatbot makes that worse when it answers fluently without showing its source.

Onyx offers a more useful pattern: connect approved knowledge sources, retrieve relevant passages, and give users answers linked to supporting documents. It can be self-hosted and paired with cloud or locally hosted language models. For a small business, this can become an internal operations assistant. For a municipality or agency, it can support staff who need quick access to administrative policies, procedures, forms, and service guidance.

A credible policy assistant depends on document ownership, access control, freshness, testing, and a clear rule that it informs staff but does not make authoritative decisions.

Quick verdict: Onyx Community Edition is a strong candidate for a controlled policy-search pilot when an organization has technical staff who can operate Docker and manage the surrounding security. It is not a turnkey records-management or compliance system. Organizations that need enterprise identity, advanced access controls, audit capabilities, or vendor support should confirm which functions require Onyx Enterprise Edition before committing.

Best for and not ideal for

Best for: teams with a defined body of approved internal documents; organizations evaluating self-hosted RAG; technical project managers building a measurable knowledge-search pilot; public-sector departments that can separate public, internal, confidential, and restricted content; and developers who want an application layer that can work with different model providers.

Not ideal for: organizations without document owners; teams expecting AI to decide eligibility, interpret law, approve benefits, or replace HR and legal review; environments that cannot patch and monitor a multi-container application; and buyers who assume every enterprise security feature is included in the MIT-licensed Community Edition.

Onyx repository snapshot

Facts below were verified on September 10, 2026 from the official repository and documentation. GitHub counts change continuously.

ItemVerified snapshot
Repositoryonyx-dot-app/onyx
PurposeSelf-hostable AI application with chat, RAG, agents, search, connectors, and model-provider integrations
GitHub activity32,012 stars, 4,410 forks, 10,080 commits, and 446 open issues
Latest stable releasev4.7.1, published September 8, 2026
Recent activityThe default branch received a commit on September 10, 2026
Main languagePython, with a Next.js web application and containerized services
Deployment optionsLite and Standard; Docker, Kubernetes, Helm/Terraform, and cloud deployment guides
Model optionsHosted providers and self-hosted endpoints such as Ollama, LiteLLM, and vLLM
Project statusActive, not archived; public issues, pull requests, discussions, and security reporting are enabled

Stars are not proof of reliability. Stronger signals here are the fresh release, same-day commits, documented deployment paths, security policy, and development history. The issue and pull-request volume also signals a fast-moving product, so plan regression testing.

License and commercial-use note

The repository is mixed-license. Its root license says code outside designated ee directories is available under the MIT Expat license, which generally permits commercial use, modification, distribution, sublicensing, and sale with the copyright and permission notice retained. Code inside identified Enterprise Edition directories uses the separate Onyx Enterprise License.

Do not summarize the entire repository as “MIT licensed.” Community Edition covers core chat, RAG, agents, and actions, while enterprise-oriented capabilities are packaged separately. Before reselling, white-labeling, embedding, or offering a managed service, have counsel review the exact version, dependencies, trademarks, and distribution model. This is not legal advice.

The practical workflow

The target is not “chat with every file.” It is a staff assistant that answers questions from a governed policy collection and cites the evidence used.

Example question

An employee asks: “How many bereavement-leave days are available, and what documentation is required?”

The workflow should:

  1. authenticate the employee;
  2. search only sources the employee is permitted to access;
  3. retrieve the current HR policy and related procedure;
  4. generate a concise answer with links or citations;
  5. say when evidence is missing or conflicting;
  6. direct the employee to HR for exceptions or formal decisions; and
  7. record enough operational data to troubleshoot quality without retaining unnecessary sensitive prompts.

This is useful because it shortens discovery, but the cited source remains authoritative. The assistant must never quietly turn a draft, superseded document, or unofficial FAQ into policy.

Reference architecture

At minimum, the workflow has six layers:

LayerFunctionKey control
Approved sourcesPolicies, SOPs, forms, FAQs, and manualsNamed owner, status, effective date, classification
Connector or file intakeSynchronizes content into OnyxRead-only account and least privilege
Index and retrievalCreates searchable representations and retrieves passagesSource-level access boundaries and re-indexing process
Language modelDrafts an answer from retrieved contextApproved model endpoint, data-use terms, and cost limits
User interfaceAccepts questions and displays cited answersAuthentication, authorization, warning text, and feedback
OperationsPatching, backup, logs, monitoring, and testingAssigned service owner and documented incident process

Self-hosting Onyx does not mean every request stays on premises. Hosted models, embeddings, web search, and connectors may move data externally. Data residency depends on the complete configured path.

Deployment requirements

Onyx documents two modes. Lite is a lightweight chat interface requiring under 1 GB of memory, according to the project README, but it omits the full RAG indexing stack. Standard adds vector and keyword indexing, background workers, model-inference services, Redis, and MinIO. The policy-assistant workflow therefore needs Standard, not Lite.

A realistic pilot requires:

  • a Linux host or virtual machine capable of running Docker and Docker Compose;
  • CPU, memory, and storage sized for Standard Onyx, the document corpus, concurrency, and retention period;
  • TLS termination through a managed reverse proxy or load balancer;
  • DNS, firewall rules, secret storage, backups, monitoring, and a patching process;
  • an approved model provider, or separate local-model infrastructure such as Ollama or vLLM;
  • service accounts for selected connectors; and
  • an identity and access design appropriate to the sensitivity of the content.

Do not pipe the quick-start script into a shell without review. Inspect the installer, pin an approved release, and test outside production.

For local models, model size, quantization, context, and concurrency determine whether CPU is acceptable or a GPU is needed. Benchmark before buying hardware.

Step-by-step implementation

1. Define the assistant’s authority

Write a one-page scope statement. Include the departments served, approved document types, prohibited content, answer disclaimer, escalation channel, and questions the assistant must refuse. A narrow first release—HR and IT administrative policies, for example—is safer and easier to measure than an enterprise-wide launch.

2. Create a source register

Inventory every candidate document with owner, title, location, classification, approval status, effective date, review date, retention rule, and replacement relationship. Exclude duplicates, personal working notes, employee records, legal-privileged content, and obsolete drafts.

Fix source quality before indexing. RAG cannot reliably decide which of three contradictory PDFs represents the organization’s intent.

3. Select the deployment boundary

Decide whether Onyx, its database and indexes, model inference, and source systems will run on premises, in a private cloud network, or across a hybrid design. Draw the data path. Mark where prompts, retrieved passages, credentials, logs, backups, and telemetry can travel.

4. Deploy a pinned Onyx release

Use the official deployment documentation and choose Standard mode. Docker Compose is generally the shortest pilot path; choose Kubernetes only when operations justify it.

Pin a reviewed release such as v4.7.1 rather than tracking main. Keep separate development and production environments. Record configuration changes and establish a rollback procedure before the first upgrade.

5. Configure the model deliberately

Choose one approved model route. Ollama can support a local proof of concept; a hosted enterprise API may reduce operational burden. Test quality and data-handling terms. Disable unnecessary providers.

Start with conservative instructions: answer only from retrieved sources; cite every material claim; identify conflicts; say “I could not find this in the approved sources” when evidence is insufficient; and do not provide binding HR, legal, financial, procurement, or eligibility decisions.

6. Connect one governed source

Begin with a file collection or a single platform such as SharePoint or Google Drive. Use a dedicated read-only service account. Do not grant broad tenant access merely to simplify setup. Onyx advertises more than 50 indexing connectors, but each connector adds credentials, permissions, failure modes, and upgrade dependencies.

Verify how source permissions are represented before indexing confidential content. If the needed identity synchronization or document-level access control is an Enterprise feature, either license it or keep the pilot corpus non-sensitive and uniformly accessible. Do not simulate security with folder names.

7. Build a test set before launch

Create 50 to 100 questions from real staff requests. Include easy lookups, multi-document questions, ambiguous wording, outdated-policy traps, permission-boundary tests, prompt-injection attempts embedded in documents, and questions with no answer.

Score each response for retrieval relevance, factual accuracy, citation correctness, completeness, appropriate refusal, and access-control compliance. Require zero critical permission failures. A useful pilot target is not “the answer sounds good”; it is a documented pass threshold with human-reviewed evidence.

8. Launch with feedback and ownership

Release to a small user group. Put the limitation notice beside the input box, not in a forgotten policy document. Give users a way to flag wrong, outdated, or inaccessible sources. Route content problems to document owners and technical incidents to the service owner.

Review failed queries weekly. Improve sources and metadata before endlessly adjusting prompts.

Security and governance controls

Onyx’s security policy applies fixes to main and the latest tagged release; older releases are not guaranteed backports. Operators still own deployment security.

Minimum controls include:

  • expose the service only through TLS and an authenticated access path;
  • change default credentials and store secrets outside source control;
  • restrict administrative interfaces and outbound network access;
  • scan container images and dependencies, then patch on a defined cadence;
  • back up configuration, databases, and required object storage, and test recovery;
  • minimize prompt and query retention, especially where staff may enter personal information;
  • disable web search, code execution, actions, and MCP integrations unless the use case needs them;
  • treat retrieved documents as untrusted input and test document-based prompt injection;
  • verify authorization after every connector or identity change; and
  • document how incidents, incorrect answers, and source disputes are escalated.

For public-sector use, add records, accessibility, privacy, language-access, and procurement review. Public eligibility or statutory interpretation requires separate legal review, testing, and human escalation.

Limitations and risks

Mixed licensing and feature boundaries: Core functions are permissively licensed, but enterprise capabilities have separate terms. Map required features before estimating total cost.

Operational complexity: Standard Onyx is a service stack, not a single desktop application. Small teams may underestimate monitoring, upgrades, backups, connector failures, and model operations.

Permissions are the highest-impact risk: A polished answer that exposes a confidential passage is still a security incident. Validate source-aware authorization with adversarial tests.

Citations can be present but misleading: A source link does not prove the generated statement is supported. Test whether citations actually entail the answer.

Stale content produces confidently stale answers: Assign owners and review dates. Remove superseded material from both the source and index.

No independent hands-on test in this article: This workflow is based on repository and official-documentation review. AIXYZ did not deploy or benchmark Onyx for this article, so performance, retrieval accuracy, and upgrade behavior should be validated in your environment.

Alternatives to evaluate

  • RAGFlow: worth evaluating when document parsing and visually complex files are central. Read AIXYZ’s RAGFlow overview.
  • AnythingLLM: approachable for smaller teams that want document chat and a desktop or Docker path, but compare multi-user governance requirements carefully.
  • Open WebUI: a strong model-agnostic chat interface with knowledge features; evaluate retrieval depth and enterprise controls for the specific use case.
  • Dify: better suited when the goal is to build reusable AI applications and workflows rather than primarily search internal knowledge.
  • Managed enterprise search: may cost more but reduce operational burden and provide contractual support, identity integration, and compliance evidence. Self-hosting is not automatically cheaper once staff time is counted.

Before expanding beyond a pilot, use AIXYZ’s 30-day AI pilot guide and AI tool evaluation checklist.

Final recommendation

Onyx merits evaluation because it combines active development, broad connectors, model flexibility, self-hosting, and core RAG capabilities.

Start with one low-risk corpus, Standard mode, a pinned release, read-only access, a reviewed model path, and a test set built before launch. If the pilot cannot reliably refuse unsupported questions, preserve document permissions, and point staff to the governing source, do not scale it. The winning design is not the assistant that answers the most questions; it is the one users can verify and administrators can control.

Call to action: Choose one policy domain and build a 30-day evidence-based pilot. Define success thresholds, test permission boundaries, measure time saved, and price the Enterprise features and operating effort before making a production decision.

Frequently asked questions

Is Onyx fully open source?

Onyx uses a mixed model. Community Edition code outside specified Enterprise Edition directories is available under the MIT Expat license. Code in designated ee directories uses the separate Onyx Enterprise License. Review the repository license and the features you plan to deploy.

Can Onyx run entirely on premises?

Onyx can be self-hosted and can connect to locally hosted models. An entirely on-premises design also requires local embeddings, storage, identity, and supporting services, with external providers disabled. Verify the complete data path rather than relying on the application’s hosting location.

Does a policy assistant require a GPU?

Not necessarily. Onyx can call a hosted model, while local small models may run on CPU for low-volume pilots. A GPU may be needed for acceptable latency and concurrency with larger local models. Benchmark representative usage before purchasing hardware.

Can Onyx respect document permissions?

Onyx offers connectors and enterprise access-control capabilities, but the required behavior depends on the connector, edition, and identity configuration. Test with users in different permission groups and treat any unauthorized retrieval as a release blocker.

Is Onyx suitable for public-facing government decisions?

Not by default. An internal cited-search assistant is a lower-risk starting point. Public eligibility, legal interpretation, benefits, enforcement, or case decisions require additional legal, privacy, accessibility, security, records, and human-review controls.

What should a successful pilot measure?

Measure retrieval accuracy, citation support, appropriate refusals, permission-boundary failures, response time, source freshness, user-reported usefulness, and time saved. Do not use adoption or answer volume alone as evidence of quality.

Primary sources

Leave a Reply

Your email address will not be published. Required fields are marked *