Hardik Sanghavi
Hardik Sanghavi

Reputation: 73

Flask not able to run on 0.0.0.0

I am not able to run Flask on host 0.0.0.0. When I run it with 0.0.0.0, it instead shows my Local IP address.

 * Serving Flask app 'application.py' (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on all addresses.
   WARNING: This is a development server. Do not use it in a production deployment.
 * Running on http://192.168.86.147:5000/ (Press CTRL+C to quit)

Thanks

Upvotes: 1

Views: 4241

Answers (1)

Hardik Sanghavi
Hardik Sanghavi

Reputation: 73

For an externally visible server on Flask, the documentation asks to run flask run --host=0.0.0.0 with the expectation being to see

$ flask run
* Running on http://127.0.0.1:5000/

However you might see your local IP. As long as you can connect to that IP internally as well as externally, it should work as expected.

Upvotes: 1

Related Questions