Give Agent a custom name
By default Agent takes name after the hostname of the device it's installed on. If it's required to be different, there are two places to change Agent's name.
When renaming an Agent, its tag AGENT_NAME is updated accordingly. Name also changes in Agent UI. There are two ways to change the name of Agent - through the Agent's configuration file, or from Management Console UI.
Through Management Console UI
Starting with version 2.7.0 it's possible to rename Agents on MC. Go to Agents tab, select wanted Agent, navigate to Configuration tab, and click Rename. This option is disabled for offline Agents and is not available for Agents older than v2.7.0. Admin cannot change the name that is set in Agent's configuration file. Management Console Agent's name is set in its configuration.
Editing Agent config file
The name of the Agent can be set with device_name
parameter in Agent configuration in the top level of parameters. Location of the configuration file is mentioned below.
For more information on the Agent's configuration file, see Agent configuration file in detail.
C:\Program Files\Resilio Connect Agent
(default, or another dir selected for
Agent installation)
Management Console Agent
Management Console Agent builds a new sync.conf file on each MC start. To add changes to config file, edit sync.conf.template instead: C:\ProgramData\Resilio\Connect Server\sync.conf.template
/Users/username/Library/Application Support/Resilio Connect Agent
- If installed manually, the selected dir.
- If installed from the package, it'll be
/etc/resilio-agent
or/home/username/.config/resilio-agent/
depending on configuration.
Management Console Agent
Management Console Agent builds a new sync.conf file on each MC start. To add changes to config file, edit sync.conf.template instead: /MC_installation_path/sync.conf.template
Agent for NAS keeps it's sync.conf inside storage folder. Therefore the path depends on your NAS vendor.
Example: Modified sync.conf file
{
"device_name": "Spaceship XC19",
"folders_storage_path": "%DOWNLOADS%",
"management_server": {
"host": "mconsole-test.resilio.com:8444",
"cert_authority_fingerprint": "59ae95a0f6017464a4987d6ed02596d7a314723d9e430ecd899373237726d0e9",
"bootstrap_token": "XFTDZXLCYN4A3PJUS6TJKPMG5VKOWAAS",
"disable_cert_check": false
}
}
Follow JSON syntax
When editing sync.conf file please remember the following JSON syntax rules:
- the device name is a string value and must be quoted;
- each non-last parameter must have a trailing comma at the end;
- special characters must be escaped;
- when editing, ensure your text editor is not decorating quotes and other elements of file like OS X "TextEdit" app does.
Name given through config file is of higher priority and cannot be changed
through MC. If attempted, warning "Device name is specified in agent config"
appears. To change Agent name in this case, it's required to edit the config.
If device_name
is removed from sync.conf, admin will be able to rename Agent
through MC.
If Agent is renamed when there’s an active Job run, especially if there are scripts with SRC:AGENT_NAME & DST:AGENT_NAME tags used, the Job run will finish OK with previous Agent’s name. New name will be used for the next Job run only.
If Management Console has "Identify agent by name" as YES, new Agent’s name shall be taken into account - behavior of product does not change if Agent is renamed through MC.