How to change default data directory of rpc node

The default path for the data folder is /var/lib/concordium/$GENESIS_HASH/data/

how to change the rpc node data directory to external hard-drive.

Hi @blue,

From the path, I am guessing you are using the ubuntu node. Is that correct?

We have some documentation about the ubuntu node here, which includes how to configure it: concordium-node/README.md at d7b91274cd3dae927b8f18e2966c21f335c170d3 · Concordium/concordium-node · GitHub
To change the location of the data directory, you need to set the CONCORDIUM_NODE_DATA_DIR environment variable to a path on your external hard drive. To keep the config files near the data files (we usually have my/path/data and my/path/config folders), you can also set the CONCORDIUM_NODE_CONFIG_DIR variable.

Best regards,
Kasper

Hi we are trying to change default directory using.

sudo systemctl edit concordium-${build_env_name_lower}-node.service
[Service]
Environment=CONCORDIUM_NODE_CONFIG_DIR=\data\config
Environment=CONCORDIUM_NODE_DATA_DIR=\data\data

But after we restart the node and transfer the files node stays crashed. removing node and reinstalling also clears the edited configuration and system runs default configuration.

We tried to change path in docker version but data files are getting stored in docker overlay folders.