Home > Software design >  Specifying SSL keyfile password in gunicorn command line
Specifying SSL keyfile password in gunicorn command line

Time:01-23


I am using **unicorn** with TLS. The command line looks like this:
unicorn --ssl-keyfile=./config/ssl/PrivateKey.key --ssl-certfile=./config/ssl/Certificate.pem  --ssl-keyfile-password=MyPwd

I'm moving to gunicorn for Production but I don't find a way to provide the private key password.

keyfile and certfile are the only SSL command line options available. I don't see any options for keyfile-password :

gunicorn --keyfile=./config/ssl/PrivateKey.key --certfile=./config/ssl/Certificate.pem 

For obvious reasons, I don't want to use an unencrypted private key.
How can I provide the private key password?

Thanks.

CodePudding user response:

Gunicorn does not support a private key with a password. There's a series of open Github issues relating to this. See this and this.

As a work around, you could place nginx in front of gunicorn and let nginx handle the SSL connections.

  •  Tags:  
  • Related