Running Discourse with SSL in Development


I was looking if there was a solution but only topics that don’t provide help with this issue. I’m trying to get SSL running locally in Discourse. Looking at Rails tutorials to make this they recommend using the -b flag when running rails server, like.

rails s -b 'ssl://'

But this doesn’t work as expected in Discourse.

To generate the certificates I’m using GitHub - FiloSottile/mkcert: A simple zero-config tool to make locally trusted development certificates with any names you'd like..

Any feedback would be appreciated.


Our team uses dedicated tools to test stuff that needs SSL (service workers, PWA, etc).

The most popular is but there are alternatives.


Thanks for the reply @Falco, I was looking to test SSO flows and using Ngrok will be an issue since we need to pass the approved callbacks to these services. I was expecting I can just bind the address to server with SSL through Rails. Any idea why this doesn’t work OTB?

Why would that be a problem? ngrok basic plan allows you to specify a custom subdomain.

Yeah I think that would require to change the callback URL on these services, for every developer that wants to do something with SSO, everytime ngrok is used