Supress new browser window once app is started execution

Hi, I tried to schedule my streamlit app thru windows task scheduler in Server. But it always opens a new window in server immediately after execution. Since that is prod system, I don’t want to create that window. Users will use that link from client machines. Could you please suggest how to supress opening of new browser window for local host?

You need to have your app run in “headless” mode. There are 4 different ways to set this configuration per this page, scroll down to the “View all config options” section. So in your case, you can create a config.toml file and add:

[server]
headless = true

or set the environment variable STREAMLIT_SERVER_HEADLESS=true
or when you run your app at the command line, you can just pass the --server.headless true parameter like so:

streamlit run your_app.py --server.headless true

To the streamlit devs:
I think the documentation can be improved by having “Configuration” menu item added on the left panel which is dedicated specifically to streamlit configuration. I can see how new users would not think to look in the “Command-line interface” menu item to find the configuration options.

1 Like

Hi @pybokeh, You’re absolutely right. Thanks for the suggestion.

I made a documentation issue for this here.

Thanks again!

1 Like

This PR was merged yesterday, which hopefully makes it clearer where people should go to find the configuration options. I’ve also printed the entire configuration file there so that people can refer to the docs for the argument name vs. necessarily having to run the command on the CLI.

Thanks for the suggestion!