Setting up the Files.com Agent as a system service ensures that it starts automatically whenever the system powers on or reboots. This allows the Agent to run independently of user logins, making it a reliable part of your background operations.
Configure the Root Path
Before you install the Agent as a service, make sure that the root setting in the configuration file uses either a local drive path (such as /path/to/folder) or a path to an accessible mounted network drive (such as /mnt/path/to/folder).
Download the Agent
Download the agent executable for your system from the official download location. Choose the version that matches your architecture and operating system and save it to the same location as your configuration file on the host system.
Install the Agent
To install the Agent as a service on a Linux system, run the following command:
files-agent service install --user-service=false \
--config /path/to/files_agent_config.toml
Start the service with:
files-agent service start
If you modify the configuration file, stop the service, make your updates, and then restart it.
To stop the service, use:
files-agent service stop
When you're ready to remove the Agent service, run:
Optional systemd Installation
If your Linux system uses the systemdinit system, you can install the Agent service by creating a service file. For Linux variants that use another init system, refer to the system's init documentation.
Create a file at /lib/systemd/system/files-agent.service with the following content:
Replace the ExecStart paths (config file and log file) with the correct locations for your configuration and log files.
After creating the service file, install and enable it using:
Start the service with:
If any modifications to the configuration file are needed then stop the service first, modify the configuration file, and restart the service.