How to configure sslmate+surge SSL certificate

Remember to replace with your own domain in all examples.

First install sslmate. If you have homebrew on osx:

brew update
brew install sslmate

If you haven’t already got a certificate, buy one:

sslmate buy

It will prompt you for several things, try to follow the instructions.

Once certified, you’ll receive four files. You can also download them anytime from

For surge, you need to combine two of them and upload it as surge.pem:

cat > surge.pem
surge ssl --pem ./surge.pem --domain

How to reset Homebrew