Setup $ export FLASK_APP=app $ export FLASK_DEBUG=true $ sudo mkdir /var/log/flask/ $ sudo chown marcosflp:marcosflp /var/log/flask/ $ sudo chmod 775 /var/log/flask/