Skip to main content

Agent Configuration

A reference for the configuration file, CLI options, and file locations used by both TFE variants.


1. TFE Local Directory — tfe-config.yaml​

Location: /etc/takakrypt/fte/tfe-config.yaml. It's readable only by root, and it's the only configuration file that isn't encrypted.

environment: prod
gateway:
agent_id: ""
access_token: "<api-key>"
user_key: "uk_..."
tenant: "default"
endpoint: "https://<gateway-domain>"
pull_interval: "5m"
ldt:
max_workers: 2
rate_limit_mbps: 10
max_queue_size: 100
scan_interval: "1h"
auto_migrate: true
sync_block_interval: 100
qos:
cpu_percent: 0
cap_cpu: false
iowait_ms: 0
schedule: "anytime"
encryption:
mode: "aes-cbc-cs1"
metrics:
enabled: true
port: 9090
audit:
enabled: true
path: "/var/log/takakrypt-audit.log"
max_size_mb: 0
max_backups: 0
note

An unrecognized setting isn't an error. The agent logs "ignoring ... setting(s) this build does not read" and keeps running with the settings it does understand.

note

encryption.mode only accepts aes-cbc-cs1 for TFE Local Directory. Setting it to aes-gcm here is rejected and the agent refuses to start. (TFE Object Storage is different: it switches to aes-gcm automatically for large files, as a storage-level detail you don't configure, see Encryption Method by File Size below.)

warning

CLI flags always override the values in this file. This is also why the default systemd service runs without extra flags, so that this file remains the single source of truth.

Setting ldt.rate_limit_mbps disables qos.cpu_percent and qos.iowait_ms. Rate limiting and CPU/I-O-wait-based throttling are two different approaches, and mixing them doesn't make sense.

LDT Tuning Guide​

ScenarioWorkersRate limitScan interval
Production: minimal impact15–10 Mbps2 hours
Production: balanced210–20 Mbps1 hour
Development: fast2–420–50 Mbps30 minutes
Limited server resources15 Mbps4 hours

2. TFE Object Storage — fos-config.yaml​

Location: /etc/takakrypt/fos/fos-config.yaml.

environment: prod
gateway:
agent_id: ""
access_token: "<api-key>"
user_key: "uk_..."
tenant: "default"
endpoint: "https://<gateway-domain>"
pull_interval: "5m"
encryption:
mode: "aes-cbc-cs1"
s3proxy:
enabled: true
listen_addr: "127.0.0.1:9000"
client_access_key: ""
client_secret_key: ""
allow_anonymous: false
# tls_cert_file: "" # agent 0.2.7+, required if listen_addr isn't 127.0.0.1
# tls_key_file: "" # agent 0.2.7+, required if listen_addr isn't 127.0.0.1
guard_point_id: "gp-default"
backend:
type: "local" # local | minio | s3
endpoint: "http://minio:9000"
region: "us-east-1"
access_key: ""
secret_key: ""
use_ssl: false
use_path_style: true # must be true for MinIO
local_path: "/var/lib/takakrypt/fos/storage" # only used when type is local
metrics:
enabled: true
port: 9091
note
  • The backend section (object storage type, endpoint, access key, secret key) is normally filled in automatically from the dashboard, not edited by hand.
  • If fos-config.yaml is missing, the agent falls back to reading tfe-config.yaml in the same folder. That's legacy behavior, so don't rely on it. Keep fos-config.yaml present.
  • TFE Object Storage's metrics port (9091) differs from TFE Local Directory's (9090), so both can run on the same server without conflict.
warning

s3proxy.encrypt_patterns and s3proxy.passthrough_patterns are accepted by the file format but never take effect. Only the policy configured in the dashboard controls whether a bucket is encrypted.

Encryption Method by File Size​

File sizeMethod
≤10 MBaes-cbc-cs1
>10 MBaes-gcm (selected automatically)

Encryption Metadata Stored per File​

Each stored file carries metadata with the x-takakrypt- prefix: x-takakrypt-encrypted, x-takakrypt-cipher-mode, x-takakrypt-guard-point, x-takakrypt-original-size, x-takakrypt-base-iv.

warning

If this metadata is lost (say, a copy tool strips custom metadata), the file cannot be recovered by any means.

Supported Operations​

CategoryOperations
Bucketlist, list-contents, create, delete, check
Filestore, retrieve, check, delete, copy, bulk-delete
Multipart uploadstart, upload-part, complete, abort, list

Applications must use AWS Signature V4. Presigned URLs are not supported.


3. CLI Options​

OptionDefaultNotes
--config/etc/takakrypt/fte (or /etc/takakrypt/fos)Configuration folder location
--log-levelinfoLog detail level
--log-file/var/log/takakrypt-fte.log (or -fos.log)Log file location
--envdetected automaticallyRunning environment
--metrics-addrlocal address onlyMonitoring data access address
--sync-once—Synchronize with the gateway once, then exit
--enable-pprofoffPerformance profiling, off by default
--require-binary-signaturesoffRequires the agent binary to be digitally signed
--access-token, --user-key—Do not use. Values passed this way are visible to all local users via ps or /proc/PID/cmdline, and cannot be hidden again except by rotating the credentials
warning

For host-specific settings, use sudo systemctl edit takakrypt-fte (or takakrypt-fos) to create a drop-in file. Never edit the default service file directly, since changes to it are lost when the agent package is updated.


4. Agent File Locations (TFE Local Directory)​

/etc/takakrypt/fte/
├── tfe-config.yaml
├── host-settings.conf
└── .sec/
├── conf/secfs.key
├── conf/machine-sources
├── conf/agent-config.po
├── conf/<guard points>.po
├── keys/agent-keypair.key
├── keys/dek-cache.key
├── policies/<ID>.po
└── agent-id
/var/lib/takakrypt/fte/metadata/migrating/
/var/run/takakrypt-fte.sock
warning

Copying the .sec/ folder to another server won't work. The master key is derived from the server's hardware identity, and it's never stored anywhere. The agent recalculates it on every start. A reprovisioned server or one with replaced hardware has to re-enroll as a new agent.


5. Log and Monitoring Locations (TFE Object Storage)​

SourceLocation
Monitoring metricshttp://localhost:9091/metrics
Service logsudo journalctl -u takakrypt-fos
Log file/var/log/takakrypt-fos.log
Audit log/var/log/takakrypt-audit.log (shared with TFE Local Directory if both are installed on the same server)

If the agent doesn't behave as expected after you've configured it, check Installation Troubleshooting.