A workstation can run local models for an application on a second device. Serving LM Studio on the local network gives that device an API address to use while the models stay on the workstation.

Binding to a LAN IP address restricts the listener to connections addressed to that IP. Routing and firewall rules determine which clients can reach it. With Require Authentication enabled, the API requires a valid token.

The local server URL uses HTTP, so a device that can observe the traffic can read the bearer token. Use a private network you trust for both devices, with no Internet port forwarding. A remote model-list request can prove access before you load a model.

Steps to serve LM Studio on a local network:

  1. Open Model Server in the LM Studio sidebar.

    LM Studio 0.4.0 or later supports token authentication. If Model Server is hidden, enable Developer mode in App Settings. If the server is already running, stop it before changing the settings.
    Related: How to stop the LM Studio server

  2. Open Server Settings in the Local Server pane.
  3. Set Require Authentication to on.

    When the server starts with authentication enabled, existing clients need a valid API token to reach the API.

  4. Set Allow per-request MCPs to off.

    The model-list request only needs baseline API access.

  5. Confirm Allow calling servers from mcp.json is off.

    If the switch is on, turn it off before starting the server.

  6. Confirm Enable CORS is off.

    The curl client connects directly and does not need cross-origin browser access. If the switch is on, turn it off.

  7. Retrieve the client token from your secret store on the second device.

    A token for model listing only needs baseline API access. In Manage Tokens, both additional MCP permissions can stay set to Deny. If you issue a token, LM Studio shows its value once.
    Related: How to create an API token in LM Studio

  8. Find the workstation's IPv4 address on the trusted LAN interface.
    ip -4 -br address

    On Linux, this lists the IPv4 address and prefix for each interface. The bind takes the address by itself, such as 10.37.129.26 without /24. On other systems, check the connected interface in the workstation's network settings. The address shown here comes from an isolated private LAN.

  9. Start the server with lms bound to the workstation's LAN IPv4 address.

    Devices that can reach this address and port can connect to the server. The address in the command must match your workstation, which may differ from 10.37.129.26. A bind to 0.0.0.0 listens on every IPv4 interface. If the workstation firewall blocks the connection, allow TCP 1234 only from the intended client or trusted subnet.

    lms server start \
      --bind 10.37.129.26 \
      --port 1234

    The lms command comes with LM Studio. The --bind flag selects one address and --port selects the TCP port. If the port is occupied, choose an available port and use it throughout.
    Related: How to set the LM Studio server port

  10. Confirm Reachable at shows the LAN address and port in the running Local Server pane.

    If you see a loopback address or an unexpected interface, stop the server and start it again with the intended LAN address.

  11. Check the server status on the workstation with lms.
    lms server status \
      --json --quiet

    The JSON reports "running": true and "port": 1234 when the server is running on that port. The Reachable at field supplies the listen address.

  12. Set the model-list URL from Reachable at in a Bash shell on the second device.
    host=10.37.129.26:1234
    url=http://$host
    url+=/api/v1/models

    If your address or port differs from the example, put the values from Reachable at on the host= line. Both requests use the resulting url.

  13. Send a model-list request without a token from the same Bash shell.
    curl -q -sSi \
      --noproxy '*' \
      --max-time 10 "$url"

    The -q option skips curl's settings file, and --noproxy '*' bypasses proxies. The -sS options hide the progress meter while keeping errors visible, and -i adds the HTTP status and headers to the output.

  14. Confirm the request without a token returns HTTP/1.1 401 Unauthorized.

    If you get HTTP 200, check the URL against Reachable at. If the address is right, stop the server, turn on Require Authentication, and restart it with the intended bind and port. If the connection is refused or times out, check the workstation address, port, client route and firewall rule. For a different HTTP error, check Reachable at and confirm that the URL ends in /api/v1/models. Once the problem is fixed, repeat the request without a token.

  15. Start the concealed token prompt in the same Bash shell after the 401.

    Both requests use $url from this shell. If the URL changes, repeat the request without a token and confirm 401 at the new URL before entering the token.

    (
      set +x
      IFS= read -rs \
        -p 'API token: ' \
        token || exit 1
      printf '\n' >&2
      printf '%s %s\n' \
        'Authorization:' \
        "Bearer $token" |
        curl -q -sSi \
          --noproxy '*' \
          --max-time 10 \
          -H @- "$url"
    )

    Bash hides the token as you enter it. The -H @- option makes curl read the header from standard input. The token stays out of curl's arguments and shell history.

  16. Paste the client token at the API token: prompt.
  17. Press Enter to send the authenticated request.
  18. Confirm the response is HTTP/1.1 200 OK with a models array.

    An empty array also confirms access. If the request returns HTTP 401, check that the token came from this workstation and is still active in Manage Tokens. If a token is exposed, revoke it there and issue a replacement for the affected client.

Share this guide