How to configure custom SSL certificates with Traefik in HCS
Custom SSL Certificates
A guide to configure custom SSL certificates with Traefik in HCS
If you want to use custom SSL certificates with Traefik, you can easily do so by following the steps below.
On each server, /data/HCS/proxy
is mounted into the HCS Proxy (Traefik) container.
You can add your custom SSL certificates in the /data/HCS/proxy/certs
directory.
Generate or request an SSL certificate
Generate or request an SSL certificate for your domain. It can be a self-signed certificate, a certificate from a public CA, or a certificate from Let’s Encrypt.
Read more here about certbot and Let’s Encrypt.
Copy the key and cert files to the server
Copy the key and cert files to the server where your resource that will use the certificate is running. Use scp
or any other method to copy the files.
It should be placed under /data/HCS/proxy
directory, for example:
Make sure the directory /data/HCS/proxy/certs
exists on the server.
Configure Traefik
You can configure Traefik to use the custom SSL certificates by adding a dynamic configuration file through HCS UI or directly adding it to /data/HCS/proxy/dynamic
:
/traefik
is the directory inside HCS-proxy
container where /data/HCS/proxy
is mounted.
Traefik will automatically use this certificate if it matches the domain of the incoming request and the certificate in any of the provided files.
For more information check Traefik’s official documentation.
Last updated