Flask default host and port can be changed by passing the values to host and port parameters while calling run method on the app.
from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Hello, World!"
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)