LumeGuideAdvanced

HTTP Server

Using the Lume REST API server

Lume includes a built-in HTTP server that exposes a REST API for managing VMs. This enables integration with automation tools, scripts, and the Computer Use Agent SDK.

Starting the Server

# Start on default port (7777)
lume serve

# Start on custom port
lume serve --port 8080

If you installed Lume with the default settings, the server runs as a background service and starts automatically on login. You don't need to manually run lume serve.

Default URL

http://localhost:7777

Quick Examples

List VMs

curl http://localhost:7777/lume/vms

Get VM Details

curl http://localhost:7777/lume/vms/my-vm

Run a VM

curl -X POST http://localhost:7777/lume/vms/my-vm/run \
  -H "Content-Type: application/json" \
  -d '{"noDisplay": true}'

Stop a VM

curl -X POST http://localhost:7777/lume/vms/my-vm/stop

Create a VM

curl -X POST http://localhost:7777/lume/vms \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-vm",
    "os": "macOS",
    "cpu": 4,
    "memory": "8GB",
    "diskSize": "50GB"
  }'

Integration with Computer Use Agent

The Cua Computer Use Agent SDK uses the Lume HTTP API to manage VMs. When using cua-computer, ensure the Lume server is running:

from cua import Computer

# The Computer class connects to lume serve at localhost:7777
async with Computer() as computer:
    await computer.run("my-vm")
    # ... perform automation
    await computer.stop()

Background Service Management

If installed as a background service:

# Check service status (macOS)
launchctl list | grep lume

# Stop the service
launchctl unload ~/Library/LaunchAgents/com.trycua.lume.plist

# Start the service
launchctl load ~/Library/LaunchAgents/com.trycua.lume.plist

Server Configuration

The server respects Lume's configuration file for:

  • VM storage locations
  • Cache settings
  • Default resource allocations

See the FAQ for configuration file locations.

Next Steps

Was this page helpful?