– one server hosting multiple apps (streamlit run entrypoint, not app-per-port)
– subpaths per app (so shareable + linkable urls)
We have successfully hacked it so we dynamically load available dashboards and a switchboard dropdown dynamically module.run()s the dashboard of interest.
However, we’re stuck on shareable URLs. Our original idea was look at the session header and pull out page#subpath … except we don’t get that header, just the root.
Any other ideas on how to get fragment urls? Or maybe there is a way to map all subpaths to the same entrypoint, and thus the session header reports which is being triggered?
If you have a dropdown which loads the dashboard you need, the feature you’re asking for reminds me of this PR. The value of your dropdown would be pushed as a query string, and each of your dashboards would effectively be a subpath.
If it fits your needs, we could ping the PR and eventually help there.
Fanilo
Hi @lmeyerov , how did you finally solve your problem of serving different apps on different routes. I am trying to do something similar. In brief I plan to put streamlit apps in containers and serve them on domain.com/<app name> using a reverse proxy. The problem is that I don’t have a hand on the reverse proxy and I cannot set the root prefix stripping, therefore I have to somehow mount my apps on different routes.
Hi @Kasibanteg you have probably solved your problem already, since it some time ago you have posted it. But in case you have not, Streamlit now enables multipage app and this feature would be ideal for what you are trying to do:
The problem is I cannot change the settings on the ngnix (I am not admin, and settings are fixed). But my colleague found an elegant solution. You can set the base path url in the config.toml file.
[server]
port = 5000
baseUrlPath = "my-app-name"
Like this your app will be served on https:/<your-domain>/<my-app-name>/
i am trying to initialize 2 apps on the same server i have used the recommended folder structure, but sadly, every time i start the apps, the config.toml file for each is ignored and instead a completly new file is created in %userprofile%/.streamlit/config.toml.
can someone help?
i am trying to start the servers on the cmd using:
python -m streamlit run D:\Folder\1_Script.py
but right after the config.toml inside the project is ignored, my folder structure:
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.