Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I executed following command

openssl req -new -x509 -days 999 -nodes -out myapp.key -keyout myapp.pem

And then I tried following command

heroku ssl:add myapp.pem  myapp.key --app myapp

I am getting following error message

!   Pem is invalid / Key is invalid

I am using MacBook Pro.

I already paid $20 to heroku and am using "Hostname Based Custom SSL".

share|improve this question

You haven't generated an SSL certificate, only a certificate signing request (CSR). If you really want to use a self-signed certificate, you'll need to add the -x509 option to your openssl req command, or sign the CSR you've already generated with a separate openssl x509 call.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.