How to connect LM Studio with Open WebUI to power your local AI

Last update: 29/07/2026

  • LM Studio acts as the inference engine and manager of downloaded Hugging Face models.
  • Open WebUI provides an advanced web interface with multi-user support, RAG, and agent tools.
  • The integration is done through the OpenAI compatible API, allowing the use of local models in a professional web environment.
How to connect LM Studio with Open WebUI

If you're interested in the world of artificial intelligence, but don't want to constantly rely on the cloud or pay for each consultation, you've probably already heard of LM Studio and Open WebUIThe first application facilitates the downloading and running of models on the computer, while the second provides a much broader web interface, especially useful for working with documents, tools and multiple users.

The combination is particularly interesting because it allows the use of LM Studio as an inference server and Open WebUI as the main interfaceThis way, you can manage models from a desktop application and interact with them from a web platform with history, knowledge bases, permissions, and various expansion options.

Mastering LM Studio
Related article:
Complete Guide to LM Studio: How to Master Local AI on Your PC

What does each tool contribute to the connection?

What do LM Studio and Open WebUI offer?

LM Studio is primarily intended for search, download and run compatible models without having to constantly work with the terminal. Its catalog allows you to explore models published on Hugging Face and consult data such as file size, architecture, or the type of quantization available.

The application also helps determine if a model can perform reasonably well on the equipment. However, the quantization should not be interpreted as an exact prediction of quality. Lighter formats reduce memory consumption, but can also lead to some loss of accuracy..

One of the most important functions for this integration is the LM Studio local serverThis publishes endpoints compatible with the OpenAI API, allowing other applications to send requests to the model by simply changing the base address.

Open WebUI, for its part, is much more than a chat interface. It allows you to connect different model providers and servers, create knowledge bases, manage users, and extend its capabilities through tools, functions, and MCP servers.

Their system of RAG or enhanced generation by recovery It can process documents and retrieve relevant fragments before generating a response. Open WebUI supports various vector databases, extraction engines, hybrid search, and reranking systems, although the available options depend on how the platform has been deployed and configured.

Exclusive content - Click Here  How to Change the Arrow Key on a Computer

It also includes team-based features such as groups, permissions, roles, and various authentication systems. In more advanced installations, it can be deployed using Docker or Kubernetes and configured to work with multiple instances.

How to connect LM Studio with Open WebUI

Connect LM Studio with Open WebUI

LM Studio can publish a server compatible with the OpenAI APIThanks to this, Open WebUI can treat it as another model provider, even though all the processing is done within your own team.

First, open LM Studio and go to the developer section. From there you can start the local server. The port usually used is 1234although you can change it from the settings.

Before we continue, Load the model you want to use into LM Studio.To check that the server is responding, you can open the following address in your browser or use a compatible tool:

http://localhost:1234/v1/models

Then go to Open WebUI and follow this path:

  1. Open the Administration Panel.
  2. Enter Settings.
  3. Access the section Connections.
  4. Search for connections of type OpenAI.
  5. Press the button to add a new connection.

If both applications run directly on the same system, use this base address:

http://localhost:1234/v1

LM Studio does not require an API key by default. If the version of Open WebUI you are using requires this field, you can enter a test value. Current versions of LM Studio also allow activate authentication and create tokensIf you enable this feature, you will need to enter a valid token in Open WebUI.

Save the connection and check if the model appears in the Open WebUI selector. If it doesn't appear automatically, check the identifier displayed by the endpoint. /v1/models and manually add it to the connection's model filter.

How to make a connection when Open WebUI uses Docker

The configuration changes when Open WebUI is running inside Docker and LM Studio is installed directly on Windows or macOS. In this case, localhost refers to the container itself.not to the computer where LM Studio is running.

Exclusive content - Click Here  Delete locked files in Windows.

The address you should normally use is:

http://host.docker.internal:1234/v1

Additionally, go into the LM Studio server settings and enable Serve on Local NetworkThis option allows the server to accept external connections to its own local process.

Keep in mind that this configuration may expose the API to other devices on your network. If you share the network with other people, it is recommended to... enable authentication using tokens and review the firewall rules.

In some Docker installations on Linux, the name host.docker.internal It is not configured automatically. In that case, it may be necessary to add the following to the container:

--add-host=host.docker.internal:host-gateway

Another option is to use the host machine's IP address, but it must be an address accessible from the container. Entering a random IP address or opening port 1234 on the router is not recommended.

How to fix the most common connection errors

How to fix the most common connection errors in LM Studio and Open WebUI

If Open WebUI fails to communicate with LM Studio, the first step is to check that the server is still active and that there is at least one model ready to respond.

You should also verify the address used:

  • Direct installation: uses http://localhost:1234/v1.
  • Open WebUI in Docker: proof http://host.docker.internal:1234/v1.
  • Another computer on the network: Use the local IP address of the computer where LM Studio is running.

If the address works from Windows, but not from the container, you're usually dealing with a Docker network problemVerify that "Serve on Local Network" is enabled, that the firewall is not blocking the port, and that the container can resolve. host.docker.internal.

It is not usually necessary to enable CORS to connect these applications. Open WebUI makes requests from its backend, so browser restrictions typically do not interfere with the communication.

Errors related to openapi.jsonUnexpected endpoints or incompatible methods may appear when attempting to register LM Studio as a OpenAPI toolTo use its models, you should not configure it as a tool server, but as an OpenAI connection with a base address ending in /v1.

If the connection is saved correctly, but the selector remains empty, check:

http://localhost:1234/v1/models

If Open WebUI is inside Docker, use the equivalent address from the container with host.docker.internalThis allows you to check if the server is correctly returning the model identifiers.

Exclusive content - Click Here  How do I log out of Discord?

Alternatives and ways to optimize the installation

The combination of LM Studio and Open WebUI is very complete, but it is not the only one available. Jan It offers a desktop experience focused on local models, while AnythingLLM It stands out for organizing documents and conversations through separate workspaces.

In a home installation or with few users, the default Open WebUI database is usually sufficient. If you plan to deploy multiple instances or serve a large number of users, it may be advisable to consider a configuration with PostgreSQL, external storage, and RedisSimply replacing SQLite is not enough to automatically achieve a scalable system.

You can also improve responses on documents by adjusting snippet size, overlap, the embedding model, and the retrieval system. For content that is mostly in Spanish, it's best to choose a multilingual embeddings model, instead of using one optimized primarily for English texts.

How to query PDF files with Open WebUI and a local AI
Related article:
How to query PDF files with Open WebUI and a local AI

What you should keep in mind to maintain privacy

When LM Studio processes the model and Open WebUI is hosted on your own infrastructure, the conversations can remain within your network. However, this depends on the configuration used.

Data could be sent externally if you connect Open WebUI with Commercial APIs, search engines, cloud-based OCR services, remote models, or external toolsYou should also check if the chosen extraction and embedding functions are running locally.

Therefore, simply installing both applications is not enough to guarantee that absolutely no data leaves the computer. To achieve a truly local environment, you must use models, embeds, databases, and tools hosted on your own infrastructure.

With LM Studio as the inference engine and Open WebUI as the operations center, you can create a flexible, multi-user local artificial intelligence environmentThe key is to use the correct address for each installation, protect the server if it is exposed to the network, and check which components process the documents before working with confidential information.