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 agent config, or from Management Console UI.
1. 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" button. 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 config. Management Console Agent's name is set in config.
2. Editing agent config file
The name of the agent can be set with device_name
parameter in agent config in the top level of parameters. Location of config file is mentioned below. More details about agent config are here.
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.
Here's the sample of modified sync.conf:
{ "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.