Flask cannot connect after upgrading to https

Hello, I tried to upgrade my flask server on a raspberry pi to https to use desktop notifications. It all went well I think, but after starting the server again I can’t seem to connect to it.
I generated the certificate with certbot and pointed the flask server to it. It starts without errors but connecting to it is impossible. Both openssl and nc confirm that the server is indeed running.

My domain is only for personal use and I would rather not share it.

My web server is (include version): flask 0.12.1-1

The operating system my web server runs on is (include version): raspbian 9.9 stretch

My hosting provider, if applicable, is: selfhosting on raspberry pi

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.28.0

Hi @Mascherino,

Welcome to the community forum!

Can you show me your output from the openssl and nc commands you ran. Additionally what does sudo netstat -plunt show?

Is your flask server binding to tcp ports 80/443 to serve traffic or are you using a webserver such as Apache or Nginx?

Have you seen this doc? https://blog.miguelgrinberg.com/post/running-your-flask-application-over-https