October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Connect Ollama to a Local Web UI or App

Use Ollama’s local /api or OpenAI-compatible /v1 endpoint, or choose the Ollama provider in Open WebUI. Learn which host address to use and how to troubleshoot connection errors.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To connect a local web UI or app to Ollama, run Ollama and point the client to its local server: http://localhost:11434/api for Ollama’s native API or http://localhost:11434/v1 for its OpenAI-compatible API. For Open WebUI, select the Ollama provider. The right address depends on where the client runs: inside a container, localhost usually means the container itself, not the host running Ollama.

Choose the connection route that matches your client

Route Best fit Configuration Important limit
Ollama native API A custom app built to use Ollama’s endpoints Use the local /api endpoint and Ollama’s request format. The client must support Ollama’s API schema. Ollama API documentation
OpenAI-compatible API An existing SDK or app with a configurable OpenAI-style base URL Set the base URL to http://localhost:11434/v1 and select an installed Ollama model. Ollama supports a subset of the OpenAI API; individual features may differ. Ollama OpenAI compatibility documentation
Open WebUI A browser-based chat interface Choose its Ollama provider and configure the reachable Ollama host. Docker and host networking can make localhost point to the wrong machine. Open WebUI connection guide
Ollama desktop Apps integration A desktop app specifically supported by Ollama Follow the integration’s setup in Ollama’s Apps view. Requirements and supported features are integration-specific. ChatGPT Desktop integration guide

Prepare Ollama and a model

Ollama needs to be running, and the model you want the client to use needs to be available on the Ollama host. On Linux, if Ollama is not already running as a service, start it with ollama serve. Then pull a model, for example with ollama pull gemma4:e2b, or use the model name you intend to run. Ollama’s quickstart shows this setup and its local API examples: Ollama quickstart.

As an Amazon Associate I earn from qualifying purchases.

Model requirements vary. As one specific example, Ollama’s current quickstart lists Gemma 4 E2B as a download of about 7.2 GB and recommends 8 GB of available VRAM or unified memory; using system RAM may be slower. Those figures describe that model example, not a general requirement for connecting an app.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect a custom app through Ollama’s native API

Use the native API if your app can send requests in Ollama’s format. The documented local API base is http://localhost:11434/api. Local calls do not require an authorization header. Choose the native endpoint appropriate to the operation your app needs, and provide the model name in the request.

Use this route when you control the app or when its integration explicitly supports Ollama’s API. A client that only understands OpenAI’s request format will generally need the compatible /v1 route instead.

Connect an OpenAI-compatible SDK or app

  1. Open the client’s provider or connection settings. Find the field named Base URL, API base URL, or similar.
  2. Enter http://localhost:11434/v1. This is the local OpenAI-compatible endpoint documented by Ollama.
  3. Choose an Ollama model. Use a model that has been pulled on the Ollama host.
  4. Handle any API-key field according to the client. Local Ollama calls do not need a cloud API key. Some SDK examples require a nonempty value, such as ollama; that is a placeholder the local server ignores, not authentication.

Ollama’s OpenAI compatibility is a subset, not a guarantee that every OpenAI feature behaves identically. If a request fails, check the documentation for the exact endpoint and feature your client uses. For example, feature support can differ for tool choice, image URL input, and stateful Responses requests; Ollama documents its Responses endpoint as non-stateful. See the compatibility details before depending on a specific capability.

Connect Open WebUI

Open WebUI has a dedicated Ollama provider that uses the Ollama API protocol, typically on port 11434. Once Open WebUI is running, its guide says it attempts to connect to Ollama. If the services are deployed separately, check the connection settings for the address reachable from the Open WebUI environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open WebUI in Docker, Ollama on the host

In this host-to-container setup, Open WebUI documents http://host.docker.internal:11434 as the Ollama address. Do not substitute localhost without checking: from inside a container, it usually refers to that container, not the host machine.

If the container still cannot reach Ollama, the server may be listening only on 127.0.0.1, which is a common cause of connection errors in this arrangement. Open WebUI documents deployment-specific network options in its connection troubleshooting guide. Choose a setup appropriate to where each service runs instead of applying a broad network-exposure change by default.

Use a supported desktop integration

Ollama’s desktop app includes an Apps view for documented integrations. For ChatGPT Desktop specifically, Ollama’s integration guide requires Ollama v0.34.0 or newer, enabling ChatGPT (Desktop) in Ollama’s Apps settings, and using Codex mode. These steps apply to that documented integration; they are not a general setup for every app named ChatGPT or every desktop client.

Fix common connection problems

  • The client cannot connect: Confirm Ollama is running and the host and port are correct. If the client runs in Docker, its localhost may not be the Ollama host; for Open WebUI on Docker with Ollama on the host, its guide specifies http://host.docker.internal:11434.
  • A browser reports a cross-origin error: Check the precise origin used by the browser and Ollama’s OLLAMA_ORIGINS setting. Ollama documents localhost-related origins by default and this variable for adding origins. CORS permission is separate from whether the server is reachable over the network. See the Ollama FAQ.
  • A different device cannot reach Ollama: Ollama binds to 127.0.0.1:11434 by default. Its OLLAMA_HOST setting changes the listening address. Widening the bind changes which devices can reach the service, so limit it to the intended environment and consult the FAQ for configuration details.
  • The app rejects a request or feature: Verify that the app is using the API dialect it supports: native /api or OpenAI-compatible /v1. Then check whether the particular feature is supported by Ollama’s compatibility documentation.
  • The model is missing or slow: Confirm that it has been pulled on the Ollama host. Compare the chosen model’s own resource guidance with that machine’s available memory; needs differ by model.
  • The client asks for an API key: A local Ollama request does not need a cloud key. If an SDK requires a nonempty field, its placeholder is not real authentication. Calls to Ollama’s hosted cloud API are different and require an API key.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep local and cloud credentials separate

Ollama’s local API does not require authentication. That fact does not establish that every third-party UI, proxy, tunnel, or remote deployment is secured by default. Treat host binding and browser-origin settings as separate configuration choices, and avoid exposing the server beyond the intended environment. If using Ollama’s hosted cloud API, keep the real key on a server and out of browser code and source control; see Ollama’s authentication documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.