Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 0_app/0_root/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ You can attach documents to your chat messages and interact with them entirely o

Read more about how to use this feature in the [Chat with Documents](app/basics/rag) guide.

## Run LM Studio without the GUI (llmster)

llmster is the headless version of LM Studio, no desktop app required. It's ideal for servers, CI environments, or any machine where you don't need a GUI.

Learn more: [Headless Mode](/docs/developer/core/headless).

## Use LM Studio's API from your own apps and scripts

LM Studio provides a REST API that you can use to interact with your local models from your own apps and scripts.
Expand Down
71 changes: 51 additions & 20 deletions 1_developer/0_core/headless.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,72 @@
---
title: "Run LM Studio as a service (headless)"
sidebar_title: "Headless Mode"
sidebar_title: "`llmster` - Headless Mode"
description: "GUI-less operation of LM Studio: run in the background, start on machine login, and load models on demand"
index: 2
---

LM Studio can be run as a service without the GUI. This is useful for running LM Studio on a server or in the background on your local machine. This works on Mac, Windows, and Linux machines with a graphical user interface.
LM Studio can be run as a background service without the GUI. There are two ways to do this:

## Run LM Studio as a service
1. **llmster** (recommended) — a standalone daemon, no GUI required
2. **Desktop app in headless mode** — hide the UI and run the desktop app as a service

Running LM Studio as a service consists of several new features intended to make it more efficient to use LM Studio as a developer tool.
## Option 1: llmster (recommended)

1. The ability to run LM Studio without the GUI
2. The ability to start the LM Studio LLM server on machine login, headlessly
3. On-demand model loading
llmster is the core of the LM Studio desktop app, packaged to be server-native, without reliance on the GUI. It can run on Linux boxes, cloud servers, GPU rigs, or your local machine without the GUI. See the [LM Studio 0.4.0 release post](/blog/0.4.0) for more details.

## Run the LLM service on machine login
<img src="/assets/blog/0.4.0/llmster@2x.png" alt="llmster" style="" data-caption="" />

To enable this, head to app settings (`Cmd` / `Ctrl` + `,`) and check the box to run the LLM server on login.

### Install llmster

**Linux / Mac**

```bash
curl -fsSL https://lmstudio.ai/install.sh | bash
```

**Windows**

```bash
irm https://lmstudio.ai/install.ps1 | iex
```

### Start llmster

```bash
lms daemon up
```


See the [daemon CLI docs](/docs/cli/daemon/daemon-up) for full reference.

For setting up llmster as a startup task on Linux, see [Linux Startup Task](/docs/developer/core/headless_llmster).

## Option 2: Desktop app in headless mode

This works on Mac, Windows, and Linux machines with a graphical user interface. It's useful if you already have the desktop app installed and want it to run as a background service.

### Run the LLM service on machine login

Head to app settings (`Cmd` / `Ctrl` + `,`) and check the box to run the LLM server on login.

<img src="/assets/docs/headless-settings.webp" style="" data-caption="Enable the LLM server to start on machine login" />

When this setting is enabled, exiting the app will minimize it to the system tray, and the LLM server will continue to run in the background.

### Auto Server Start

Your last server state will be saved and restored on app or service launch.

To achieve this programmatically:

```bash
lms server start
```

## Just-In-Time (JIT) model loading for REST endpoints

Useful when utilizing LM Studio as an LLM service with other frontends or applications.
Applies to both options. Useful when using LM Studio as an LLM service with other frontends or applications.

<img src="/assets/docs/jit-loading.webp" style="" data-caption="Load models on demand" />

Expand All @@ -43,16 +84,6 @@ Useful when utilizing LM Studio as an LLM service with other frontends or applic

JIT loaded models will be auto-unloaded from memory by default after a set period of inactivity ([learn more](/docs/developer/core/ttl-and-auto-evict)).

## Auto Server Start

Your last server state will be saved and restored on app or service launch.

To achieve this programmatically, you can use the following command:

```bash
lms server start
```

### Community

Chat with other LM Studio developers, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
Expand Down
22 changes: 22 additions & 0 deletions 1_developer/0_core/lmlink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Using LM Link
sidebar_title: Using with LM Link
description: Use a remote device's model via the REST API with LM Link
index: 3
---

## Overview

With [LM Link](/docs/lmlink), you can use a model loaded on a remote device as if it were loaded locally — from any machine on the same link. This naturally extends to the REST API and SDK: your laptop can make requests to `localhost` and have them served by a powerful remote machine on your network.

Requests to `localhost` still work as normal. LM Studio internally uses the model on the remote device as if it were loaded locally. For models present on multiple devices, the REST API will use the model on the preferred device.

<img src="/assets/docs/rest-link-diagram.png" data-caption="Sequence diagram: REST API request routed through LM Link to a remote device" />

The preferred device setting is per-machine. Each device on the link independently controls which remote machine it prefers. See [how to set a preferred device](/docs/lmlink/basics/preferred-device) for more details.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


## Use the REST API as normal

Use the REST API exactly as you would locally. See the [REST API docs](/docs/developer/rest) for usage details.

If you're running into trouble, hop onto our [Discord](https://discord.gg/lmstudio)
2 changes: 1 addition & 1 deletion 1_developer/2_rest/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ variants:
"model": "openai/gpt-oss-20b",
"context_length": 16384,
"flash_attention": true,
"echo_load_config": true,
"echo_load_config": true
}'
```
````
Expand Down
2 changes: 1 addition & 1 deletion 1_developer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ Full docs: [LM Studio REST API](/docs/developer/rest)
## Helpful links

- [API Changelog](/docs/developer/api-changelog)
- [Local server basics](/docs/developer/core)
- [Local server basics](/docs/developer/core/server)
- [CLI reference](/docs/cli)
- [Discord Community](https://discord.gg/lmstudio)
20 changes: 20 additions & 0 deletions 3_cli/2_daemon/daemon-down.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "`lms daemon down`"
sidebar_title: "`lms daemon down`"
description: Stop llmster from the CLI.
index: 2
---

The `lms daemon down` command stops the running llmster.

```shell
lms daemon down
```

```lms_info
`lms daemon down` only works if llmster is running. It will not stop LM Studio if it is running as a GUI app.
```

### Learn more

To find out more about llmster, see [Headless Mode](/docs/developer/core/headless).
48 changes: 48 additions & 0 deletions 3_cli/2_daemon/daemon-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "`lms daemon status`"
sidebar_title: "`lms daemon status`"
description: Check whether llmster is running.
index: 3
---

The `lms daemon status` command reports whether llmster is currently running.

### Flags

```lms_params
- name: "--json"
type: "flag"
optional: true
description: "Output the status in JSON format"
```

## Check daemon status

```shell
lms daemon status
```

### JSON output

For scripting or automation:

```shell
lms daemon status --json
```

Example output when running:
```json
{"status":"running","pid":12345,"isDaemon":true}
```

Example output when not running:
```json
{"status":"not-running"}
```

### Start or stop the daemon

- [`lms daemon up`](/docs/cli/daemon/daemon-up) — start the daemon.
- [`lms daemon down`](/docs/cli/daemon/daemon-down) — stop the daemon.

To find out more about llmster, see [Headless Mode](/docs/developer/core/headless).
46 changes: 46 additions & 0 deletions 3_cli/2_daemon/daemon-up.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: "`lms daemon up`"
sidebar_title: "`lms daemon up`"
description: Start llmster from the CLI.
index: 1
---

The `lms daemon up` command starts llmster

### Flags

```lms_params
- name: "--json"
type: "flag"
optional: true
description: "Output the result in JSON format"
```

## Start the daemon

```shell
lms daemon up
```

If the daemon is not already running, this starts it and prints the PID. If it is already running, it reports the current status.

### JSON output

For scripting or automation:

```shell
lms daemon up --json
```

Example output:
```json
{"status":"running","pid":26754,"isDaemon":true,"version":"0.4.4+1"}
```

### Check the daemon status

See [`lms daemon status`](/docs/cli/daemon/daemon-status) to check whether the daemon is running.

### Learn more

To find out more about llmster, see [Headless Mode](/docs/developer/core/headless).
49 changes: 49 additions & 0 deletions 3_cli/2_daemon/daemon-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: "`lms daemon update`"
sidebar_title: "`lms daemon update`"
description: Update llmster to the latest version.
index: 4
---

The `lms daemon update` command fetches and installs the latest version of llmster.

### Flags

```lms_params
- name: "--beta"
type: "flag"
optional: true
description: "Update to the latest beta release"
```

## Update the daemon

Stop the daemon first:

```shell
lms daemon down
```

Then run the update:

```shell
lms daemon update
```

Fetches the latest stable release and installs it.

### Update to the beta channel

```shell
lms daemon update --beta
```

### After updating

Start the daemon again to use the new version:

```shell
lms daemon up
```

To find out more about llmster, see [Headless Mode](/docs/developer/core/headless).
20 changes: 20 additions & 0 deletions 3_cli/3_link/link-disable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "`lms link disable`"
sidebar_title: "`lms link disable`"
description: Disable LM Link on this device from the CLI.
index: 2
---

The `lms link disable` command disables LM Link on this device. The device will no longer connect to or be visible to other devices on the link.

## Disable LM Link

```shell
lms link disable
```

You can re-enable LM Link at any time with [`lms link enable`](/docs/cli/link/link-enable).

### Learn more

See the [LM Link documentation](/docs/lmlink) for a full overview of LM Link.
32 changes: 32 additions & 0 deletions 3_cli/3_link/link-enable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "`lms link enable`"
sidebar_title: "`lms link enable`"
description: Enable LM Link on this device from the CLI.
index: 1
---

The `lms link enable` command enables LM Link on this device, allowing it to connect with other devices on the same link.

```lms_info
LM Link requires an LM Studio account. Run `lms login` first if you haven't already.
```

## Enable LM Link

```shell
lms link enable
```

After enabling, the CLI waits for a connection to be established. If there are issues, the relevant next step is printed.

### Check the connection status

See [`lms link status`](/docs/cli/link/link-status) to verify the connection and see connected peers.

### Disable LM Link

See [`lms link disable`](/docs/cli/link/link-disable) to turn LM Link off.

### Learn more

See the [LM Link documentation](/docs/lmlink) for a full overview of LM Link.
20 changes: 20 additions & 0 deletions 3_cli/3_link/link-set-device-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "`lms link set-device-name`"
sidebar_title: "`lms link set-device-name`"
description: Rename this device on LM Link from the CLI.
index: 4
---

The `lms link set-device-name` command sets a display name for this device, visible to other devices on the link.

## Rename this device

```shell
lms link set-device-name "My Mac Studio"
```

The new name takes effect immediately and is visible to connected peers via [`lms link status`](/docs/cli/link/link-status).

### Learn more

See the [LM Link documentation](/docs/lmlink) for a full overview of LM Link.
Loading