LAN Setup
Bind your CLI to the LMX inference endpoint on your local network. This guide covers host routing, credential handling, failover policy, and end-to-end connectivity validation.
Overview
The Opta CLI communicates with LMX over your local network using HTTP. LMX exposes an OpenAI-compatible API on a configurable port (default 1234). You need to tell the CLI where to find this server.
Configure LMX Host
Point the CLI at your LMX server by setting the host IP and port:
Set the LMX host address
Replace the IP with your LMX server's local address. This is typically your dedicated Apple Silicon host's static IP.
Set the port (if non-default)
The default port is 1234. Only change this if your LMX instance is configured differently.
Confirm the configuration
API Key Setup
LMX supports optional API key authentication. If your LMX instance requires a key, generate one and configure the CLI to use it.
Generate an API key
Creates a new API key and stores it securely in your system keychain.
Verify the key is stored
Failover Hosts
If you have multiple LMX instances (for example, a dedicated Apple Silicon host and a high-memory Apple Silicon host), you can configure failover hosts. The CLI will try each host in order until one responds.
The CLI performs a lightweight health check against each host. If the primary host does not respond within the configured timeout (default 5 seconds), it automatically falls through to the next host in the list.
SSH Configuration
For remote operations like model management on the LMX host, configure SSH access. This allows the CLI to run administrative commands on the inference server directly.
Then configure the CLI to use this SSH alias:
Verify Connection
With everything configured, verify the full connection path:
Check LMX connectivity
The status command pings the LMX health endpoint and reports the result.
Run a quick health check
The doctor command now validates the LMX connection alongside other checks.
Test inference directly
Send a quick test prompt to confirm end-to-end inference works.
Troubleshooting
Connection refused
If opta status shows "connection refused", verify that:
- LMX is running on the target host (
launchctl list | grep opta.lmxorsystemctl status opta-lmx) - The IP address and port are correct (
opta config get connection) - No firewall is blocking port 1234 on the LMX host
- Both machines are on the same LAN subnet
Timeout errors
If connections succeed but are slow or intermittent, increase the timeout:
DNS resolution issues
Prefer mDNS hostnames (for example lmx-host.local) when available, then keep a fixed IP fallback configured for constrained network environments. Opta components support both patterns.