Use the same certificate from a jitsi generated domain in another domain

hi, i configured jitsi with your domain and certificate, added a subdomain that points to the same jitsi server.
How can I make the new subdomain use the same certificate that I generated when installing jitsi?
Are there any special commands that I should execute?

I’m struggling to follow what you have done / what you want.

If you want one certificate which works for multiple domains, generate a cert with multiple SANs. In certbot (for Let’s Encrypt) you can do it my specifying multiple domains at the time you generate the certificate.

I generated the first certificate with this command
but it doesn’t give me the option to choose the domains

No, it doesn’t (but you could install certbot, and generate the certs you need).

I’m sorry if I’m being stupid, but what are you trying to achieve?

no problem, rather thanks for replying.
What happens is that I already installed jitisi and everything works fine with its own domain and certificate, but I have added a new domain and type A that points to the server where I installed jisti, and I want that new domain to use the same certificate that jitsi generated, and that both domains run correctly with jitsi
I don’t know if I let myself be understood

You could use certbot to generate a new certificate for both domains (replacing the one you created with the jitsi script), but I don’t think jitsi will work using the alternative domain.

if it works this is another domain but it does not have a certificate

You’ve loaded the landing page, yes, but I’m curious as to whether you will be able to activate camera and microphone, and whether video / audio will work correctly.

But generate a new Lets Encrypt cert for the new domain, and give it a try!

Could you please indicate the commands to generate or use the existing certificate for that new domain?

You have two choices:

a.) two separate certificates, one for each domain
b.) one certificate, replacing your current one, covering both domains

For b.), you want something like:

certbot certonly -d 1.example.tld -d 2.example.tld

ok, i will try option b first i need to install certbot on my server, and then i will try that command

Which option would be the best? Sorry, I don’t have much experience on this certificate.

I don’t know what web server configuration you are using. If you are already directing port 80 somewhere, you’d need whatever is listening on that to be able to handle calls to .well-known. That probably means reverse-proxying it to a writeable location.

I am using nginx

Then you probably need to add something like this to your /etc/nginx/sites-available/your_config.conf:

  location ^~ /.well-known/acme-challenge/ {
   default_type "text/plain";
   root         /usr/share/jitsi-meet;

There is a domain config file where I installed jitsi and it has those settings


In which case, try:

apt-get install certbot python-certbot-nginx

then run:

certbot certonly --nginx -d 1.example.tld -d 2.example.tld

And it should work. (If it doesn’t, you might need to add your alternative server name to server_name in line 6.)

I had this error on the console

to add the other domain on the same line 6 must it be separated by a comma?

You’ve left “.tld” at the end of your domain name.

It should just be, not (and the same with your other domain).

ok, this was said by the console, but the new domain is not certified yet.