Config.toml location

Hi,
I feel stupid to ask this, but where do I find the config.toml file? I would like to change the port. I am running Streamlit on a Windows machine. Thanks for your help.

Hey,

It’s at ~/.streamlit/config.toml by default the file doesn’t exist, you have to create it if you want to overrite default config.

(the default config is shown by command streamlit config show)

1 Like

Hello,

In windows installation which is the folder that the toml file should be located?

Thank you.

Hi again, I found the folder, its in user folder (C:\Users\xxxx\.streamlit)

1 Like

Perfect! when created there, the settings is picked up. Thanks alot, I was searching in the wrong place.

1 Like

[Mac]
I need help understanding this: If the config.toml is not created by default in the ~/.streamlit location, where is the streamlit config show sourcing this info from? Also I can see that there is a file called credentials.toml file in ~/.streamlit folder but no config.toml by default.

If I have to create a config.toml file in the ~/.streamlit location do I have to copy+paste all the contents from the output of streamlit config show and then make mods to this newly created file?

I guess from this one?
https://github.com/streamlit/streamlit/blob/develop/lib/str…

Hi @vshets,

where is the streamlit config show sourcing this info from?

It’s coming from the streamlit executable itself. All of the config options are dynamically created and set to their defaults in the code, so streamlit config show just prints them out for you.

do I have to copy+paste all the contents from the output of streamlit config show and then make mods to this newly created file?

You do, but there’s an easy way to do this on a Mac:

streamlit config show > ~/.streamlit/config.toml

Then just open ~/.streamlit/config.toml in any basic editor and edit the values you need in that file. E.g. you could do:

nano ~/.streamlit/config.toml

…to open it in the command-line-based text editor, nano.

I hope that helps!

2 Likes