Search code examples
networkingfastapi

How to make FastAPI server available from outside local network?


I'm developing a small API using FastAPI for the first time. I'm using uvicorn to run the app.

When I use:

$ uvicorn main:app --host 0.0.0.0

I can access the app from inside my network (by using my public IP), but not from the outside. I've already checked the firewall, and even tried fully disabling it, however, without any effect. I just want to be able to showcase the app to outside people. How can I make that happen ?


Solution

  • I've found easier to use a service like ngrok or expose to do this kind of thing.