Custom content for config.yaml for each setup

Hello communities,

I am very curious and wanted to know that where the config.yaml content came from?

And also could I edit that because I have to pass custom flag when run any service so it will be helpful if I can generate my own configuration loaded config.yaml for each.


storj-sim does not designed to be used in production, it’s a test network. The storj-sim binary generates all needed configs with storj-sim network setup command and run all integrated services with storj-sim network run.

But in general you can run almost any service with command setup --help to see what options you can set and which will be written to the related config.yaml.
This short help will also show what is default path for that config in your system.
Many services allow to specify a path to the config.yaml file in their run command, so you may check the run --help command as well.

storj-sim stores all configs under the path, which you can see for the --config-dir option, if you run storj-sim without any command.

If you want to have separate networks, then it’s better to use storj-up instead, it is a docker-compose based setup and can store config files independently while still managed with a few commands.
See GitHub - storj/up: Docker-compose files for running full Storj network locally

1 Like


But the content loaded in config.yaml where it comes from?

Could I generate that file with my changes for example

gateway-mt run ^
   --auth.token my-test-auth-token ^
   --auth.base-url http://localhost:8000 ^
   --domain-name localhost ^
   --server.address localhost:8002 ^

I dont want to pass these flags every time so I change in content of config.taml and insert this so whenever I run gateway-mt setup it automatically takes my given inputs rather than its defaults.

Is there any way to make this happen?


when you run

<something> setup --first-option --second-option

yes, try to add these options to your gateway-mt setup command with all previous needed options.
You may also edit the config.yaml with a plain text editor, Notepad++ for Windows, nano for Linux and Mac or use a Visual Studio Code.
All arguments can be added as options, so the --auth.token my-test-auth-token argument can be added as an option to the config.yaml file:

auth.token: my-test-auth-token

and so on

1 Like

Yes but when we run <something> setup default values with keys loaded in config.yaml. That content, where it came from?


From the code I believe.

1 Like

Could we edit that?

As I want to put my values in predefined keys so I don’t want to pass it when I setup or run anything…?


It’s open source, you may change it.
However, the batch script would be better and easier for me, if I were you.
Or just use setup parameters when you create a network.

Perhaps I do not understand a goal, but test network doesn’t seem to me as a tool to generate hundreds independent local network, otherwise why do you want to automatize it?

1 Like

Yes @Alexey

I totally agree with you.

But I am curious to know how predefined content load in such file like config.yaml

And how to values can be change using cli parameters.

That’s why I want to get dig into process of generation of condig.yaml and modify it’s content with custom and check Will it works same as before?

That’s why I am asking again and again for this.

If you could help me with that that I would be greatful.


If you provide custom options in the run command, they will override parameters loaded from the config.yaml. However, they will not modify the file itself.

To modify a yaml file from the batch scripts or CLI you may use a yq utility: GitHub - mikefarah/yq: yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor

1 Like

Okay @Alexey …

But I have just found one file

As per my assumptions content loading in .yaml file, let’s say consig.yaml for satellite, It will come from here.?

Please you also take a look in that all content present in config file is same as in this.

So changing in this and then setup satellite will update config.yaml of satellite?

You may try. However, I believe these configs are generated there: storj/network.go at 41bfbbe772219259c90491fb818927eb39cd78fd · storj/storj · GitHub


Okay … @Alexey

Then what is this

I do not know. Perhaps some test data for auto-tests.

All right, will look into that…

1 Like