MIgrate from Letsencrypt to SWAG

Hello,

Currently I am using your Letsencrypt container for certs and publishing behind Nginx some other containers. I saw that now it’s renamed to SWAG and I wish to migrate to new container.
What I did so far:

  1. stop letsencrypt container
  2. copy config folder to new folder to be used by SWAG
  3. started SWAG container with same options like I did with letsencrypt
  4. error I am getting in container logs is that authentication failed on letsencrypt web site

What is proper way to migrate to SWAG container? Should I first start SWAG container with options i need, then copy just Nginx conf files from Letsnecrypt container and nothing else?

Regards,
Marjan

You don’t say how you deployed the container, but all you have to do is change the repository from linuxserver/letsencrypt to linuxserver/swag.
No need to change anything else.

Hello,

Here is command for Letsencrypt:
docker run -d --name=letsencrypt --cap-add=NET_ADMIN --net=dock-bridge01 --hostname=letsencrypt -e TZ=Europe/Belgrade -e URL=mydomain.com -e SUBDOMAINS=subdomain1,subdomain2 -e VALIDATION=http -e DHLEVEL=2048 -e ONLY_SUBDOMAINS=false -p 443:443 -p 80:80 -v /data/letsencrypt/appdata/config:/config --restart unless-stopped linuxserver/letsencrypt

And this is for SWAG:
docker run -d --name=swag --cap-add=NET_ADMIN --net=dock-bridge01 --hostname=swag -e TZ=Europe/Belgrade -e URL=mydomain.com -e SUBDOMAINS=subdomain1,subdomain2 -e VALIDATION=http -e DHLEVEL=2048 -e ONLY_SUBDOMAINS=false -p 443:443 -p 80:80 -v /data/swag/appdata/config:/config --restart unless-stopped linuxserver/swag

The only differences are container name, hostname and mount point. I think the problem might be with hostname, I found in configuration folder that hostname is used for authenticating to Letnsencrypt web site to retrieve certificates. I still haven’t been able to try with old hostname but I would like to use new one if possible.

Regards,
Marjan

Are you able to replicate the issue when following our readme? It’s difficult to offer support when you do your own thing. I’m inclined to agree that the superfluous use of --hostname is the culprit, which is why it’s not in our sample.

We do also have a migration guide in our SWAG release article

You’re not supposed to change the mount point, that way it picks up existing data

1 Like

I have just one question…when will there be a downloadable container?

I have never done a docker compose or anything of the sort (no desire) so would prefer…

And since letsencrypt continues to work … :wink:

Cheers

I don’t know what you mean by downloadable container

Well I mean go to apps in unraid - community applications, search and download the container. Then fill in the property sheet…

Thats how I have added all of my containers…

Cheers

When this is merged, there will be one: https://github.com/linuxserver/docker-templates/pull/202

Perfect.
I’ll be waiting…

Thanks

Just out of curiosity why are people still using this while there is Traefik and Authelia?

Why do people still use js when there is python, go, [insert any language]?

Also because SWAG is a full fledged web server, not just a reverse proxy. And it has built in integration for Authelia among others: https://blog.linuxserver.io/2020/08/26/setting-up-authelia/

PS. Our discord gets flooded with people who can’t figure out traefik’s abysmal documentation (which we don’t support btw).

I did read your readme, I always first RTFM then do the thing.
Anyway, the --hostname is the culprit. Changing it to one used with letsencrypt container solved the problem.

@Amviewer, I am using Nginx with Authelia. Simple to integrate and works just fine.