Help Needed with Streamlit and NGINX Configuration on Ubuntu 24.04

Hi everyone,

I hope you’re all doing well! This is my first post here, and I’m looking for some assistance.

I’m currently running a Streamlit app in a Python virtual environment on my local machine with Ubuntu 24.04. My goal is to make this app accessible via a domain I own, and I’m trying to set this up using NGINX.

Here are the details of my setup:

  • Streamlit Port: I’m using the default port 8501.
  • Port Forwarding: It seems to be working correctly, as I can access my app from outside my network via port 8501.

I’ve attached a screenshot of my NGINX configuration, which is linked in my sites-available directory. The configuration passes the nginx -t test, though I do have some redundant domain declarations.

Currently, when I access my domain, I can see the “Welcome to NGINX” page, but my Streamlit app isn’t displaying as expected.

I’ve also made adjustments to my Streamlit TOML file to see if that would resolve the issue.

I would greatly appreciate any suggestions or thoughts on troubleshooting this.

Thank you in advance for your help!