filePath in streamlit app: If filePath exist on the computer deploying the app, can other computer use this app

Hi everyone, first message here, sorry in advance if you find my question trivial.

I have been developing a local streamlit app for our data analysis in my team. I am looking to see if it is possible to deploy this app. Problem is that I need to access the path of where my datas sit (on a research server).

Can I deploy my app if my paths are defined locally in the computer that deploy the app? Or a device that is not connected to the server won’t see the data ?

I’m quite sure it doesn’t work that way but it would be super cool if the computer deploying the app could host the “run”, and other devices using the link just interacting with the interface.

Hi @Antoine_Roland, welcome to the Streamlit community!

When you define paths in your Streamlit app, it’s relative to the computer the app is being served from, not relative to the user’s computer. Which means, if where you deploy from has the same paths as you’re trying to access, then it would work.

However, if you’re doing something like in Windows where you map D:/ to a network drive, then try to host the app somewhere else, it won’t necessarily have the same drive mapping. In that case, you would need to specify the exact server address.


Thank you for the answer! I’m working on it right now. I think my solution should be ssh to the serveur of the data. Will I be able to put the ssh output in my filePath str variable ?

Edit: It is indeed a D:/ filePath and it makes problems even if we all have the same mapping…

It’s hard to say if that’s the right solution, but what I can say is that how you access the data from Python ends up being a separate issue than using Streamlit. Meaning, if you have to access a remote server, whether you can do it using ssh, with an API call, or something else, that has to happen before you can use the data in Streamlit.

Good luck!


Yea, I though my question might end up to how I read the data… Because I coded the data read like a nooby windows style, it scales bad deploying to the app. I’m going to see if it’s not too much effort. Thanks

To close, except if someone has more insights.