Skip to main content

Posts

Showing posts from February, 2025

Start LM Studio server as a Windows service on system boot

 In order to connect to LM Studio from your LAN, and use programs like Chatbox with it, you need to start its server mode, and enable CORS:  https://lmstudio.ai/docs/api However, currently there is no simple way to start LM Studio on PC startup, without logging in as a user. You can if you auto-login by following these steps:  https://lmstudio.ai/docs/api/headless However, I want to start the PC remotely (via Wake-on-LAN), and be able to connect to LM Studio, select the desired model and use it, without logging into the PC.  Here's what we can do: 1. Download NSSM:  https://nssm.cc/  and copy it to "C:\Program Files\nssm" for convenience. 2. Identify the location of lms.exe . In my case it's in " %UserProfile%\.cache\lm-studio\bin ". Replace " %UserProfile% " with the real path for your system (e.g. " C:\Users\MyUser "). 3. Navigate to " %UserProfile%\.cache\lm-studio\bin " and create the following file named lms-startup.bat . ...