How do I install a purchased SSL certificate?

If you run

./discourse-setup

it will prompt you for an email address and give you a free cert from Let’s Encrypt. That’s probably what you want to do.