Skip to main content

File Locations

Note

This page is only applicable to DroneDeploy Agent v1.4.0 and onwards.

The Agent stores a variety of information on disk on the robot, including configuration settings and telemetry data which is waiting to be uploaded to DroneDeploy cloud infrastructure. While the default locations that files are stored in should be suitable for most robots (consistent with the Linux FHS), it is possible to alter these locations to suit robots with particular disk configurations.

Warning

On Linux, if you change some file locations to be different to the defaults, then note that the Debian package installer used to install the Agent may no longer be able to reliably uninstall all of the Agent's files. In this case, manual removal of some files may be required.

Static Configuration File

The Agent stores data which is not expected to change frequently in the static configuration file agent.json. This file contains information about the location of DroneDeploy servers, and the binding of the robot to a particular Robotics Portal Project and Callsign (see Agent Configuration for more details). It will also contain options specifying where other types of files should be located.

The static configuration file is updated when the Agent is (re)initialised, and when the robot's authentication token information expires and is automatically refreshed.

If the static configuration file cannot be found at startup, then the Agent will immediately exit with an error. In order to move the static configuration file to a different location, you should move the file, then invoke the Agent with the environment variable ROCOS_PATH_CONFIG_STATIC set appropriately. For instance:

sudo ROCOS_PATH_CONFIG_STATIC=/new/location rocos-agent -d

If you are running the Agent as a service, you will need to update the service definition file accordingly.

Dynamically Configured File Locations

The Agent stores other files in different locations based on some simple categorisation. For each category, the location the agent expect to find files may be changed through addition of a configuration option to the static configuration file:

Cache Data

Used to store data which is being cached by the Agent. Note that this may include both incoming data fetched from servers such as map tile information, and outgoing telemetry data which is waiting to be uploaded. Accordingly, files in this cache need to be persisted, or there is a risk of losing telemetry data.

The storage stream telemetry cache (telemetry.db) is located in this location.

To modify the cache location, add a configuration option path-cache to the static configuration:

"path-cache":"/var/opt/rocos-agent"

The Agent will automatically create this directory if it does not exist, but will not be able to copy across any existing cache files from the old location, so you will need to do this manually to avoid losing pending uploads. Take care to preserve file ownership and permissions when manually copying files.

Configuration Data

Used to store configuration data which is updated at runtime, including for example: Agent plugin settings (agent-settings.json), Storage Stream configuration (streams.json), Events Definitions (events.json) and Command Definitions (commands-v2.json). The Agent will automatically download any missing configuration files at runtime, however if the robot needs to operate in an offline environment, then files in this location need to be persisted, or the Agent will find itself without a configuration when it starts up offline.

To modify the file location, add a configuration option path-config to the static configuration:

"path-config":"/etc/opt/rocos-agent"

Static Resources

Used to store resource files which are included in the installation of the Agent and which are not automatically updated at runtime. For example, this includes the common.xml file which includes default MAVLink message definitions. The files in this location need to be retained, since the Agent cannot operated without them.

To modify the file location, add a configuration option path-res-static to the static configuration:

"path-res-static":"/opt/rocos-agent"

You will to copy the existing contents to the new location manually. Take care to preserve file ownership and permissions when manually copying files.

Executable Binaries

Reserved for future use.

Log Files

Reserved for future use.

Dynamic Resources

Reserved for future use.

Default Locations

The default locations for the Agent on different systems is shown below. Note that, since DroneDeploy does not provide installers for Windows and MacOS, the Agent is configured to run from a single directory on these systems:

CategoryLinuxWindowsMac
Cache Files (path-cache)/var/opt/rocos-agent..
Config Files (path-config)/etc/opt/rocos-agent..
Static Resources (path-res-static)/opt/rocos-agent..
Static Configuration (agent.json)/etc/opt/rocos-agent..