lms server start
Start the LM Studio local server with customizable port and logging options.
The lms server start command launches the LM Studio local server, allowing you to interact with loaded models via HTTP API calls.
Flags
--port (optional) : number
Port to run the server on. If not provided, uses the last used port
--cors (optional) : flag
Enable CORS support for web application development. When not set, CORS is disabled
--bind (optional) : string
Network address to bind the server to. Use "0.0.0.0" to listen on all IPv4 interfaces, or "127.0.0.1" (default) for localhost only. Can also be set via the LMS_SERVER_HOST environment variable.
Start the server
Start the server with default settings:
lms server startSpecify a custom port
Run the server on a specific port:
lms server start --port 3000Enable CORS support
For usage with web applications or some VS Code extensions, you may need to enable CORS support:
lms server start --corsWarning - Security Risk
Enabling CORS can expose your server to security risks; we recommend enabling authentication. Only do this if you know what you're doing.
Bind to a network address
To make the server available on your local network, run:
Heads Up
Any bind other than 127.0.0.1 exposes the server beyond localhost; we recommend enabling authentication. Only do this if you know what you're doing.
lms server start --bind 0.0.0.0Check the server status
See lms server status for more information on checking the status of the server.