Skip to main content

Agent Configuration File

The Agent configuration file contains the settings and credentials that the Agent uses to connect to your Files.com site.

This configuration file contains the private key that authenticates your Agent to your Files.com site. Treat this file the same as a password and do not share it with anyone.

The Files.com Agent configuration file is generated by Files.com when the Remote Server for the Agent is created.

You can download the configuration file for an existing Agent Remote Server from within its Remote Server settings.

The configuration file is TOMLExternal LinkThis link leads to an external website and will open in a new tab formatted so that it is both human-readable and machine-readable. The system administrator edits this file manually to customize the Agent, and to review an Agent's configuration when the Agent was created by someone else.

Configuration File Location

The location of the configuration file depends on how the Agent was installed as a system service.

When the Agent service is installed from the command line on Windows, Linux, or Mac, the configuration file stays wherever it was when you ran the install command. The --config option records that path in the service definition, and the Agent reads the file from there.

When the Agent is installed using the Windows MSI, the active configuration file is C:\Users\<username>\AppData\Roaming\Files.com-Agent\files_agent_config.toml, where <username> is the account of the person who ran the installer. The installer copies the configuration file into that location from the folder containing the MSI. Windows restricts that folder to that one user, which protects the private key inside the file.

Older MSI installations placed the configuration file at C:\Program Files\Files.com-Agent\files_agent_config.toml. The Agent reads that location only when the file in the newer location is missing. Do not place new configuration files there, because Windows gives every user on the system read access to the Program Files folder by default, and that access can expose the private key.

When the Agent is installed from a Linux package (.deb, .rpm, or .apk), the standard location for the configuration file is /opt/filescom/files_agent_config.toml.

Finding an Existing Configuration File

When you take over an Agent host and do not know where its configuration file is, ask the installed service. Run the following command on the Agent host. It prints the path of the configuration file that the service loads.

files-agent service config

On Windows, the configuration file for an MSI installation lives in the profile of the person who installed the Agent, so a different administrator needs to run their shell as an administrator to open the file at the printed path.

Configurable Settings

The following settings are intended to be reviewed and adjusted by the system administrator before and during use.

Access and Permissions

These settings control which files and directories the Agent can access on the host system.

FieldDescription
rootThe top-level directory that the Agent has access to. Set this to a directory location on the host system that you want the Agent to access. Make sure that the path is enclosed in single quotes. For example, '/path/to/agent/folder', 'C:\windows\folder', '/mnt/otherserverfolder', or '\\networkservername\c$\folder'. The path location must have the correct access permissions for the user, or service account, that is running the Agent. Network mount locations must be mounted on the host system, with the correct access permissions, prior to use by the Agent.
permission_setThe permissions the Agent has over its root directory. Your Files.com administrator sets this initially, but the system administrator can change it. Valid options are read_write, read_only, and write_only.
follow_linksWhether the Agent follows symbolic links, giving it access to linked folders outside of root. Valid options are true or false. The default is false.
show_hidden_filesWhether the Agent can access hidden files and folders on Windows systems. Valid options are true or false. The default is false.
validate_root_permissionsWhether the Agent checks that it can read and write its root directory at startup before accepting jobs. Valid options are true or false. The default is true.

Approved Commands for Agent Compute

The commands setting defines the programs an Agent Compute node can run on this host. It is an array of command definitions, written as one [[commands]] TOML table per command. The downloaded configuration file does not include command definitions. Add them locally; with no definitions, the Agent rejects every Agent Compute command.

Command approval stays on the machine that runs the program so the host administrator controls which local capabilities Automations can use. Permission to edit an Automation does not also grant permission to add executable commands to the Agent. The host administrator chooses which programs and parameters to expose through these definitions.

Each definition gives a command a name. The Automation's Command field must match that name exactly, including capitalization. The executable path and its arguments belong in the definition on the Agent host.

Field Within [[commands]]Description
nameA unique name selected by the Automation, such as report_path.
commandThe executable to run. Use an absolute path for predictable behavior. A bare executable name is resolved using the Agent process's PATH. Put command-line arguments in arguments, not in this field.
argumentsAn ordered array of strings, with one entry per command-line argument. An entry can contain an Agent template such as {{.InputPath}}, which reads a parameter defined in commands.schema.
directoryOptional working directory for the command. When omitted, the command uses the Agent process's working directory.
descriptionOptional description of the command.

For each parameter supplied by the Automation, add a [[commands.schema]] table immediately after its command definition. Set name to the parameter name and type to its data type. Parameter names must start with an uppercase letter and contain only letters, digits, and underscores, such as InputPath. Use string for a file path or other text; int, bool, and float64 are also supported. An optional default supplies a value when the Automation omits that parameter. Use the same parameter name in the Automation's Arguments and in the Agent's template.

Agent templates use Go template syntax, such as {{.InputPath}}. They are separate from the Automation's TransformScript templates, such as {{ attributes.path }}, which Files.com evaluates before sending the argument value to the Agent.

On Linux or Mac, this example uses /usr/bin/printf to return the supplied path text in standard output:

[[commands]]
name = "report_path"
description = "Return the path supplied by the Automation"
command = "/usr/bin/printf"
arguments = ["%s\n", "{{.InputPath}}"]

[[commands.schema]]
name = "InputPath"
type = "string"

For this example, set the Automation's Command to report_path and add an Arguments entry named InputPath with the value {{ attributes.path }}. The next node receives the path text in payload.stdout.

On Windows, this command requires no parameters and returns the account running the Agent. Select agent_identity in the Automation's Command field and leave Arguments empty:

[[commands]]
name = "agent_identity"
description = "Return the Windows account running the Agent"
command = 'C:\Windows\System32\whoami.exe'
arguments = []

Single-quoted TOML strings preserve the backslashes in Windows paths. The Agent starts the executable directly and passes each arguments entry separately. To run a script, set command to its interpreter and include the script's path and parameters in arguments. The program runs with the operating-system permissions of the account running the Agent, so that account needs access to the executable, scripts, and files they use.

Stop the Agent service before editing its active configuration file, then start it again to load the definitions. Place command tables after the existing top-level settings so those settings remain outside the tables. For Agent High Availability, configure the commands and install their programs on every node that can serve the Remote Server.

Private Key File

By default, the Agent's private key is stored inline in the configuration file in the private_key field. As an alternative, you can store the key in a separate file and reference it by path.

FieldDescription
private_key_pathPath to a file containing the Agent's private key. Use this as an alternative to storing the key inline in private_key. Relative paths resolve from the directory containing the configuration file.

Automatic Updates

The Agent can update itself automatically, manually, or not at all. Use manual_trigger to update the Agent only when triggered manually from your Files.com site. Use always to keep the Agent current automatically. Use critical_only to limit automatic updates to versions that address reliability, performance, or security issues. Use never only when your organization manages all software updates through its own deployment process.

Use push_update_block_windows to keep updates from starting during your busy periods.

FieldDescription
auto_update_policyHow the Agent handles available updates. Valid options are always, critical_only, manual_trigger, and never. The default is always.
push_update_block_windowsTime periods when an update to the Agent must not start. Each entry is a time zone, a five-field cron schedule for when a block starts, and a duration, such as "America/Chicago 0 18 * * MON-FRI | 12h". Up to 32 entries. The default is []. See Blocking Updates During Busy Periods.

Job Concurrency

The Agent processes multiple jobs in parallel. The default concurrency limit is 500. If you see job queue is full errors, the Agent is receiving more work than it can process simultaneously. You can raise override_max_concurrent_jobs to increase the limit, but the right value depends on available memory and I/O capacity. Test under realistic load before committing to a higher value.

FieldDescription
override_max_concurrent_jobsThe maximum number of jobs the Agent processes simultaneously. The default is 500.
override_max_completed_jobsThe maximum number of completed job results the Agent retains in memory so Files.com can retrieve them asynchronously. Higher values allow more results to be available after completion but increase memory usage. The default is 100.

Network Protocol

The Agent connects to Files.com using UDP by default, which is faster and lower-latency than TCP. If the host network blocks outbound UDP, which is common in restrictive corporate or government environments, the Agent falls back to TCP automatically. Set prefer_protocol to tcp to avoid using UDP entirely when you know UDP is blocked.

FieldDescription
prefer_protocolThe network protocol the Agent uses when connecting to Files.com. Valid options are udp and tcp. The default is udp.

Direct Transfers

These settings control Direct Transfers, which let the Files.com CLI App and Desktop App send file data straight to the Agent for faster uploads and downloads.

FieldDescription
direct_transfersWhether the Agent accepts direct connections from the Files.com CLI App and Desktop App for uploads and downloads. Clients fall back to the standard connection route when the Agent cannot be reached directly. Valid options are true or false. The default is false.
direct_transfer_portThe local port, or range of ports, the Agent listens on for direct transfers, such as "4001" or "4001:4010". The Agent uses the first free port in the range. A range keeps direct transfers available while the Agent updates itself. The default is "4001:4010".
direct_transfer_upnpWhether the Agent asks the local router to open a matching public port automatically, using UPnP or NAT-PMP. Set this to false on networks where your network team manages port forwarding. Valid options are true or false. The default is true.
direct_transfer_public_portsThe public ports clients connect to when your firewall presents different port numbers than the ports the Agent listens on. Entries are ports or ranges, in preference order, up to 16 ports in total. Leave this empty when the public and local port numbers match. The default is [].
direct_transfer_advertised_addrsAdditional public addresses to offer clients, as ip:port entries, for an Agent behind a static public IP address, a port forward, or a load balancer. Host names are not accepted. The default is [].
direct_transfer_rollover_grace_periodThe number of seconds the Agent keeps its previous listener open for in-progress transfers while it updates itself. Set this to 0 to release the listener as soon as active transfers finish. The default is 30.
direct_transfer_max_total_concurrent_requestsThe maximum number of direct transfer requests the Agent handles at one time across all clients. The default is 2048.
direct_transfer_max_concurrent_requestsThe maximum number of direct transfer requests the Agent handles at one time from a single client address. The default is 256.
direct_transfer_max_requests_per_minuteThe maximum number of direct transfer requests the Agent accepts per minute from a single client address. The default is 4096.
direct_transfer_blocked_client_ipsClient addresses and ranges, such as ["198.51.100.0/24"], that can never connect for direct transfers. Blocked addresses take precedence over allowed ones, so an address that appears on both lists is blocked. The default is [].
direct_transfer_allowed_client_ipsThe client addresses and ranges allowed to connect for direct transfers. When the list is empty, every client not blocked is allowed. When the list is set, only listed addresses can connect. The Agent allows Files.com's own addresses automatically, so list only your client ranges. The default is [].

High Availability

These settings identify and prioritize this installation when multiple Agent nodes serve one Remote Server.

FieldDescription
node_nameA name for this Agent installation, shown with the node's status information. Helpful for telling nodes apart when several serve the same Remote Server. Unset by default.
availability_roleThis installation's priority when multiple nodes serve one Remote Server. Valid options are auto, primary, and standby. Files.com sends new work to a reachable primary node first, then to auto nodes, then to standby nodes. The default is auto.

DNS

The auto setting tries public DNS first and falls back to the local system's DNS resolver if public DNS is unreachable. This works for most deployments. Use doh (DNS over HTTPS via Cloudflare) if your environment requires encrypted DNS lookups or if local DNS returns incorrect results for public hostnames. Use system to rely only on the host's configured DNS resolver when your network routes all DNS through an internal resolver and you do not want the Agent reaching out to public DNS services.

FieldDescription
dnsThe DNS lookup method the Agent uses. Valid options are auto, doh, and system. The default is auto.
dns_serverA custom DNS server address, as host or host:port (port defaults to 53). Applied whenever the Agent uses the operating system resolver: when dns is set to system, or when dns is auto and the Agent falls back from DNS over HTTPS. Has no effect when dns is set to doh.

Outbound Proxy

When the Agent runs inside a locked-down network that prohibits direct connections to internet services, you can route all Agent connections through Files.com instead.

FieldDescription
proxy_all_outboundWhether to proxy Agent connections through Files.com. Valid options are true or false.

Integrations

The integrations setting enables the Agent to act as a secure proxy for Remote Server connections. When set, the Agent routes connections from your Files.com site to the integration types you specify.

FieldDescription
integrationsThe integration routing types the Agent supports. Valid options are an empty array [] or one or more of the supported integration routing types. The default is [].

Logging

These settings control where the Agent writes logs, how much detail it captures, and how it manages log file size. The info level works for most deployments. Use debug only for troubleshooting, as it produces significantly larger log files.

FieldDescription
log_fileThe path and filename for the Agent log. When blank, the Agent writes to the default log location.
log_levelThe level of detail in the Agent log. Valid options are debug, info, warn, error, and fatal. Each level includes all more severe levels. The default is info.
log_rotate_numThe number of log files to retain. The default is 5.
log_rotate_sizeThe size in MB at which the Agent rotates the log file. The default is 20. Setting this to 0 applies the default value.
disable_remote_log_accessWhether to prevent Files.com from accessing the Agent's log file remotely. Valid options are true or false. The default is false.

Transfer Rate Limiting

By default, the Agent transfers files at the maximum speed the network allows. On low-bandwidth networks, or where you need to prevent the Agent from saturating available bandwidth, set a rate limit.

FieldDescription
transfer_rate_limitThe upload and download rate limit for the Agent. The default is no limit.

Upload Cache

When the Agent uploads files using parallel parts (the default), it buffers each completed part in a local cache before finalizing the transfer. These settings control where that cache is written and whether parallel part uploads are enabled. See Agent Storage Requirements for sizing and storage location guidance.

FieldDescription
upload_temp_file_part_pathThe directory where the Agent stores temporary upload part files. Must be an absolute path on the same filesystem volume as root. When not set, the Agent uses the OS default temporary file location, which may be on a different volume than root.
upload_parallel_partsWhether the Agent uploads file parts in parallel. Parallel uploads improve throughput but require the upload cache to be on the same filesystem volume as root. Valid options are true or false. The default is true.
transfer_cache_sizeThe maximum number of concurrent upload and download transfer cache entries the Agent holds at one time. This is an entry count, not a size in bytes. The default is 2048.

Graceful Shutdown

When the Agent shuts down, this setting controls how long it waits for in-progress jobs to complete before stopping. Increasing this value reduces the chance of interrupted transfers when restarting or stopping the Agent.

FieldDescription
graceful_shutdown_timeoutThe number of seconds the Agent waits for in-progress jobs to finish before shutting down. The default is 15. Setting this to 0 applies the default value.

Read-Only Settings

The following fields are generated by Files.com when the Agent is created and must not be edited. Changing these values prevents the Agent from connecting to your site.

FieldDescription
idThe unique Remote Server ID for this Agent. Do not edit.
private_keyThe private key that authenticates this Agent to your Files.com site. This is a sensitive credential and must never be shared. Do not edit.
subdomainThe custom subdomain of the Files.com site this Agent is associated with. Do not edit.
endpoint_overrideThe domain name the Agent uses to connect to your site when you have a Custom Domain configured. Do not edit.