streamlit: Can`t connect to streamlit server over network

Summary

When I run streamlit hello it works very well in my local browser. When I try to connect from another computer on the network, using the provided network url or using the local ip address of the computer running the app, streamlit seems to get stuck on connecting.

Steps to reproduce

What are the steps we should take to reproduce the bug:

  1. Run streamlit hello
  2. with another computer on the same network go to other.ip.address:port

Expected behavior:

I expected to be able to access the running app over the network, and being able to see the hello-example in the browser on another computer.

Actual behavior:

On the computer not running the app, you do see that it is trying to do something but it never connects to the streamlit server. Screenshot_20191017_095406

Is this a regression?

no, I have not had this work before

Debug info

  • Streamlit version: 0.47.0, 0.48.1
  • Python version: 3.6.8
  • Python3 with venv
  • OS version: ubuntu
  • Browser version: chrome, firefox

Additional information

If needed, add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 9
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Thank you for your answer. I looked for ~/.streamlit/config.toml and it was not there. In ~/.streamlit only credentials.toml existed. I created config.toml with only this in it:

[server]
enableCORS = false

This indeed fixed the problem for access over the local network.

Configuring it with

[browser]
serverAddress = "the_address.com"

does not work. If I navigate to the_address.com/8501 both on the computer that runs the app and other computers on the network the browser does try to go to the network ip address that streamlit gives in the console but I get server-not-found errors.

@dcaminos inside of a conda environmet where should I place my config.toml file?

i faced the same issue i feel http:// version of the app is faster compared to the https://

since https:// connects after more than 3-4 mins while http:// connects within a minute

Hi @drorata, @mneira10,

Streamlit configuration is set with the following precedence:

  • command line arguments
  • ${CWD}/.streamlit/config.toml (where cwd is the folder you’re running streamlit from)
  • ${HOME}/.streamlit/config.toml (where home is the user’s home folder)

There is no virtual environment specific way to have different configs. You’ll need to be running streamlit from different folders to have multiple local configurations, unless you pass args in via the ClI.

Is there a single/system-wide config? What is the behavior when using streamlit in different virtual environments?

some

I am having the same issue. I am using Ubuntu 16.04 with Python 3.6, but for some reason, I don’t have this file on my system “config.toml”. I only have “credentials.toml”. Is this normal? What could be wrong here?

I also did not have the config file. When I made and edited it as described above it did work. I am now also curious if this file is supposed to be there with a clean install of streamlit.