SWAG Multiple Domains with Multiple Certificates

I found an older post when searching for an answer to my question that seemed to indicate this wasn’t possible (SWAG enhancements OR new container with Dehydrated - #4 by aptalca), but it’s quite possible I wasn’t reading that correctly. I host multiple sites on a single server and want multiple certificates. I previously did this with an apache server and manually built certbot files, but decided I wanted to move it to a docker container, so found the SWAG container. I was able to get multiple certificates by running certbot certonly -d newdomain.com inside the container. Then I just duplicated /config/ssl.conf per domain to point to the /config/etc/letsencrypt/live/newdomain.com folder.

This seems to be working fine if I manually run certbot renew in the container (it sees both domains and tells me neither is due for renewal), but is something different happening at startup/ crontab? I scanned /app/le-renew.sh but didn’t really see anything that meant this wouldn’t work. Meaning, when my second domain’s certs expire, will the container not auto renew them? Thanks!

Yep that’s correct. SWAG isn’t designed to use multiple certs, it will use the same cert across all the domains hosted on it.

What I just did gives me two sets of certs on two different URLs. So why is it said that it doesn’t support that? Is it the auto renewal process that’s problematic for multiple sets of certs?

Yea, due to the automation, there isn’t a clean way for use to be able to work with multiple certificates in a container. Never really found a clean way to do it which is also easy for users to use + support.

Ok thanks. So my setup would work until I redeployed the container. At which point it blew all to hell :slight_smile: