What this guide covers
When you finish, you can chat in the graphical interface or have scripts call the local API, and the server keeps running after you close the window. You need: an Apple silicon machine, the memory the vendor recommends, and a remote desktop.
Steps
Check the system requirements, then install
The official LM Studio system requirements state that macOS needs Apple silicon, and they give the macOS version and recommended memory. Compare against them when choosing a configuration to order. Download the installer from the official website in the browser inside the remote desktop, drag it into Applications and launch it.
Download your first model in the app
Use the in-app search to pick a model that fits this machine's memory and download it. Model files are large, and download time depends on the line and its load. You can disconnect the remote desktop during the download and the app carries on at the remote end, but do not quit the app itself. The model storage directory can be seen and changed on the app's My Models page.
Enable the lms command line tool
According to the official CLI docs,
lmsships with LM Studio, but the app has to have been run at least once first. After that,lms --helpin the terminal shows the usage:lms lslists models on disk,lms pslists models loaded into memory,lms loadandlms unloadload and unload, andlms getsearches and downloads. The benefit of the command line is that you do not need to open the graphical interface just to switch models.Set the local server to start at login
The official headless docs explain that once you tick the option in the app settings to run the LLM server at login, closing the window minimizes the app to the menu bar and the server keeps running. You can also start it from the command line with
lms server start. Note the words "at login": after the machine restarts, the server comes up only once your account has logged in to the desktop.Load on demand and let memory free itself
With JIT loading from the official docs turned on, a model that is not in memory is loaded automatically when the API is called, and a model loaded this way is unloaded automatically after being idle for a while by default. A remote machine often has other tasks running in parallel, so keeping this default is better than letting a large model hold memory all the time. A slow first call after a long gap means the model is loading again, not that it has frozen.
Do not turn on serving over the network
By default the local server is for programs on this Mac. If the settings have a switch such as serving on the local network, keep it off: the network this machine sits on is not your private network, and the rental terms do not allow changing the network configuration or forwarding ports to the outside. Keep calling scripts on the same machine and reach the server through
localhost.Two things to watch when sharing the machine with Ollama
Each downloads its own models and uses its own share of disk, so do not keep the same model in both. Each also loads models into memory, and loading one large model in each at the same time easily fills the memory, which shows up as a clearly laggy remote picture. Choose one as the permanent service, and unload the model or quit the other when you are done with it.
FAQ
Will the graphical interface lag badly through a remote desktop?
The interface is mostly text and does not ask much of the picture. Actual smoothness depends on your own local network line. The interface scrolls quickly during generation, so you can move everyday calls to scripts that use the local API.
Can LM Studio be used for commercial projects?
Go by LM Studio's official terms of use, and confirm this yourself. Models also each have their own license, so read the notes on the model page before downloading.
The disk is nearly full. What should I delete first?
Use lms ls to see which models are largest and which you no longer use, then delete them on the My Models page. The built-in disk cannot be expanded during the rental term. If you need more space, choose the configuration on the plans page before ordering.
Related
- How much RAM do I need for local LLMs on a Mac? Rent a Mac mini for a month before buying
- How to install Ollama on a remote Mac mini and run local models long term
- How to check logs and disk space on a remote Mac mini
- Can I still connect to a remote Mac mini after it restarts?
- Should I rent a Mac mini or buy one?
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support