Streamlit on Azure

Hi Experts

I have made a docker container with pandas and streamlit. My streamlit container runs like a dream on my local laptop. But when I try to run it under Azure App services it hangs:

Do you have any ideas?

I think this could be very cool if we could understand what the issue is docker, Azure or Streamlit…

Hi @sojohan, I am not an Azure expert, but can you double check you don’t need any special configuration to enable Websockets? Is it supposed to work out of the box on Azure? Can you share the content of the network tab? Chrome tools -> Network


I am also having this same problem. I have implemented all the suggestions on this forum to no avail. If anyone has been successful in deploying to Azure, a written guide will be much appreciated.

Hi @Kerelu and @sojohan

I have successfully deployed via Docker and Azure. It’s actually running at

I had a lot of problems before eventually getting it working.

The most important to solve was to discover that you need to switch “Always on in the configuraiton settings”. Otherwise your docker container will be closed down after X minutes of inactivity. Leading it to have very, very long response times.

I also set folderWatchBlacklist = [''] in the config.toml file.

I also setup a script to ping my web site every 5 minutes to keep it being responsive. It’s running inside the docker container. I’m actually not sure this is needed. But I still do it.

Then I did a lot of other things to solve this. But some where because I did some very special things with streamlit. So these where changes to the code and should not be relevant to you.

I would really like there to be a guide and could maybe also find the motivation to write one the next time i deploy a streamlit app to Azure via Docker. But I don’t know when that will be unfortunately.

See my docker files and the ping script here

For a lengthy discussion see

For other discussions see

1 Like

@Marc, thank you for your response. I will incorporate your suggestions and hopefully it will work. Should I get it work, I will report back here.
By the way, your awesome-streamlit site is awesome and I reference it from time to time. Thank you!


So I have been able to successfully deploy to Azure, thanks to @Marc’s suggestions and his ‘awesome-streamlit’ site. Basically, I created a .streamlit folder in my project folder which then holds my configurations and changed the port to 80. After pushing my docker image to Azure web app service, I added a new setting named 'WEBSITES_PORT" with value 80. Hope it helps @sojohan.

1 Like

Thanks will try this….

Thanks Marc will continue to experiment. Soren.

I am able to deploy the docker locally without any issue. Deployment to Azure web App also looks good but the site is not working.