Ollama for healthcare: private LLMs and HIPAA

Running Ollama on infrastructure you control keeps prompts with protected health information inside your boundary, but the API needs authentication, logging and documented Security Rule safeguards around it.

On this page

Ollama for healthcare: why private LLMs fit protected health information

A health system, payer or clinical vendor that wants staff to use a language model on patient-related text should start with one question: where does the prompt go? Ollama is built so that inference can stay inside your own boundary. It runs locally, its FAQ states that a local install does not see your prompts or data, and cloud features can be switched off with OLLAMA_NO_CLOUD=1 or the server configuration file. That removes one common path for electronic protected health information (ePHI) to leave the organization, but it does not make a deployment compliant on its own. The HIPAA Security Rule, codified at 45 CFR Part 164 Subpart C, applies to covered entities and business associates for all ePHI they create, receive, maintain or transmit, and a model server that touches ePHI falls within that scope.

The trade-off is that the local API at localhost:11434 has no authentication. Ollama binds to 127.0.0.1 by default, and OLLAMA_HOST changes the bind address, so the first build decision is whether any network exposure happens at all and, if it does, what sits in front of it. Your team owns the controls the runtime does not provide: user identification, role-based access, session handling, audit logs that record who sent which request and when, and the boundary between the model server and any chat front end or application. Confirm these with your own architecture review before any clinical text is sent, because the runtime will accept a request from any client that can reach the port.

Once inference stays inside the boundary, the work moves to documentation and evidence. Several Security Rule standards map directly to this build, including unique user identification, automatic logoff and encryption, which are specified in 45 CFR 164.312 and are the technical safeguards you will need to show for the model server. Addressable specifications still require a documented assessment and, where you do not implement one, a documented reason and an equivalent measure. NIST SP 800-66 Rev. 2 gives sample questions for each standard that you can use to test the design. Plan this evidence alongside the build rather than after it, and confirm your obligations with your privacy and legal counsel.

Which HIPAA and related requirements shape an Ollama build

This table maps each HIPAA requirement that affects a self-hosted Ollama deployment to its source and the build decision it drives. Read it as a checklist: each row names the requirement, what it asks for, and the Ollama choice you need to make and document. The main takeaway is that Ollama itself has no authentication on its local API, so most HIPAA-relevant controls must be added around it and written down.

RequirementWhat it asks forOllama build implication
Security Rule scope (45 CFR 164.302)Covered entities and business associates must protect all electronic PHI they create, receive, maintain or transmit.Any Ollama server that receives prompts containing ePHI, including logs and cached outputs, falls inside scope. Confirm where prompts and responses are stored.
Unique user identification (164.312, required)Each user of a system with ePHI must have a unique identifier that is tracked.The local Ollama API has no user accounts. Place an authenticating proxy or gateway in front of it so every request maps to a named user.
Emergency access procedure (164.312, required)A documented way to reach ePHI systems during an emergency.Document how administrators restore the Ollama host, model store and gateway credentials when the usual identity provider is down.
Automatic logoff (164.312, addressable)Electronic sessions end after a period of inactivity, or the entity documents why and uses an alternative.Set session lifetimes in the chat front end and gateway. Record the chosen timeout or the reason for an alternative.
Encryption (164.312, addressable)Encrypt ePHI where reasonable and appropriate, or document an equivalent measure.Ollama binds to 127.0.0.1 on port 11434 by default. Decide how traffic is encrypted between clients, proxy and server, and between the proxy and the server.
Addressable specification documentation (164.306(d))Assess each addressable specification, document a decision not to implement it, and adopt an equivalent measure if reasonable.Keep a decision record for each addressable Ollama control, such as logoff, encryption and audit detail, with the reasoning and the alternative used.
Business associate terms (164.314(a)(2)(i))Contracts must require Security Rule compliance, flow the same terms to subcontractors handling ePHI, and report security incidents.If a vendor hosts, supports or accesses the Ollama environment, confirm the contract covers it. Cloud inference at ollama.com requires an API key and is a separate data path to assess.
Cloud features (Ollama FAQ)Data flows outside your environment must be known and controlled.Set OLLAMA_NO_CLOUD=1 or the server configuration file so prompts are not sent to cloud services, then verify the setting on every host.
OCR enforcement through auditsOCR investigates complaints, runs compliance reviews and audits, and HHS states no certification exists.Prepare evidence an investigator can check: configuration, access logs, change records and risk analysis. Do not describe any deployment as HIPAA certified.

Ollama settings and integrations that matter for patient data

Most of the protection for patient data sits in a few Ollama settings and in the components around the server. Each card below covers one decision that a healthcare team should make and document before any protected health information reaches a model. Check each setting against your own build, because defaults and behavior can change between releases.

Network exposure and bind address

Ollama binds to 127.0.0.1 on port 11434 by default, and its local API does not require authentication. If you change the bind address with OLLAMA_HOST, anyone who can reach that address can send prompts. Keep the server on a private network segment, and place a reverse proxy with authentication in front of it rather than opening the port directly. Confirm firewall rules block the port from user subnets and the internet.

Ollama FAQ

Model storage on encrypted volumes

Ollama keeps downloaded model files in a default directory that differs by operating system. OLLAMA_MODELS moves that store to a path you choose, so you can place it on a volume your encryption and backup policy covers. Record the storage path in your system documentation, restrict filesystem permissions to the service account, and confirm that snapshots and backups of the volume follow the same controls as the rest of your clinical data.

Ollama FAQ

Cloud features turned off

Ollama's FAQ says local runs do not expose your prompts or data to Ollama, and cloud features can be disabled with OLLAMA_NO_CLOUD=1 or the server configuration file. Set this variable on every server that handles patient data, then test that cloud model requests fail as expected. Keep the setting in your configuration management so drift is visible. Direct cloud inference needs an API key sent as a Bearer token, so an absent key is a useful second check.

Ollama API authentication

Concurrency and queue limits

Three settings control load: OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE. The defaults are one parallel request per model, three loaded models per GPU (or three on CPU) and 512 queued requests. A shared clinical tool can exhaust those limits during peak hours, so set them from load tests and decide how the proxy reports overload to users. Record the chosen values, because they affect availability, which is part of the risk analysis.

Ollama FAQ

SSO and access gateway

Because the Ollama API has no built-in user accounts, identity has to be enforced in front of it. A gateway or reverse proxy can require single sign-on, check group membership against clinical roles and issue short-lived credentials to applications. Map each role to the models and patient-data workflows it needs. Confirm that the gateway supports multi-factor authentication for remote access, since that is the control a recent regulator finding in another sector focused on.

Ollama API authentication

Audit logging at the proxy

Ollama's own logs record server events, but they are not designed as a per-user audit trail of who sent what. Log the authenticated user, time, endpoint, model name and request outcome at the proxy layer, and decide with your privacy officer whether prompt content is logged or excluded. Send these records to a store with retention and access controls, and test that you can reconstruct a single user's access over a defined period. Enterprise plan features such as cost budgets and model access controls are commercial options to confirm with the vendor, not requirements for self-hosting.

Ollama pricing

How a protected request should flow through the stack

The first decision is where the trust boundary sits. Ollama itself should never be the point where a user is identified. Its local API at port 11434 does not require authentication, and by default it binds to 127.0.0.1. Once you change OLLAMA_HOST so other machines can reach it, anyone on that network path can send prompts unless something in front of it enforces identity. A protected request should therefore pass through an identity provider that issues the user's session, then through a reverse proxy or AI gateway that checks that session, applies role-based access to specific models, and only then forwards the request to Ollama on servers your organization controls. Ollama should accept traffic only from that gateway, which means a firewall rule or network policy that blocks direct access from clients.

Logging is where many healthcare deployments create new ePHI exposure without noticing. The gateway's access log may record request bodies, and Ollama's own server logs can capture prompt content when debugging is enabled. Any clinician question that names a patient, a diagnosis or a record number becomes a copy of ePHI in that log store, so the logs inherit the same controls as the model: encryption at rest, restricted administrator access, defined retention and a documented disposal process. Confirm with your gateway and Ollama version which fields are written to logs by default and which can be suppressed. Model storage on disk, set through OLLAMA_MODELS, is a separate question: model weights hold no patient data, but any cache or conversation state held by a front end sits inside your ePHI boundary and needs the same treatment.

Before go-live, walk one test request through every hop and record what each component stores. Use synthetic patient data, not real records, and check that the identity event, the gateway log entry, the Ollama server log and any front-end history each match the access policy you wrote. Any component that cannot be configured to meet that policy should be documented as an addressable or excluded case with a reasoned alternative, because the HIPAA Security Rule expects that reasoning to be written down. The HIPAA Security Rule text in the eCFR is the reference for the audit trail and access control items this walkthrough should satisfy.

Request flow from clinician to model inside the boundary

A clinician's browser or chat client starts the request and signs in through the organization's SSO identity provider, which issues the identity the proxy checks. The authenticating proxy enforces that identity, writes the audit log entry, and forwards only approved requests to the Ollama API on a private host, which is the one component that holds no authentication of its own. The encrypted model store sits behind that host inside the same boundary. Check that Ollama is reachable only from the proxy, that the proxy logs who sent each prompt, and that nothing in the path leaves the organization's infrastructure.

Clinician requests pass through SSO and an audited proxy before reaching Ollama inside the boundary.

Rollout phases for a HIPAA-scoped Ollama deployment

This sequence moves a self-hosted Ollama deployment from scope decisions to routine operation, producing evidence at each stage that a covered entity or business associate can review against the Security Rule.

  1. Scope ePHI workflows and confirm your role

    Your privacy officer, security lead and the clinical or operational owners list every workflow where a prompt, document, transcript or model output could contain electronic protected health information. Legal counsel confirms whether your organization is a covered entity, a business associate or both, since the Security Rule applies to both under 45 CFR 164.302. Done means a signed scope statement names each workflow, the systems it touches and the role your organization holds for each one.

  2. Design access control and audit logging

    The security team decides who may reach the model, how each user is identified, and where request records are kept. Because the local Ollama API has no built-in authentication, the design must place an authenticating proxy or gateway in front of it, and it must record who sent each request, when, and to which model. Done means a written access design maps each role to permitted models and log sources, and it names the owner of log review.

  3. Build and harden the Ollama server

    The infrastructure team installs Ollama on servers inside your environment, keeps the default bind to 127.0.0.1 unless a reviewed proxy needs access, and sets OLLAMA_NO_CLOUD=1 so cloud features stay off. They also configure model storage through OLLAMA_MODELS, restrict file permissions and place the server on a segment reachable only from approved clients. Done means a configuration baseline is recorded and a reviewer can confirm each setting against it.

  4. Test authentication bypass and log completeness

    An independent tester attempts to reach the Ollama port directly, bypass the proxy, use stale or shared credentials and send requests that should be refused. The same test checks that every allowed and denied request appears in the audit trail with the expected user and model fields. Done means each failed attempt is documented with its fix and a retest result, and the log gaps found are closed before any user touches real records.

  5. Document Security Rule safeguards

    The compliance lead maps each control to the administrative, physical and technical standards in Appendix A to Subpart C and records how each addressable specification was assessed. NIST SP 800-66 Rev. 2 offers sample questions for each standard and can guide the evidence list. Done means a safeguards register, risk analysis entry and policies exist, and the lead can point to the artifact behind every control. This documentation supports your review, but HHS does not issue certifications for HIPAA compliance.

  6. Pilot with a limited user group

    A small group of trained users works with a defined set of approved models on non-production or de-identified data first, while the team watches logs, access exceptions and user feedback. The pilot also checks that any vendor or subcontractor with access to ePHI is covered by a business associate contract that meets 45 CFR 164.314. Done means the pilot report lists issues, their owners and the decision to expand, hold or stop.

  7. Operate under change control

    After expansion, the operations team manages model versions, Ollama upgrades and configuration changes through a documented change process with testing and rollback steps. Release notes and pre-releases are reviewed before deployment, and each approved change updates the safeguards register. Done means every running version is recorded, each change has an approval and test record, and the access and audit review runs on a schedule your policies set.

Documentation a compliance team will ask for

A compliance team reviewing a self-hosted Ollama deployment will look for written decisions, not just configuration. The cards below cover the records the Security Rule expects an entity to keep, the contract terms that apply when a vendor touches ePHI, and the monitoring that keeps the file current.

Risk analysis and risk management records

Document where ePHI enters the Ollama stack: prompts, retrieved records, model outputs, logs and model storage directories. Record the threats you assessed, such as an exposed API port or a shared model host, and the measures chosen to manage each one. Keep the analysis dated and revisit it when the model, hardware or user population changes. Ask your auditor which risk analysis format they expect to see.

NIST SP 800-66 Rev. 2

Unique user identification and automatic logoff policies

The local Ollama API has no authentication, so unique user identification must be provided by the proxy or gateway in front of it. Write a policy stating how each user or service identity is assigned, how credentials are issued and revoked, and which sessions time out. Attach the proxy or identity provider configuration that enforces it. Confirm how your chosen front end handles idle sessions, since Ollama itself does not manage user sessions.

Ollama API authentication

Encryption decisions and addressable rationale

Encryption at rest for model storage and logs, and in transit between clients and the proxy, are addressable specifications. For each one, record whether it is reasonable and appropriate for your environment. If you decide not to implement one, document the reason and the equivalent alternative measure. Bind the decision to the proxy's TLS settings and to the disk or volume configuration of the host that stores models and logs.

Business associate contract terms

Any vendor that creates, receives, maintains or transmits ePHI for you needs a business associate contract. Under 45 CFR 164.314, the contract must require Security Rule compliance, flow the same terms to subcontractors that handle ePHI, and require reporting of security incidents. Map each party in the Ollama stack, including hosting and any support provider with access to the environment, and confirm which ones need a contract. Ask any cloud or model provider whether it will receive ePHI at all.

45 CFR 164.314 text

No HIPAA certification, so evidence comes from assessment

HHS does not certify HIPAA compliance, and private certifications do not stop HHS from later finding a violation. Evidence that an outside party can test, such as an independent assessment report from a qualified assessor, carries more weight than a vendor badge. Plan the scope of any assessment before the deployment is considered complete. DeployOpen prepares systems, controls and evidence for assessments but does not issue audit reports or attestations.

Pending Security Rule revision to monitor

HHS proposed a major Security Rule revision on 6 January 2025, and as of October 2026 no final rule has been published. The latest Unified Agenda projects final action for July 2027. Keep a monitoring entry in your compliance calendar, and record which proposed changes would affect your Ollama controls, such as authentication, logging or asset inventory. Review the current rule text before any assessment.

Proposed rule, 90 FR 898

What buyers ask before hiring help with HIPAA and Ollama

Does Ollama itself cost money to run on our own hardware?

No license fee applies to running Ollama on your own hardware. Ollama is MIT-licensed, and its pricing page states that running models on your own hardware is always unlimited. Paid plans apply only to cloud models: Pro at $20 per month ($200 per year), Max at $100 per month, Team at $500 per month and Enterprise at custom pricing, according to the pricing page. Your real costs are the servers or GPUs, storage, the identity and logging components you add around the API, and the labor to build and maintain them. Confirm the current plan terms on Ollama's pricing page before you budget, because cloud plans are separate from the self-hosted setup this page describes.

What drives the effort and cost of a HIPAA-oriented Ollama build?

The biggest drivers are the number of users and applications calling the model, whether the server handles protected health information directly, and how much evidence your compliance team needs. Ollama's local API does not require authentication, so a build usually adds a reverse proxy, single sign-on, role-based access, and audit logging in front of it. Other factors include the hardware sizing for your models, the network segmentation you require, backup and patching routines, and how many safeguards you must document as required or addressable. Ask any partner for a quote built from a written scope that lists these items separately.

How long do scoping and rollout usually take for a healthcare deployment?

Duration depends on how many environments, identity systems and applications are in scope, and on how quickly your security, privacy and clinical stakeholders approve decisions. Scoping usually covers the data flows that touch ePHI, the access model, logging requirements and the approved model list. Rollout then follows the agreed sequence: infrastructure, access control, validation and documentation. No duration is set in this page's research, so ask any partner to confirm a timeline in writing against your environment and review calendar, and to name which dependencies could extend it.

What must we provide before a partner can start the work?

A partner needs access to the infrastructure where Ollama will run, including cloud accounts, data center hosts or air-gapped network segments, plus the rules for who may reach them. You should also provide your identity provider details, such as the directory and single sign-on settings, along with written policies for access, logging, retention and incident response. Named staff matter as much as systems: you need an owner for clinical and privacy decisions, a security contact for approvals, and an operations person who will run the platform afterward. Confirm with your team which of these exist today and which must be created during the engagement.

Can our internal team build and run this without a partner?

Yes, many teams can, provided they have engineers who understand Linux, containers, reverse proxies, identity federation and logging, plus time to test and document the result. The HIPAA Security Rule does not require a specific tool or a vendor. Consider whether your team has the skills to build the access layer, validate it with security testing, and keep the HIPAA documentation current after each change. NIST SP 800-66 Rev. 2 is a useful reference for mapping work to each standard. A partner can take over any part of this as a fixed-scope engagement, or support an internal team with a retainer.

Does DeployOpen certify that our Ollama setup is HIPAA compliant?

No. DeployOpen does not issue audit reports, attestations or certifications, and HIPAA has no certification. HHS states that no Security Rule standard requires an entity to certify compliance and that HHS does not endorse or recognize private certifications. DeployOpen prepares systems, controls and evidence for your compliance assessments, and your compliance team or an independent assessor makes the determination. Ask any partner to put in writing which artifacts they deliver, such as configuration records, access settings, audit log samples and test results, and which decisions remain with your organization.

How does penalty exposure relate to the quality of our documentation?

HHS Office for Civil Rights enforces the Security Rule through complaints, compliance reviews and audits, and penalties are set per violation. For penalties assessed on or after January 28, 2026, the inflation-adjusted range runs from $145 per violation to $2,190,294 per violation, with a calendar-year cap of $2,190,294, according to 45 CFR 102.3. Documentation matters because for each addressable specification you must assess whether it is reasonable and appropriate, and if you do not implement it, document why and adopt an equivalent measure. Clear records of those decisions, access reviews and logging make it far easier to show what you did. Your legal counsel should judge the exposure for your specific organization.

Which Ollama settings should engineers check first for ePHI workloads?

Start by confirming the bind address, the cloud features and the storage location. Ollama binds to 127.0.0.1 on port 11434 by default, and the OLLAMA_HOST setting changes that address, so any exposure must go through a proxy you control. Set OLLAMA_NO_CLOUD=1 or the equivalent server configuration if prompts must never leave your environment. Move models with OLLAMA_MODELS to storage that you encrypt and back up. Review the concurrency settings, including OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE, and test each setting against your load. Record each value as part of your configuration evidence.

What to ask a partner before signing a scope

Start with how the partner handles ePHI during the engagement itself. Implementation work often touches live systems, logs, configuration files and sample data, so ask which environments the partner will access, whether they will work with real patient records or only synthetic data, where any extracted data will be stored, and who on their side can reach it. Ask whether they will sign a business associate agreement before any access begins. Under 45 CFR 164.314(a)(2)(i), that contract must require compliance with the Security Rule, flow the same terms to subcontractors that handle ePHI, and require reporting of security incidents, including breaches of unsecured PHI. Confirm the agreement's terms with your counsel rather than assuming a template covers your deployment.

Next, ask how the partner documents addressable implementation specifications. Of the 36 implementation specifications in Appendix A to Subpart C, 22 are addressable, and 45 CFR 164.306(d) requires a documented assessment of whether each is reasonable and appropriate, with an equivalent measure where it is not. Ask for a sample decision record that names the specification, the reasoning, the alternative chosen and the owner. Ask how logging is designed so that the audit trail for the unauthenticated Ollama API does not capture full prompt content unless you have decided it must, and who approves any change to that setting. Finally, require a written fixed scope listing deliverables, acceptance tests, retest rounds, handover of configuration and runbooks, and what is excluded, so that compliance documentation is delivered as a defined output rather than a side effect.

How DeployOpen scopes and delivers a regulated Ollama deployment

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For Ollama for healthcare, that means defining where inference runs, putting access control and audit logging around an API that has none by default, and preparing the documentation your compliance team needs to review the setup against the HIPAA Security Rule.

How we scope

  • Map which systems, users and data flows touch protected health information before any server is configured
  • Confirm the hosting location, network path and whether cloud features such as OLLAMA_NO_CLOUD must be disabled
  • Agree the written scope, deliverables and timeline in writing before work starts, with engagements fixed-scope

How we build

  • Bind the Ollama server to a private address and place an authenticating reverse proxy in front of its unauthenticated API
  • Configure model storage, concurrency limits and logging so access and usage can be reviewed later
  • Test the deployment for unauthorized access, exposed endpoints and misrouted prompts before handover

How we hand over

  • Deliver configuration records, access rules and logging design mapped to the relevant Security Rule standards
  • Document which addressable specifications were assessed, what was decided and any equivalent alternative measures
  • Hand over runbooks so your own team can operate, patch and review the system without DeployOpen present

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after the initial handover
  • Retest the deployment after Ollama version updates, proxy changes or new users are added
  • Prepare evidence for your auditors and assessors, noting that DeployOpen does not issue audit reports or certifications

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.