Run it headless / always-on
Start LM Studio from the command line and serve your whole LAN
Since LM Studio 0.4 you do not need the desktop GUI to run the server. The lms CLI starts and controls everything from a terminal — which means you can run it on a headless server, a spare laptop, or in a startup script. A standalone daemon called llmster takes this further and runs LM Studio as a persistent service. This opens up a shared private endpoint that your whole lab network can point at.
- 1 Confirm the CLI is available: open a terminal and run
lms --version. If the command is not found, open LM Studio's settings and enable 'Install CLI tools', or download the CLI package from lmstudio.ai. - 2 Start the server from the terminal:
lms server start. Load a model:lms model load lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF(use the exact name shown in LM Studio's model list). Check status:lms server status. - 3 Serve on your LAN (so other machines can reach it): in LM Studio's Developer tab, find the network binding setting and change it from
localhostto your machine's LAN IP (e.g.0.0.0.0to bind all interfaces, or the specific IP). Restart the server. Other machines on the same network can now callhttp://.:1234/v1 - 4 Stop the server cleanly:
lms server stop. - 5 For a persistent always-on daemon: install
llmster(the standalone LM Studio server daemon, available at lmstudio.ai/llmster) and register it as a system service. Once running, it starts automatically on boot and the GUI is never needed. - 6 AnythingLLM integration (optional): AnythingLLM's settings let you point its LLM provider at
http://localhost:1234/v1— the same URL. This gives you a RAG document-chat interface backed by your local model, fully offline.
You started the LM Studio server from the CLI without opening the GUI, and confirmed it responds to a curl call on your LAN IP.
Write a startup script for your lab's shared private endpoint
A one-file shell script that starts LM Studio headless, loads a model, and checks that the server is up is all you need to turn a spare machine into a shared private AI endpoint.
Write a `start-local-llm.sh` (macOS/Linux) or `start-local-llm.ps1` (Windows) that starts the LM Studio server, loads your chosen model, and prints the endpoint URL.
- 1 Create the script file. On macOS/Linux:
`bash #!/bin/bash lms server start lms model load YOUR_MODEL_NAME echo 'LM Studio API ready at http://localhost:1234/v1' lms server status` - 2 Make it executable:
chmod +x start-local-llm.sh. - 3 Run it and confirm the server starts and the model loads.
- 4 Test from a second machine on the same network using curl with your LAN IP instead of localhost.
A working startup script and a curl response from another machine (or from localhost if you are working solo).