Set Up Let's Encrypt with Second Domain for Existing Discourse Install

I have an existing discourse self-hosted install that is setup with https.

https://community.old.domain works

I want to set up https://community.new.domain

I have forgotten how I set up Discourse initially. My questions:

  1. where do I run let’s encrypt? Is there a script, or do I install certbot and python3-certbot-nginx somewhere? I am unfamiliar with docker, so I need a recipe or a set of steps if I have to run this in docker
  2. once I have the certificate, how do I add the certificate to the nginx configuration?

I am switching the name of the community from old.domain to new.domain. I am hoping that the links to old.domain continue to work.

Check out these guides:

2 Likes

thank you for your help. If I go through these steps, the old.domain stop working immediately?

I’m worried that the old.domain links will stop working. There are many of them. People are more familiar with old.domain.

I want to use old.domain and new.domain at the same time for a month or two. is this possible?

Somewhere there is a topic about how to add a second domain to the let’s encrypt certificate. I can’t find it, but that’s what you want

2 Likes

Thanks. You may mean these?

These look pretty involved. I may have to get another domain to test on another company internal Discourse install before I try it on a large public site.

Well, I went to some length to make it so that you could generate the text to paste in to your yml.

Another way to do it would be to just keep a server on the old domain with a valid cert that does the redirects.

1 Like