AutoHost logoAutoHost

Command Palette

Search for a command to run...

Agent

Agent Configuration

The agent configuration is auto-generated at /etc/autohost/config.yaml during enrollment.

The agent reads its configuration from /etc/autohost/config.yaml. This file is generated automatically by autohost up or autohost enroll link. Manual editing is rarely needed.

Configuration File

/etc/autohost/config.yaml
api_url: "https://api.autohst.dev"    # Cloud API URL (HTTP)
ws_url: ""                            # Reserved for future use
grpc_address: "api.autohst.dev:9090"  # Cloud API gRPC address
agent_token: "autohost-node_xxxx"     # Node token (from enrollment)
node_id: "my-server"                  # Unique node identifier
tags: ["production", "web"]           # Optional tags for categorization

File permissions

The config file is stored with permissions 600 so only root can read the agent token.

Fields

FieldDescription
api_urlBase URL of the Cloud API REST server (used for heartbeats and metrics).
grpc_addressAddress of the Cloud API gRPC server (used for command dispatch).
agent_tokenNode authentication token issued during enrollment.
node_idUnique identifier for this node in the cloud.
tagsOptional list of tags for categorizing nodes in the dashboard.

Heartbeat & Metrics Interval

The agent sends a heartbeat and a system metrics snapshot (CPU, memory, disk) to the cloud API every 15 seconds. This interval is currently fixed and not configurable.

The agent configuration file is located at /etc/autohost/agent.yaml.

Configuration File

/etc/autohost/agent.yaml
# Agent Configuration
node_name: node-01
region: us-east-1

api:
  endpoint: https://api.autohost.cloud
  token: <your-node-token>
  
docker:
  socket: /var/run/docker.sock
  network: autohost-network
  
logging:
  level: info
  output: /var/log/autohost/agent.log
  
health:
  interval: 30s
  timeout: 10s

Networking

The agent uses WireGuard for secure peer-to-peer communication between nodes. Configure networking settings as needed:

yaml
network:
  mode: wireguard
  listen_port: 51820
  allowed_ips:
    - 10.100.0.0/16

Resource Limits

yaml
resources:
  max_containers: 50
  reserved_cpu: 500m
  reserved_memory: 512Mi