Getting 404 error when running streamline app

That is curious. It’s not a 401 or 403 as though it were forbidden.
I suspect it could be that windows uses port 80 by default but ubuntu uses port 22, and port 80 isn’t open to traffic even though you can scan the IP because the streamlit server is being pinged, so your webpage (as a client) can’t see it.

Following this answer you could try running

streamlit run app.py --server.port 22