Overview
Thesmolvm ui command launches a web-based dashboard for managing SmolVM instances. The dashboard provides a graphical interface for monitoring VMs, viewing logs, and performing common operations.
The dashboard requires the
dashboard extra to be installed: pip install 'smolvm[dashboard]'Basic Usage
http://127.0.0.1:8080.
Command Syntax
Options
Bind host for the web server. Use
0.0.0.0 to allow external connections.Port number to listen on. Must be between 1-65535.
Allow downloading dashboard UI assets from prerelease/beta GitHub tags. Useful for testing unreleased features.
Examples
Start on Default Port
Use Custom Port
Allow External Connections
Bind to all interfaces to accept connections from other machines:When binding to
0.0.0.0 or ::, the CLI displays localhost in the URL for convenience. Access from other machines using the server’s actual IP address.Enable Beta Features
Allow the dashboard to download prerelease UI assets:Requirements
The dashboard has additional dependencies beyond the core SmolVM package:fastapi>=0.115.0- Web frameworkuvicorn[standard]>=0.34.0- ASGI serverwebsockets>=14.0- WebSocket support
smolvm ui without these dependencies:
1
Dashboard Features
The SmolVM dashboard provides:- VM List: View all running and stopped VMs
- VM Details: Inspect VM configuration, IP addresses, and status
- Logs: Real-time log streaming from VMs
- Resource Monitoring: CPU, memory, and network usage
- Quick Actions: Start, stop, restart, and delete VMs
- SSH Access: Web-based terminal (coming soon)
Port Validation
The port must be a valid TCP port number (1-65535):2 (invalid usage)
Environment Variables
Thesmolvm ui command sets environment variables for the dashboard server:
Set to
"1" when --allow-beta is enabled. The dashboard checks this variable to determine whether to download beta UI assets.Set to the dashboard URL (e.g.,
http://localhost:8080). Used by the dashboard to construct links and API endpoints.Stopping the Server
PressCtrl+C to stop the dashboard:
130 (interrupted by Ctrl+C)
Exit Codes
- 0: Server started and stopped cleanly
- 1: Error starting server (missing dependencies, port in use, etc.)
- 2: Invalid usage (invalid port number)
- 130: Interrupted by user (Ctrl+C)
Common Issues
Port Already in Use
If the port is already occupied:Permission Denied on Low Ports
Ports below 1024 require root privileges:Missing Dashboard Dependencies
If the dashboard package is not installed:Accessing the Dashboard
Once the server is running, open the provided URL in your browser:http://localhost:8080 to access the dashboard.
From Remote Machines
If you started the server with--host 0.0.0.0, access it from other machines using the server’s IP:
Production Deployment
For production use, consider:- Reverse Proxy: Use nginx or Apache as a reverse proxy
- TLS/SSL: Enable HTTPS for encrypted connections
- Authentication: Add authentication middleware
- Firewall: Restrict access to trusted networks
Example with nginx
Development Mode
For dashboard development, use the--allow-beta flag to test unreleased UI features:
API Endpoints
The dashboard exposes a REST API for programmatic access. Key endpoints:GET /api/vms- List all VMsGET /api/vms/{vm_id}- Get VM detailsPOST /api/vms- Create a new VMDELETE /api/vms/{vm_id}- Delete a VMPOST /api/vms/{vm_id}/start- Start a VMPOST /api/vms/{vm_id}/stop- Stop a VM
WebSocket Support
The dashboard uses WebSockets for real-time updates:- Log streaming
- Resource monitoring
- VM status changes
See Also
- CLI Overview - General CLI usage
- SmolVM Manager API - VM management API
- Basic Usage Guide - Working with VMs