3 minutes
n8n SSL Labs A Grade
Back in October someone asked on the n8n community forum if there was a way to get the default docker compose setup to get higher than a B grade on the SSL Labs test tool. Well that is the sort of question I enjoy and I have not really done a lot with Traefik before so it was an interesting journey to find out what configuration options are available.
To get things set up in the docker-compose.yml
file we first need to add a command option of "--providers.file.filename=/traefik_conf.yaml"
this tells Traefik to use the traefik_conf.yaml
file the second change we need to make in the compose file is to add a bind volume so we can manage that file outside of the container, We do that by using ./traefik_conf.yaml:/traefik_conf.yaml
assuming the config file will be in the same directory as the compose file.
Now we add in our SSL/TLS options into the traefik_conf.yaml
file, We set the minimum version of TLS and the ciphers we want to use. This file will look something like this, You can find the offical documentation on this file on the Traefik site.
From here it should just be a case of restarting your containers and you are good to go, Just to be complete below are the 3 files (.env, docker-compose.yml and traefik_conf.yaml). Pop all 3 files into the same folder, Update the .env file as needed then run docker-compose up -d
and after a minute or so you should be good to go.
docker-compose.yml
traefik_config.yaml
.env
The community thread is available here if you want to go and read the full thing.