Attempting to launch Flask/Socketio with issued SSL Certificate

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: it currently runs the app with
socketio.run(app,
host="0.0.0.0",
port=5000,
debug=True,
ssl_context=("path_to_cert.pem", "path_to_key.pem"))

It produced this output:
TypeError: server() got an unexpected keyword argument 'ssl_context'

My web server is (include version):

The operating system my web server runs on is (include version): Ubuntu 18.04

My hosting provider, if applicable, is: AWS

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

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 1.16.0

I'm guessing this python Flask and you may using the wrong syntax to configure you ssl settings depending on whether you are using eventlet or not. Their documentation is really not good enough.

I'd suggest running your app as http on port 5000 (bound to a local ip like 127.0.01) and use Caddy (or nginx) as a reverse proxy to that app on the same server so it can work as your user facing server and handle all the https stuff. Caddy will automatically configure https, nginx needs certbot.