LM Studio Headless Server: Setup, API Tokens and the Context Your Memory Can Hold

On a server with no display, LM Studio is five commands: the install script, lms daemon up, lms get, lms load, lms server start. The block below adds four checks around them: lms ls, lms load --estimate-only, lms ps and lms server status. The daemon those commands drive is llmster, which LM Studio’s documentation calls “a standalone background service that can run without a GUI”, and the same page states that you do not have to download the desktop app to use it from a terminal. The build to install is 0.4.28, dated 31 October 2026 on LM Studio’s release notes for that build, checked 11 November 2026: those notes list two fixes, a Mac fix for “Restart to apply update” reopening the current version instead of installing the update, and a fix for “chat template parsing for Flint model”.

Two things widely repeated about running LM Studio on a box with no screen are wrong. The server is not an open door by design: API tokens have shipped since 0.4.0, and LM Studio’s authentication page documents the toggle, so the third-party line that it “contains no built-in access control or authentication mechanisms” (from a headless walkthrough at gids.llmnet.nl) describes a state that ended with 0.4.0 on 28 January 2026. And the usual cache formula, which multiplies every layer by the context length, roughly doubles the figure on gpt-oss-20b when the runtime keeps a windowed cache for its sliding layers, because its published config.json declares a 128-token sliding window on half of its layers. The second error is the one that fails a load, so the memory arithmetic below is given as a rate per 1,000 tokens.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

Platforms that will refuse before you get that far

Headless is the right mode for this hardware for one concrete reason: a graphical wrapper takes system memory and VRAM of its own and needs a logged-in session with a display attached. Before you install anything, check the floor. LM Studio’s system requirements page rules out two machines people try to repurpose: Intel Macs (“macOS 14.0 or newer is required” and “Intel-based Macs are currently not supported”) and x64 CPUs without AVX2, checked 11 November 2026. On a Mac that does qualify you get a second runtime choice: MLX builds, shipped in 0.3.4 with an engine for running on-device models “super efficiently on Apple Silicon Macs”, alongside the GGUF files llama.cpp runs on every platform.

RequirementFloorWhy it bites on a screenless box
macOS14 or newer, Apple Silicon onlyNo Intel Macs, so an old Mac mini is not a candidate
Windowsx64 with AVX2, or ARMThe vendor’s headless page gives the PowerShell install line and sends Linux users to a dedicated startup-task page
Linuxx64 or ARM64 AppImage, Ubuntu 20.04 or newerThe docs call releases newer than Ubuntu 22 “not well tested”; a community systemd guide reports success on Ubuntu 24.04, Fedora 43 and Arch
BackendsCPU, CUDA, Vulkan, ROCm, MetalDecides whether --gpu max does anything at all
System RAM16 GB recommended by the vendor; the community guide suggests 32 GB for larger modelsWeights plus the full context cache are allocated up front, not as chats grow
VRAM4 GB dedicated on Windows per the vendor, 8 GB in the community guideWith no GUI there is no interface reserving VRAM, which is the point
Free disk50 GB in the community guideTwo or three quantized models plus AppImage updates

Read the machine against that table before the install. These commands report the runtimes the client examples below need, the card and its VRAM on an NVIDIA box, system RAM and swap, and free disk:

python3 --version                                        # for the Python client below
node --version                                           # only if you use the Node client
nvidia-smi --query-gpu=name,memory.total --format=csv    # NVIDIA cards: model name and VRAM
free -h                                                  # system RAM and swap
df -h                                                    # free disk for models and updates

The same disk check as a Python function, for a provisioning script that should refuse to download a model when space is short and for the tool-call example further down:

import shutil

def disk_free_gb(path: str = "/") -> int:
    return int(shutil.disk_usage(path).free / 1e9)

print(disk_free_gb("/"))

Five commands to a serving endpoint, on a box with no screen

The install script is a single line on macOS and Linux, and a single PowerShell line on Windows, both given on LM Studio’s headless service page. The lms CLI is not a separate download: it ships with the app or with llmster. The CLI reference notes that LM Studio must have run at least once before lms works, and that an lms command starts LM Studio if it is not already running; on a box where only llmster is installed, lms daemon up is that first run. LM Studio’s CLI reference lists all available commands grouped by category, which is where to confirm the names in the build you installed.

# macOS / Linux
curl -fsSL https://lmstudio.ai/install.sh | bash
# Windows, in PowerShell
irm https://lmstudio.ai/install.ps1 | iex

lms daemon up                     # add --json for status, PID and version
lms get openai/gpt-oss-20b
lms ls                            # models on disk, where you read the name to load
lms load openai/gpt-oss-20b --estimate-only
lms load openai/gpt-oss-20b --gpu max --ttl 3600 --identifier local-main
lms ps                            # models currently loaded in memory
lms server status                 # is the API server running
lms server start --port 1234

lms ls lists the models available on disk and lms ps lists the models currently loaded in memory, per the CLI reference and the lms ps page, so lms ps is the quick way to see whether the model is still resident after a boot or an idle spell, and lms server status answers the other question a boot leaves open, whether the API server itself is up, before you start it again. lms get also takes a specific quantization after the model name: the get reference gives lms get llama-3.1-8b@q4_k_m as its example.

After lms server start the endpoint listens on http://localhost:1234 and accepts OpenAI or Anthropic compatible clients, and lms load openai/gpt-oss-20b is the first-run example on the vendor’s own headless page. The maximum context length is also set at load time with --context-length, per the load reference, which is the number the cache arithmetic below sizes. Check lms --help on the build you installed before copying any of these lines, because names move between releases. lms daemon up --json returns daemon status, PID and version, so a script can watch the daemon without a window.

If the shell answers lms: command not found after the install, LM Studio’s documentation digest says lms lives in the bin folder of LM Studio’s working directory and gives a bootstrap command for macOS and Linux. Run lms with no arguments afterwards: the CLI reference describes that as the installation check, printing the version and the command list.

# macOS / Linux: put lms on the PATH, bootstrap it, then confirm
export PATH="$HOME/.lmstudio/bin:$PATH"
~/.lmstudio/bin/lms bootstrap
lms                               # no arguments: version and the list of commands

Weights plus KV cache: solving for the context length your memory can hold

The context setting, not the quantization, is what usually kills a headless load. The llmnet guide explains why: with many inference engines “the space for the maximum context length is allocated immediately upon model initialization”, so a 32,768-token ceiling you never use still costs its full cache the moment the model loads. Exceed the machine’s capacity and the CLI either errors out or falls back to swap, which the same guide describes as severely degrading performance. The cache is computable before you download anything, from three values in a model’s own config file:

Cache bytes per token = 2 (one key, one value) x layers that hold a full-context cache x key/value heads x head dimension x bytes per stored value. At two bytes per stored value, a layer with 8 key/value heads and a head dimension of 64 costs 2 KiB per token.

The correction that changes the two rows below: gpt-oss-20b’s published config.json declares 24 hidden layers, 8 key/value heads, a head dimension of 64, a sliding window of 128, and a layer type list that alternates sliding attention with full attention. Where the runtime keeps a windowed cache for the sliding layers, only 12 of those 24 layers hold a cache that grows with context. The other 12 hold at most 128 tokens each, a fixed 3 MiB that does not move when you raise the ceiling; lms load --estimate-only with your --context-length is the figure to trust on your build, and the load reference confirms that the estimate honours that flag. llama.cpp, the engine behind GGUF loads, carries that mechanism: its KV cache has a sliding-window (iSWA) implementation, added in this llama.cpp commit, keyed on the model’s window size and on which layers use it. We have not checked the MLX path the same way, so on a Mac read the estimator before trusting the first row. Counting all 24 layers, which is what a generic parameter-count formula does, doubles the long-context figure.

Attention geometryLayers holding a full-context cacheKV headsHead dimCache per tokenPer 1,000 tokensAt 4,096 tokensAt 32,768 tokens
gpt-oss-20b, windowed cache on the sliding layers (12 of 24 counted)1286424 KiB23.4 MiB0.10 GiB0.75 GiB
gpt-oss-20b, all 24 layers counted2486448 KiB46.9 MiB0.19 GiB1.50 GiB

Two readings matter for a server. First, the per-1,000-token figure is the number to keep: multiply it by the ceiling you want, add the weight file size from the model’s own page, and you have the load you are asking the machine to accept. Second, the geometry beats the parameter count. At a 32,768-token ceiling the windowed count asks for 0.75 GiB of cache while the generic one predicts 1.50 GiB, and on a card that is already nearly full that difference decides whether the model loads at all. We calculated both rows ourselves from the published config values at two bytes per stored value, counting only the layers whose cache grows with context, so each figure is the cache term alone and excludes the weight file and anything else the runtime allocates. The byte count scales every cell: a build that stores the cache at one byte per value halves each figure, one more reason to act on the estimator’s number for your build rather than on the table.

The weights are the other half of the budget and their arithmetic is simpler: parameters multiplied by bits per weight, divided by 8. A 3B model is therefore about 1.5 GB at 4-bit and about 3 GB at 8-bit, an 8B about 4 GB and 8 GB, a 14B about 7 GB and 14 GB. That is why LM Studio’s blog can say the distilled DeepSeek R1 0528 model at 8B runs “with as little as 4GB of RAM”, and why the context ceiling, allocated up front, is what pushes a small machine past that floor. The same blog dates Ministral 3 support to 0.3.33, if you are picking a current small model to sit under that budget.

Before you download a model that may not fit, let the vendor’s own estimator check the plan. lms load --estimate-only prints the expected footprint and whether the model clears your resource guardrails; for openai/gpt-oss-120b the output documented on the load reference reads “Estimated GPU Memory: 65.68 GB”. On that figure a rig is either a 120b machine or a 20b machine. The estimator is also how you learn a model is simply out of reach: LM Studio’s model page for DeepSeek V4 Flash 0731 lists a minimum system memory of 156 GB, because a model built from many experts still has to hold every expert. If a model does not fit entirely, --gpu takes a fraction from 0 to 1, off, or max, and partial offload buys you the larger model at a cost the llmnet guide names plainly: it “introduces latency due to communication over the PCIe bus”.

One model resident, the rest on an idle timer

Once the budget is known, decide what gets to stay in it. lms load takes --ttl, documented as: “If provided, when the model is not used for this number of seconds, it will be unloaded.” The defaults matter on a server: a model loaded with lms load has no TTL and stays until you unload it, a model a client loads just in time gets a 60-minute TTL, and auto-evict is on by default, all set out on LM Studio’s idle TTL and auto-evict page. Keeping a model loaded forever removes cold starts and holds that memory for as long as the model stays, which caps how many models can be resident at once. The llmnet guide’s recommendation for a headless box is the one to copy: keep one primary model permanently loaded and put an unload timeout on everything secondary.

Server state survives restarts, which changes what your unit file needs to do: the docs state that your last server state is saved and restored on app or service launch. Parallel requests with continuous batching have been available since 0.4.0, released 28 January 2026, the release that split the core into llmster and added a stateful REST API. The 0.4.0 release post credits that to the bundled llama.cpp engine, which graduated to 2.0.0 in the same release and brought “support for concurrent inference requests to the same model”, so a single resident model can answer several callers at once rather than queueing them. Speculative decoding is the other documented speed lever: 0.3.10 added it, pairing a small draft model with a large one, and those release notes say it “can speed up token generation by up to 1.5x-3x in some cases”, with the size of the gain depending on how well the draft predicts the main model.

Require an API token before you touch the bind address

The order of operations is token first, bind second, and the vendor says so on the server start reference: “Any bind other than 127.0.0.1 exposes the server beyond localhost; we recommend enabling authentication.” The default is loopback only, which is why a server that works locally refuses from the next machine. Authentication needs 0.4.0 or newer and is off until you turn it on. LM Studio’s authentication page states that “By default, LM Studio does not require authentication for API requests”, and that you toggle the switch under Developers Page, Server Settings so that “only requests with a valid API Token are accepted”. Create the token there, then prove it works from the client you intend to use before you widen the bind. LM Studio’s OpenAI compatibility page says existing OpenAI clients work “by switching up the ‘base URL’ property to point to your LM Studio instead of OpenAI’s servers”, so the client keeps presenting its key the way it already does.

# 1. Create the token in Developers Page > Server Settings, then test on loopback
curl -fsS -H "Authorization: Bearer $LMSTUDIO_API_KEY" \
     http://127.0.0.1:1234/v1/models

# the same call with no token, to confirm the token is actually required
curl -fsS http://127.0.0.1:1234/v1/models

# 2. Only now widen the bind
lms server start --port 1234 --bind 0.0.0.0

# 3. Narrow the audience at the firewall as well
sudo ufw allow from 192.168.1.0/24 to any port 1234 proto tcp

Token plus firewall is the minimum once the port is reachable by anything other than the loopback interface. The community systemd guide for headless LM Studio adds the two layers above that for anything beyond a trusted LAN: authentication at a reverse proxy such as nginx or traefik, an IP allowlist, and never exposing port 1234 to the internet unprotected. If you put nginx or Caddy in front of the server to terminate TLS, turn response buffering off on the streaming route, because nginx’s own admin guide says a proxied response “is not sent to the client until the whole response is received”, which turns a token stream into one lump at the end. If only you need remote access, the cheapest answer is to leave the bind on 127.0.0.1 and forward the port over SSH, because nothing new starts listening. Software Lifecycle’s governance line for this product is the same: enable API authentication on anything reachable from a network.

# on the client machine: forward local port 1234 to the server's loopback, no new listener on the server
ssh -N -L 1234:127.0.0.1:1234 [email protected]
# then point the client at http://127.0.0.1:1234/v1 as if the server were local

GPU in another room: LM Link against a LAN bind

If the GPU is in one machine and your editor is on another, there are two answers and they have different trust models. Binding to 0.0.0.0 with a token and a firewall rule puts one endpoint on the network for everything to share. LM Link does the opposite, per LM Studio’s LM Link page: “With LM Link, you can use a model loaded on a remote device as if it were loaded locally”, so your laptop keeps making requests to localhost while a stronger machine serves them, and nothing on the laptop has to learn a new address. The setting to pin down before you rely on it is routing: for models present on more than one linked device the REST API uses the model on the preferred device, and the same page adds that “The preferred device setting is per-machine”, so each box independently decides which remote machine answers. Set it deliberately on every client, or you will not know which GPU produced a given reply.

Repointing existing OpenAI or Anthropic code at port 1234

The migration is the base URL and the model name. The routes on the default port are OpenAI compatible (/v1/responses, chat completions, completions, embeddings, models), Anthropic compatible (/v1/messages), plus a native REST API, and the llmnet guide confirms the request and response bodies are the same shapes the cloud APIs accept. Since 0.4.0 that native API at /api/v1 also carries model download, load and unload endpoints alongside stateful chats, per LM Studio’s API changelog, so a deployment script can manage what is resident over HTTP instead of shelling out to lms. Keep the two surfaces straight, though: LM Studio’s REST documentation routes plugin integrations through the native /api/v1/chat path rather than the OpenAI-style /v1/chat/completions, and its capability table reserves things like the MCP servers you already have in LM Studio for the native route, so a plain chat client should stay on the OpenAI-compatible endpoints. The one piece of old advice that no longer holds is the arbitrary API key: any non-empty string works only while authentication is off. Give the loaded model a fixed name with lms load --identifier local-main, which the CLI reference describes as useful when you want to keep the model identifier consistent; clients then ask for local-main whatever file sits behind it, and swapping models is one change on the server rather than an edit in every caller.

Documented capabilities on these routes include tool calling, structured outputs, vision input, multi-GPU and MCP client use, and MCP via API has its own docs page. Tool calling in particular depends on the model rather than on your code: LM Studio’s own documentation digest walks through a model emitting a call where “the brackets are incorrect, and the call does not follow the `name, argument` format”, so when tool_calls comes back empty or malformed, suspect the model’s training and chat template first. Real clients already treat this endpoint as a provider: OpenClaw’s provider docs cover selecting LM Studio during its onboarding flow, and JetBrains documents LM Studio as a custom provider for Junie, which connects to the server, discovers the loaded models and offers them in its model picker. Any front end that accepts an OpenAI-compatible base URL points at the same address.

Two curl calls check the route and the model identifier before any SDK is involved. They read the base URL, token and identifier from variables, the same ones the Python client and the smoke test below use. The first call pipes the model list through Python’s standard library so the identifiers print as a plain list. The commented lines show the loopback base URL for a check run on the server itself, and the stand-in key that works only while authentication is still off.

export LMSTUDIO_BASE_URL="http://llm-box.lan:1234/v1"
export LMSTUDIO_API_KEY="paste-your-token-here"
# on the server itself, against loopback:
# export LMSTUDIO_BASE_URL="http://127.0.0.1:1234/v1"
# with authentication still off, any non-empty string stands in for the token:
# export LMSTUDIO_API_KEY="lm-studio"
MODEL_ID="local-main"

# which identifiers does the server answer to?
curl -s -H "Authorization: Bearer $LMSTUDIO_API_KEY" "$LMSTUDIO_BASE_URL/models" \
  | python3 -c "import json,sys; print([m['id'] for m in json.load(sys.stdin)['data']])"

# one completion against the stable identifier
curl -s -H "Authorization: Bearer $LMSTUDIO_API_KEY" -H "Content-Type: application/json" \
  -d "{\"model\":\"$MODEL_ID\",\"messages\":[{\"role\":\"user\",\"content\":\"say ready\"}]}" \
  "$LMSTUDIO_BASE_URL/chat/completions"

The Python client below runs in its own virtual environment, so installing the SDK does not touch the system packages on the server.

python3 -m venv .venv
source .venv/bin/activate
pip install openai
import os
from openai import OpenAI                 # or: pip install lmstudio for the native SDK

MODEL_ID = "local-main"                   # the stable identifier set with --identifier

client = OpenAI(
    base_url="http://llm-box.lan:1234/v1",
    api_key=os.environ["LMSTUDIO_API_KEY"],   # the token from Server Settings
    timeout=120,                              # a cold model loads from disk first
)

# the exact ID the server answers to, which is what "model not found" is about
models = [m.id for m in client.models.list().data]
print(models)

r = client.chat.completions.create(
    model=MODEL_ID,
    messages=[{"role": "user", "content": "Reply with one word: ready"}],
)
reply = r.choices[0].message.content
print(reply, r.usage.total_tokens)

The two routes worth checking on day one are streaming, because a long reply over a LAN is unusable without it, and strict structured output, because that is what lets a script consume the result. Both are the same request with one extra field.

# streaming: print tokens as they are produced
stream = client.chat.completions.create(
    model=MODEL_ID,
    messages=[{"role": "user", "content": "Describe this server's role in one sentence"}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta.content or ""
    if delta:
        print(delta, end="", flush=True)

# structured output: a strict JSON schema the reply has to satisfy
ticket = "The VPN drops every hour and nobody can reach the build server"
schema = {
    "type": "object",
    "properties": {
        "category": {"type": "string"},
        "urgent": {"type": "boolean"},
    },
    "required": ["category", "urgent"],
    "additionalProperties": False,
}
resp = client.chat.completions.create(
    model=MODEL_ID,
    messages=[{"role": "user", "content": f"Classify this support ticket: {ticket}"}],
    response_format={
        "type": "json_schema",
        "json_schema": {"name": "ticket_triage", "strict": True, "schema": schema},
    },
)
print(resp.choices[0].message.content)

Neither field is new: LM Studio’s blog lists the Structured Outputs API among the additions in 0.3.0, so the schema above is a long-standing route rather than a recent addition. What can still bite is an old build or a model that ignores constrained output and returns JSON the schema rejects, which is worth catching in a test before a script depends on it. The compatibility page lists Python, JS and C# clients, so the Node version of these files is the same two edits: baseURL pointed at the server and the key read from the environment, as in the block below. Keep the timeout generous in both, because the first request after a restart waits for the weights to come off disk.

// npm install openai, then save as check.mjs and run: node check.mjs
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "http://llm-box.lan:1234/v1",
  apiKey: process.env.LMSTUDIO_API_KEY,   // the token from Server Settings
  timeout: 120000,                        // milliseconds (120 s): a cold model loads from disk first
});

const res = await client.chat.completions.create({
  model: "local-main",
  messages: [{ role: "user", content: "Reply with one word: ready" }],
});
console.log(res.choices[0].message.content);

Tool calling uses the same Python client. The round trip below hands the model the disk helper from the preflight section, runs it when the model asks, and sends the result back for the final answer.

import json

tools = [{
    "type": "function",
    "function": {
        "name": "disk_free_gb",
        "description": "Free disk space in GB for a path on the server",
        "parameters": {
            "type": "object",
            "properties": {"path": {"type": "string"}},
            "required": ["path"],
        },
    },
}]
messages = [{"role": "user", "content": "How much disk is free on /?"}]

resp = client.chat.completions.create(model=MODEL_ID, messages=messages, tools=tools)
msg = resp.choices[0].message
if msg.tool_calls:                        # empty or malformed: suspect the model first
    call = msg.tool_calls[0]
    args = json.loads(call.function.arguments)
    messages.append(msg)
    messages.append({"role": "tool", "tool_call_id": call.id,
                     "content": str(disk_free_gb(args["path"]))})
    resp = client.chat.completions.create(model=MODEL_ID, messages=messages, tools=tools)
print(resp.choices[0].message.content)

One more check with the same client: pick the model from the list the server returns, exit with a clear message if the identifier is not loaded, and report the time to the first streamed token and to the end of the reply.

import sys
import time

wanted = os.environ.get("LMSTUDIO_MODEL", "local-main")   # the stable identifier

def pick_model() -> str:
    ids = [m.id for m in client.models.list().data]
    if wanted not in ids:
        sys.exit(f"{wanted} is not loaded; the server answers to {ids}")
    return wanted

results = []
start = time.perf_counter()
first = None
for chunk in client.chat.completions.create(
    model=pick_model(),
    messages=[{"role": "user", "content": "Reply with one word: ready"}],
    stream=True,
):
    if first is None and chunk.choices[0].delta.content:
        first = time.perf_counter() - start
final = time.perf_counter() - start
results.append({"first_token_s": first, "final_s": final})
print(results)

Surviving a reboot: the systemd unit, and why the Xvfb recipe is obsolete

LM Studio’s developer docs carry both a page for running as a headless service and a page for setting llmster up as a startup task on Linux: write the unit, reload the daemon, enable and start lmstudio.service. The unit below follows the one in the llmnet guide, with the longer start timeout the community guide uses because models are slow to load, and with both streams appended to files. Those files matter more here than anywhere else: with no terminal attached, as the llmnet guide puts it, “these log files are the only source of information if model loading fails or the server crashes unexpectedly”.

# /etc/systemd/system/lmstudio.service
[Unit]
Description=LM Studio headless server
After=network-online.target
Wants=network-online.target

[Service]
User=llm
Environment=HOME=/home/llm
ExecStart=/usr/local/bin/lms server start --port 1234
Restart=on-failure
RestartSec=10
TimeoutStartSec=300
StandardOutput=append:/var/log/lmstudio/server.log
StandardError=append:/var/log/lmstudio/error.log

[Install]
WantedBy=multi-user.target
sudo mkdir -p /var/log/lmstudio
sudo systemctl daemon-reload
sudo systemctl enable --now lmstudio.service
systemctl status lmstudio.service --no-pager
journalctl -u lmstudio.service --no-pager   # systemd's own record of the unit starting and stopping
sudo reboot        # then run the smoke test below to confirm the endpoint came back

The log files cover a crash. For a request that fails while the service is up, lms log stream in a second terminal lets you inspect the exact strings LM Studio sends to and receives from models and, new in 0.3.26 per that page, streams server logs, which the page recommends for debugging prompt templates, model input and output, and server operations. Run it, retry the failing request, and read what the server saw.

lms log stream      # second terminal: watch model input and output and server logs while you retry

Because the last server state is restored on service launch, the unit does not have to re-issue lms load; add it when a specific model should already be resident, under its stable identifier, before the first request arrives. On macOS the equivalent is launchd, with a .plist in /Library/LaunchDaemons/ for a system service or ~/Library/LaunchAgents/ for a user one. The community guide also drives periodic AppImage updates from a systemd timer, which works because the download URL is stable.

One path to skip: the Headless-LMStudio-Server community guide extracts the desktop AppImage into squashfs-root and runs it under xvfb-run, because a virtual frame buffer is, in its words, “required by the Electron backend”. That is a workaround for the GUI build, and llmster exists to remove the need for it. If llmster installs on your platform, you do not need Xvfb, a fake display, or the extraction step.

Where the licence stops, and what the vendor’s docs index covers

The local app and llmster have been free for home and work use since 8 July 2025, and nothing in this guide needs the paid tiers (Bionic+ at $20 per month, Pro at $100 per month on LM Studio’s pricing page). Bionic, the separate agent app, is at 1.2.0, dated 5 November 2026 on LM Studio’s Bionic changelog, checked 11 November 2026, and the two apps are built to coexist: the 1.1.8 notes say Bionic “uses LM Studio for local model inference while LM Studio is running”, and require LM Studio 0.4.26 or newer. That boundary is about scope rather than price. The app is proprietary under LM Studio’s app terms, which grant a licence to use it “solely for Your personal and / or internal business purposes” and bar transferring or using it “for service bureau use, as an application service provider, or a software-as-a-service”. The lms CLI and SDKs are MIT licensed, and GGUF, MLX and the API shapes are open standards, so your code moves easily even though your operations do not.

That draws a clean line. An internal endpoint for your team, your editors and your CI is what this product is licensed for. For anything a customer touches, the instruction in Software Lifecycle’s LM Studio review is the right one: “For customer-facing serving, move to vLLM, llama.cpp’s llama-server or a hosted API”. llama.cpp is the engine LM Studio runs GGUF files on, and also the engine behind llama-server. If you are still choosing a runtime, our LM Studio versus Ollama comparison covers the choice.

For boot-time setup, LM Studio’s headless service page tells Linux users to “see Linux Startup Task”, and as checked on 11 November 2026 its developer docs index lists Authentication, that Linux startup task, running as a service, LM Link, MCP via API, idle TTL with auto-evict and the REST API overview. Those are the vendor pages this guide builds on. On macOS, launchd as described above is the boot-time route.

Machines, configurations, and the smoke test that proves them

MachineWhat to loadContext ceilingOffload and TTLBindWhy
8 GB mini PC, no GPUA 4-bit model in the 3B class, about 1.5 GB of weights4,096--gpu off, --ttl 3600 on everything127.0.0.1 plus SSH forwardingSmall weights plus a modest up-front cache leave room for the OS; confirm with --estimate-only before the download, not after
16 GB box, 8 GB cardA 4-bit model in the 8B class, about 4 GB of weights8,192--gpu max, --ttl 3600 on secondary models0.0.0.0 with a tokenWeights and the cache for the whole ceiling have to fit the card together, which the same model at 8-bit (about 8 GB) would already fill on its own
32 GB workstationopenai/gpt-oss-20b resident as local-main32,768--gpu max, no --ttl on the primary0.0.0.0 with a tokenWith a windowed cache on its sliding layers the long-context cache is 0.75 GiB rather than the 1.50 GiB a generic formula predicts, so the big ceiling is affordable; confirm with --estimate-only
Enough memory to clear the 65.68 GB estimate, one big GPUopenai/gpt-oss-120b, after --estimate-onlyWhatever the estimate leaves--gpu max, no --ttl127.0.0.1 plus LM LinkThe documented estimate for that model is 65.68 GB, and LM Link lets laptops keep calling localhost
Anything customer facingDo not build it heren/an/an/aThe blocker is the licence, not the hardware: service bureau and SaaS use are barred, so this belongs on vLLM or llama-server

A smoke test, and the failures it catches

Nobody is watching a window on this machine, so the health check has to be a scheduled command. This one checks the CLI, the token path, the model identifier and one completion, and exits non-zero on any failure, which is all cron or a CI step needs.

#!/usr/bin/env bash
# lmstudio-smoke.sh: exit non-zero if the headless endpoint is not serving
set -u
BASE="${LMSTUDIO_BASE_URL:-http://127.0.0.1:1234/v1}"
TOKEN="${LMSTUDIO_API_KEY:?set LMSTUDIO_API_KEY}"
MODEL="${LMSTUDIO_MODEL:-local-main}"
fail=0

lms ps || fail=1

curl -fsS -m 120 -H "Authorization: Bearer $TOKEN" \
  "$BASE/models" -o /tmp/models.json || { echo "models: request failed"; fail=1; }
grep -q "$MODEL" /tmp/models.json    || { echo "$MODEL not loaded"; fail=1; }

curl -fsS -m 120 -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d "{\"model\":\"$MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"say ready\"}]}" \
  "$BASE/chat/completions" -o /tmp/chat.json || { echo "chat: request failed"; fail=1; }

# with authentication on, the same call without the token must not be served
curl -fsS -m 120 "$BASE/models" -o /dev/null \
  && echo "warning: a request with no token was served"

exit $fail
SymptomCause specific to running headlessWhat to run
Serves on the box, refuses from another machineThe default bind is the loopback interface onlyTurn authentication on, then lms server start --bind 0.0.0.0
Every client call fails against the hostBase URL missing the /v1 the docs givePoint clients at http://host:1234/v1
Requests rejected after you enable authenticationOnly requests with a valid API token are acceptedCreate the token in Developers Page, Server Settings and send it from the client
model not foundThe identifier moved when you swapped model fileslms load --identifier local-main, then GET /v1/models to confirm
Error or swap thrash on loadWeights plus the full context cache exceed memorylms load --estimate-only, then lower --context-length
Generation far slower than expectedPartial offload sends layers across the PCIe busRaise --gpu (0 to 1, off, max), or shrink the model so it fits the card; lms ps shows what is loaded
Model gone after an idle spellA client JIT-loaded it by name, so it got the 60-minute default TTL, or you set --ttlLoad the primary with lms load and no --ttl (no TTL by default) and point clients at its identifier; keep --ttl on secondaries; lms ps confirms what is resident
lms: command not found in the unitService PATH differs from your shellUse the absolute path in ExecStart, as the documented unit does

LM Studio lists CI among llmster’s target environments, alongside Linux servers, screenless GPU rigs and boot-time services; if a run there has to reproduce later, pin the model file and the LM Studio version.

Nadia Dubois

Nadia Dubois

AI, software and the business of tech

Nadia Dubois covers AI, software and the business of tech for Tech Insider: AI models and the products built on them, developer and productivity software, pricing, and the company decisions and regulation that shape the industry.

View all articles