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.18.tar.gz (39.1 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.18-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: valet_agent-2026.1.18.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for valet_agent-2026.1.18.tar.gz
Algorithm Hash digest
SHA256 cea3bd59b77c2e0404bcca4c89097ac53e8dcf8774e5a6d5aec7823384cce467
MD5 6131d375057a022542bf91f41be6592c
BLAKE2b-256 a5a6f7c91568b7bfc55eb8ca5d8b164079076f25927063fd70bf225903c33aa7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: valet_agent-2026.1.18-py3-none-any.whl
  • Upload date:
  • Size: 43.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for valet_agent-2026.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 564bf39b5e871f1c1f7aaf80c782f6f84deea726f125348f13fae6f58d73e6c3
MD5 43c0105dba3d267647776b4c50578b87
BLAKE2b-256 c32050e3f4d8c1b724c9c9b93141bca0507f00e2f0e0ed61f282600d3a293722

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