How to change default paths
thin-edge.io directories​
The tedge config set
command can be used to change various file system paths used by tedge components.
The following table captures the paths that can be changed, with their default locations.
Config Key | Description | Default Value |
---|---|---|
tmp.path | Directory where temporary files are created/stored. E.g: while downloading files | /tmp |
logs.path | Directory where log files are created | /var/log |
run.path | Directory where runtime information are stored | /run |
data.path | Directory where data files are stored. E.g: Cached binary files, operation metadata etc | /var/tedge |
The following daemons also need to be re-started after data.path
is updated:
tedge-configuration-plugin
c8y-firmware-plugin
Example: Set a custom temporary directory path​
The following shows how to change the temp directory used by thin-edge.io and its components.
-
Create a new directory which will be used by thin-edge.io
# create a directory (with/without sudo)
mkdir ~/tedge_tmp_dir
# give ownership to tedge user and group
sudo chown tedge:tedge ~/tedge_tmp_dir -
Update the tedge configuration to point to the newly created directory
Examplesudo tedge config set tmp.path ~/tedge_tmp_dir
infoThe directory must be available to
tedge
user andtedge
group. -
Restart the
tedge
daemons after any of these paths are updated, for it to take effect.sudo systemctl restart tedge-agent
Example: Revert custom path settings​
To revert any of these paths back to their default locations, unset
that config as follows:
sudo tedge config unset tmp.path
Then restart the relevant services.
sudo systemctl restart tedge-agent