I downloaded substrate node template from here.

I am following the instructions given in the README and using following command to run the node in docker:


It give the following error:

"Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /host_mnt/Users/syedkamran/polkadot/substrate-node-template/.local"

When I add an empty ".local" file the issue get resolved.

My questions here are:

  1. What is the ".local" file for?
  2. Is there any workaround so that the docker/bash commnad without including this ".local" file?
  3. If this file is necessary than why they do not add this file to the souce code?

Error screen shot

1 Answer 1


It is looking for a .local/ folder but it doesn't exist.

I created this PR to add that .local/ folder to the node-template (substrate-node-template) part of the Substrate repository source code so users wouldn't get that error but the maintainers didn't want to merge it because they were in favour of the option of running substrate-node-template in a Docker container from the upstream Substrate repository instead.

Note that this issue highlights that the substrate-node-template repository is closed to PRs, otherwise I would have created a PR to add the missing .local/ folder into its source code too to fix that error. Since you've highlighted that others like yourself are facing the same issue, I've suggested here that we remove all Docker related code from the substrate-node-template repository and update its README to provide a link to the substrate repository's Docker instructions here.

The substrate-node-template repository historically uses code from the node-template section of the upstream Substrate repository.

If you want to run the latest Substrate node-template in a Docker container, please follow the Substrate Docker instructions here instead.

  • Thank you very much @Luke for your time and detailed explanation . But can you please tel me: 1. Why this .local file/folder is needed? 2. Is it Ok to add the .local file/folder? Commented Mar 23, 2023 at 11:14
  • 1
    the folder (not file) .local/ is required because that is where data such as session keys are stored for validators (see substrate.stackexchange.com/questions/1429/…). in the docker-compose.yml file here github.com/substrate-developer-hub/substrate-node-template/blob/… we bind mount from the container folder /root/.local to the host machine project root folder ./.local. they also create a volume to /chain-data that has a symlink to /node-dev/.local/share/node-template, which is where session keys would be stored Commented Mar 23, 2023 at 11:33
  • "cache for chain data in container" github.com/substrate-developer-hub/substrate-node-template/blob/… Commented Mar 23, 2023 at 23:05
  • Sorry but I am unable to relate this with our discussion. I have marked your detailed explanation as answer BTW. Thank you for your time. Commented Mar 24, 2023 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.