Skip to main content

DeviceValet Linux Agent - Fleet management daemon for Linux desktops, servers, and IoT devices

Project description

DeviceValet Linux Agent

PyPI version Python 3.10+ License: MIT

Fleet management daemon for Linux desktops, servers, and IoT devices. Part of the DeviceValet ecosystem.

Features

  • Device Enrollment — One-command enrollment via token
  • System Telemetry — CPU, memory, disk, GPU, thermals, network
  • WiFi Geolocation — Location via BeaconDB (privacy-respecting)
  • Real-time Commands — MQTT-based instant command execution
  • Package & Service Inventory — Track installed software
  • Systemd Integration — Runs as a background service

Quick Start

Install from PyPI

# Install with pipx (recommended)
pipx install valet-agent

# Or with pip
pip install valet-agent

# Or with uv
uv tool install valet-agent

Enroll Your Device

# Get an enrollment token from your DeviceValet dashboard, then:
sudo valet-agent enroll --server https://valet.example.com --token YOUR_TOKEN

# Start the agent
sudo valet-agent run

Install as System Service

# Copy the systemd unit file
sudo cp valet-agent.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now valet-agent

# Check status
sudo systemctl status valet-agent
sudo journalctl -u valet-agent -f

CLI Commands

valet-agent --help              # Show all commands

# Enrollment
valet-agent enroll              # Enroll device with server
  --server URL                  # Server URL (required)
  --token TOKEN                 # Enrollment token (required)
  --mqtt-url URL                # Override MQTT broker URL

# Agent Operations
valet-agent run                 # Start the agent daemon
  --config-dir PATH             # Config directory (default: /etc/valet-agent)
  --once                        # Single check-in then exit

# Diagnostics
valet-agent status              # Show enrollment & connection status
valet-agent info                # Display detailed hardware info
  --json                        # Output as JSON
  --packages                    # Include installed packages
  --services                    # Include running services

Configuration

After enrollment, configuration is stored in /etc/valet-agent/agent.env:

Variable Description Default
VALET_SERVER_URL DeviceValet server URL Set during enrollment
VALET_AUTH_TOKEN Device authentication token Set during enrollment
VALET_DEVICE_ID Unique device identifier Set during enrollment
VALET_CHECKIN_INTERVAL_SECONDS Telemetry interval 300
VALET_REPORT_LOCATION Report WiFi-based location true
VALET_REPORT_PACKAGES Include package inventory true
VALET_REPORT_SERVICES Include running services true
VALET_MQTT_ENABLED Enable real-time commands true
VALET_BEACONDB_ENABLED Use BeaconDB for location true
VALET_BEACONDB_CONTRIBUTE Contribute to BeaconDB true

Remote Commands

The agent responds to commands sent via MQTT:

Command Description
lock Lock the screen (requires display session)
ring Play sound to locate device
message Display desktop notification
reboot Schedule system reboot
shutdown Schedule system shutdown
run_script Execute approved scripts
install_package Install system package (apt/pacman)

Docker Deployment

For containerized environments or server monitoring:

services:
  valet-agent:
    image: ghcr.io/supported-systems/valet-agent:latest
    environment:
      VALET_SERVER_URL: https://valet.example.com
      VALET_AUTH_TOKEN: ${DEVICE_TOKEN}
    restart: unless-stopped
    volumes:
      # Required for hardware identification
      - /etc/machine-id:/etc/machine-id:ro
      - /sys/class/dmi/id:/sys/class/dmi/id:ro
      # Optional: for full system metrics
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro

Supported Distributions

Distribution Package Manager Notes
Arch Linux pacman Full support
Debian 11+ apt/dpkg Full support
Ubuntu 22.04+ apt/dpkg Full support
Fedora 38+ dnf Full support
RHEL/Rocky 9+ dnf Full support
Alpine apk Container-only

Requires Python 3.10+ and systemd for service management.

Development

# Clone the repository
git clone https://github.com/supported-systems/devicevalet.git
cd devicevalet/agent-linux

# Install with dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy src/valet_agent

# Linting
ruff check src/
ruff format src/

Telemetry Data

The agent collects and reports:

  • Hardware: Manufacturer, model, serial number
  • System: OS version, kernel, uptime, hostname
  • Resources: CPU usage, memory, disk space
  • Network: IP address, MAC address, connection type
  • Extended (in platform_data):
    • CPU model, cores, frequency, cache
    • GPU info (name, driver, VRAM)
    • Thermal sensors
    • Installed packages
    • Running systemd services

Privacy

  • No data is sent to third parties
  • WiFi geolocation uses BeaconDB (opt-in contribution)
  • All communication is over HTTPS/WSS
  • Device tokens are stored with 0600 permissions

License

MIT License - see LICENSE for details.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valet_agent-2026.1.20.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valet_agent-2026.1.20-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file valet_agent-2026.1.20.tar.gz.

File metadata

  • Download URL: valet_agent-2026.1.20.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for valet_agent-2026.1.20.tar.gz
Algorithm Hash digest
SHA256 1e747ca2a59c524edda4ccf1666c32672bcaed768b6f91cf21f65951b6088443
MD5 7fb06376aaf8a1ac417f74f1787463c2
BLAKE2b-256 c691c4fc23060668f92162902da7b19ebb95c6f8d684a87045f7567bd96cdde4

See more details on using hashes here.

File details

Details for the file valet_agent-2026.1.20-py3-none-any.whl.

File metadata

File hashes

Hashes for valet_agent-2026.1.20-py3-none-any.whl
Algorithm Hash digest
SHA256 37131d4590b3f9db472ec952748414d705262875d5285b905245c07cb5e14691
MD5 1e09b706d4975e3cc0342c061601164f
BLAKE2b-256 cafa88006ac066a57118110fe4ef214c46ab770b60afe60665672d7e0419056b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page