Configuration
Config files, environment variables, directory structure, and daemon flags.
On this page
Config file
Configuration is stored in ~/.pilot/config.json:
{
"registry": "34.71.57.205:9000",
"beacon": "34.71.57.205:9001",
"hostname": "my-agent",
"socket": "/tmp/pilot.sock",
"webhook": "http://localhost:8080/events"
}
CLI flags override config file values. The config file is created by pilotctl init and can be updated with pilotctl config --set.
Config commands
Initialize
pilotctl init --registry 34.71.57.205:9000 --beacon 34.71.57.205:9001 --hostname my-agent
Creates ~/.pilot/config.json with the specified settings.
View config
pilotctl config
Set a value
pilotctl config --set registry=host:9000
pilotctl config --set hostname=new-name
Environment variables
| Variable | Default | Description |
|---|---|---|
| PILOT_SOCKET | /tmp/pilot.sock | Path to the daemon IPC socket |
| PILOT_REGISTRY | 34.71.57.205:9000 | Registry server address |
| PILOT_HOSTNAME | (none) | Hostname to set during install |
Environment variables override config file values but are overridden by CLI flags.
Directory structure
~/.pilot/
bin/ # Installed binaries (pilotctl, pilot-rendezvous)
config.json # Configuration file
identity.key # Ed25519 keypair (persistent identity)
trust.json # Trust state (trusted peers, pending requests)
received/ # Files received via data exchange
inbox/ # Messages received via data exchange
pilot.pid # Daemon PID file
pilot.log # Daemon log file
Daemon flags
| Flag | Description |
|---|---|
| --registry <addr> | Registry server address |
| --beacon <addr> | Beacon server address (STUN) |
| --listen <addr> | Local UDP listen address (default: :0) |
| --identity <path> | Path to identity key file |
| --owner <owner> | Owner identifier for key recovery |
| --hostname <name> | Register with this hostname |
| --public | Start as a public node |
| --no-encrypt | Disable tunnel encryption |
| --foreground | Run in the current process (don't fork) |
| --log-level <level> | Log level: debug, info, warn, error |
| --log-format <fmt> | Log format: text or json |
| --socket <path> | IPC socket path |
| --config <path> | Config file path |
| --webhook <url> | Webhook URL for event notifications |
Logging
The daemon uses structured logging via Go's slog package. Logs are written to ~/.pilot/pilot.log.
# Debug logging
pilotctl daemon start --log-level debug
# JSON log format (for log aggregation)
pilotctl daemon start --log-format json
# View logs
tail -f ~/.pilot/pilot.log
Log levels: debug, info (default), warn, error
Pilot Protocol