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

AI-generated summary

A user is seeking guidance on setting up Let’s Encrypt for a second domain, new.domain, on an existing self-hosted Discourse install currently using old.domain. The user is concerned about maintaining access to old.domain links during the transition and wants both domains to work simultaneously for a period. They are unfamiliar with Docker and need clear steps for running Let’s Encrypt and configuring the certificate. Other users suggest checking Discourse’s meta guides on domain changes and multi-domain Let’s Encrypt setups here and here. One user notes that adding a second domain to a Let’s Encrypt certificate is possible, though complex, and recommends using redirects from the old domain or testing on a separate instance before applying changes to the main site pfaffman.

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:

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

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.