Skip to content

Configuration File

The agent can be configured using a TOML file. By default, it looks for config/agent.toml, but you can specify a different path with --config.

Terminal window
# Use default location
epoch-agent
# Use custom config file
epoch-agent --config /etc/epoch-agent/config.toml
# EpochProxy Agent Configuration
[api]
# API server URL for activation and management
url = "https://api.epochproxy.cloud"
[agent]
# Activation code (required for first-time setup)
# Can also be provided via --activation-code or EPOCH_ACTIVATION_CODE
activation_code = "YOUR_ACTIVATION_CODE"
# Optional: Agent name (for display in dashboard)
name = "production-server-1"
# Optional: Labels for organizing agents
[agent.labels]
environment = "production"
region = "us-east-1"
team = "backend"
[shell]
# Shell executable path
path = "/bin/bash"
[reconnect]
# Reconnection settings (optional)
initial_delay_ms = 1000
max_delay_ms = 60000
max_retries = 0 # 0 = infinite retries

Configure the connection to the EpochProxy API server.

KeyTypeDefaultDescription
urlstringhttps://api.epochproxy.cloudAPI server URL

Agent identification and registration settings.

KeyTypeDefaultDescription
activation_codestring-Activation code (required for first setup)
namestringhostnameDisplay name in dashboard
labelstable{}Key-value labels for organization

Terminal session configuration.

KeyTypeDefaultDescription
pathstring/bin/bashShell executable

Automatic reconnection behavior.

KeyTypeDefaultDescription
initial_delay_msinteger1000Initial reconnect delay
max_delay_msinteger60000Maximum reconnect delay
max_retriesinteger0Max retry attempts (0 = infinite)

For most use cases, you only need the activation code:

[agent]
activation_code = "YOUR_CODE"

All other settings use sensible defaults.

When running as a systemd service, place the config at /etc/epoch-agent/config.toml:

Terminal window
sudo mkdir -p /etc/epoch-agent
sudo nano /etc/epoch-agent/config.toml

Then reference it in your service file:

ExecStart=/usr/local/bin/epoch-agent --config /etc/epoch-agent/config.toml
  1. Default values (built into the binary)
  2. Configuration file values
  3. Environment variables (EPOCH_*)
  4. Command-line arguments (--*)

Command-line arguments always take precedence.