Same app is displayed when declaring 2 different ip's for 2 different apps

I am trying to save resources by deploying from a vm which iv added multiple nic’s to

If my understanding is correct I should be able to declare a ip I want streamlit to broadcast from and set that in my app

When I do this, the same app is deployed to both ips.

Is my understanding incorrect or am I doing something wrong?

My main issue is that I run out of available ports quickly for my apps.

HI @andrew06074, welcome to the Streamlit community!

I’m slightly confused about your approach here. If you add two NICs, wouldn’t that create two separate networks?

If you want to run two different apps on different ports, you should be able to do it on the same network, by passing the port as a command-line parameter:

https://docs.streamlit.io/en/stable/streamlit_configuration.html#set-configuration-options

Best,
Randy

Hey Randy, thanks for the reply

It looks like streamlit uses the the ip of my client to create the server and broadcast

By adding the additional NIC to my VM im hoping my client receives another address to boradcast from.

My issue is that I run out of available port on my vm rather quickly, im currently using 443,80 and 8501 but as indicated that only allows me 3 apps.

Those ports are just conventions though, you can broadcast on any port you’d like. Or is that restricted on your network?

The are restricted on my domain however I have the ability to open them on my client where streamlit lives

What do you mean they are for convention? Streamlit requires http requests to run no? If that is not the case do you know if there is documentation of compatible ports?

There are ports that are generally considered “well-known”, such as this list:

But if you wanted to broadcast a lot of Streamlit apps, you should have no problem doing 8501, 8502, 8503 and so on until you run out of apps.

Best,
Randy

Ill give it a try, much appreciated!

1 Like