Letsencrypt certs "migrate" from linuxserver.io SWAG container to TrueNAS Scale

Marjan

Dabbler
Joined
Jan 12, 2015
Messages
11
Some questions about Letsencrypt certs. I read the guide posted on truecharts.org, looks straight-forward.
Now, I have linuxeserver.io SWAG container running, nginx and letsencrypt certs. It does everything automatically regarding certs.

The question, if I try to move from SWAG to Traefik and Letsencrypt on TrueNAS Scale, stop docker container SWAG, configure everything in TrueNAS Scale, will I get certificates from Letsencrypt?

I am asking this because some time ago linuxserver.io changed the name of their docker image from Letsencrypt to SWAG. Few things bothered me regarding name change, like the name of the bind mount, so I created new container, copied I thought everything needed from old bind mount to new one.
And of course I haven't copied some config files (for letsencrypt) and my private key (I am not sure exactly any more what) from old container to new one, so renewing certificates was failing. I guess this will happen again if I just stop using SWAG and configure everything in TrueNAS Scale.

Hopefully someone already tried this somewhere, I guess it's too early that someone already tried this on TrueNAS Scale.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If your intention is to just use Traefik, better to just cut and run from your old container and do the certificates again fresh on SCALE according to the TrueCharts video.
 

Marjan

Dabbler
Joined
Jan 12, 2015
Messages
11
If your intention is to just use Traefik, better to just cut and run from your old container and do the certificates again fresh on SCALE according to the TrueCharts video.

Thanks for quick reply.

This is the idea, to use Traefik and Letnsencrypt certs on TrueNAS Scale. THe TruCharts video and documentation couldn't be more clear. All this is fine.
I am just thinking that I will not be able to renew certs or create new ones for same domain/subdomains. Last time I tried this, to migrate the certs from one to another container, few months ago, I got some error from Letsencrypt itself. It seems I was missing folder /etc/letsencrypt/accounts, or just some conf file from there, can't remember exactly but this was the issue.
I guess that configuring everything on TrueNAS Scale, probably getting some error, then copying everything from old container should solve the issue like it did before.

These are subfolders in my current /etc/letsencrypt folder:
accounts
archive
csr
keys
live
renewal
renewal-hooks

Listing subfolder accounts and other subfolder gives this:
ls -l accounts/acme-v02.api.letsencrypt.org/directory/d9cee42421936b8910ec1232275dbc4e
-rw-r--r-- 1 911 docker 71 Oct 18 2020 meta.json
-r-------- 1 911 docker 3169 Oct 18 2020 private_key.json
-rw-r--r-- 1 911 docker 78 Oct 18 2020 regr.json

I guess just configuring everything will create some of these folders, then i can just copy whatever is missing if I get into some issues.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I wouldn't worry about copying anything... let the new certs be created on the SCALE server and then Traefik will use them.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
I wouldn't worry about copying anything... let the new certs be created on the SCALE server and then Traefik will use them.
To be a bit more clear: The moment you start manually messing with the folders, we cannot guarantee our guide still works for you, which we can if you just use it without applying additional hacks.
 
Top