LM Studio separates its desktop chat from the local model server that other applications can call. Open WebUI can connect to that server and use a loaded LM Studio model for web chat, even when the desktop chat window is not being used.

An existing LM Studio server must already be running with a chat model loaded. Just-in-time loading can also expose downloaded models in its model list before inference begins.

Open WebUI makes provider requests from its backend, which can be in a different network from the LM Studio desktop. An unauthenticated LM Studio endpoint allows any client that can reach it to run model inference, so access must be limited to a trusted network or protected with authentication.

Steps to connect LM Studio to Open WebUI:

  1. Check the loaded chat model on the machine running LM Studio.
    $ lms ps

    The IDENTIFIER column names loaded models. The connection uses company-chat as the chat model identifier. An empty list means a model still needs loading in LM Studio.

  2. Query the LM Studio model list on the server machine.
    $ curl --fail-with-body --silent --show-error "http://127.0.0.1:1234/v1/models"

    The default server port is 1234. The response's data array should include the intended model id, such as company-chat.

  3. Test the LM Studio endpoint from the Open WebUI container.
    $ docker exec open-webui curl --fail-with-body --silent --show-error "https://llm.example.com/v1/models"

    The HTTPS address represents an existing endpoint in front of LM Studio, such as a TLS reverse proxy for its local API. The base URL must reach that server from the Open WebUI backend; a container's loopback address points inside the container itself.

  4. Open the user menu in Open WebUI.

  5. Select Settings.

  6. Select Connections under Admin → AI.
  7. Click the plus beside Manage OpenAI API Connections.

    Connection Type defaults to External, and API Type defaults to Chat Completions.

  8. Enter https://llm.example.com/v1 in URL.
  9. Choose None under Auth for the private LM Studio endpoint without authentication.

    A token-protected endpoint requires its real credential; a placeholder key cannot authenticate it.

  10. Expand Advanced.
  11. Choose LM Studio in Provider.
  12. Click Verify Connection beside URL.

  13. Connect Open WebUI to LM Studio with the dialog's Save button.
  14. Return to the chat with Back.
  15. Open the model picker in the chat composer.

  16. Select the LM Studio chat model company-chat.

  17. Enter What is the capital of France? in the message box.
  18. Send the message to the selected LM Studio model.

    The completed assistant reply appears under company-chat.

Share this guide