Installing the Agent as a System Service


Installing the Files.com Agent as a system service allows the Agent to automatically start when the system is started or rebooted.

System services allow programs and applications, such as the Agent, to automatically start without requiring a user login. When the Agent is installed as a system service, it will automatically start when the system is powered on and online.

Windows

MSI Based Service Installation

For Windows x86 64bit based systems, we provide an Agent Installer MSI executable which can be found on the download site for the Agent.

The MSI should only be used for installing the Agent as a system service. To run the Agent manually, prior to installing as a service, download and use the EXE instead.

The Agent Installer MSI should be downloaded into the same folder as the Agent configuration file. After updating the configuration file, double-click the Agent Installer MSI executable to install the Agent as a service.

Once installed as a service, the configuration file for the Agent will be located at C:\Program Files\Files.com-Agent\files_agent_config.toml.

To uninstall the service, use the Windows "Add or remove programs" app to remove the Agent.

Command Line Service Installation

You can also install the Agent as a Windows service, for both x86 64bit and ARM 64bit based Windows systems, by using the command:

files-agent service install --config C:\path\to\files_agent_config.toml

When installed this way, the executable and configuration file remain in their current locations.

To start the service, open the Windows Services app, select the Files.com Agent v2 entry, right-click on it, and select Start. The service can also be started from the command line using the command:

files-agent service start

If any modifications to the configuration file are needed then stop the service first, modify the configuration file, and restart the service.

To stop the service, open the Windows Services app, select the Files.com Agent v2 entry, right-click on it, and select Stop. The service can also be stopped from the command line using the command:

files-agent service stop

To uninstall the service, use the command:

files-agent service uninstall

Linux

The following information applies to all Linux systems that use the systemd based init system. For Linux variants that use another init system, please refer to your system's init documentation.

Create the service file /lib/systemd/system/files-agent.service with the following contents:

[Unit]
Description=Files.com Agent v2
ConditionFileIsExecutable=/usr/bin/files-agent

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/bin/files-agent "start" "--config" "/path/to/files_agent_config.toml" "--log_file" "/path/to/files-agent.log"
Restart=always
RestartSec=60

[Install]
WantedBy=multi-user.target

NOTE: Replace the ExecStart paths (config file and log file) in the above example with the correct paths for your system before proceeding to the next steps.

To install and enable the system service use this command:

sudo systemctl enable files-agent

To start the service, use the command:

sudo systemctl start files-agent

If any modifications to the configuration file are needed then stop the service first, modify the configuration file, and restart the service.

To stop the service, use the command:

sudo systemctl stop files-agent

To uninstall the service, use the command:

sudo systemctl disable files-agent

Mac

You can install the Agent as a Mac Launchd service by using the command:

files-agent service install --config /path/to/files_agent_config.toml

When installed this way, the executable and configuration file remain in their current locations.

To start the service, use the command:

files-agent service start

If any modifications to the configuration file are needed then stop the service first, modify the configuration file, and restart the service.

To stop the service, use the command:

files-agent service stop

To uninstall the service, use the command:

files-agent service uninstall

Get Instant Access to Files.com

The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, then fill out the short form on the next page. Your account will be activated instantly. You can dive in and start yourself or let us help. The choice is yours.

Start My Free Trial

©2024 Files.com. All right reserved

FILES.COM

  • Start My Free Trial
  • Pricing
  • Docs
  • API and SDKs
  • Contact

CONTACT & SUPPORT

support@files.com

(800) 286-8372

Monday–Friday

9am–8pm Eastern