# SSL Certificate

### Notes

* This operation will interrupt Helmut's normal operation. Please plan a downtime window and ensure an up-to-date backup is done before changing any configuration.
* Please ensure the SSL certificate is signed and valid
* The .key must be RSA, we do not support elliptic-curve for now
* The .key file should not be password protected
* You need to use X509CO cert format

\
Traefik version 4.0.2.x:\
1.) Copy the certificate (*.crt*) and the (*.key*) files from your computer to the Helmut server */root/certs* folder. Make sure the files are named *server.crt* and *server.key* respectively\
2.) Access Portainer by going to [http://helmut\_server\_address:9000](http://helmut_server_address:9000/)\
3.) Go to Stacks

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2FbTcADqi61MrTb6ucyYL0%2Fimage.png?alt=media&#x26;token=ba38590b-6875-41bf-b827-5ad6370a11e4" alt=""><figcaption></figcaption></figure>

4.) Edit the Helmut4 stack file

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2F9uSfBQxarcB8hWdLhDCD%2Fimage.png?alt=media&#x26;token=45834bf8-8fe4-4050-b4c4-ed3425e7ad9c" alt=""><figcaption></figcaption></figure>

5.) Check the SSL configuration on the Traefik service:

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2FaPNPJzsbHg3NKGGiQkvj%2Fimage.png?alt=media&#x26;token=7ae6e7d5-97ad-4246-adcc-89850aa0f406" alt=""><figcaption></figcaption></figure>

Make sure the following configuration&#x20;

```
command: --configFile=/etc/traefik-ssl/traefik.toml
```

is available in your stack file version.\
\
If you **have** this line, and it starts with a #, delete this character to uncomment the line.\
If you **don't** have this line, please add it below the *image:* line\
\
The same with the volumes mount for the certificate which needs to be uncomment by deleting the #

```
- /root/certs:/certs
```

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2Fn8cxmqbxSbkkMWmXUBPg%2Fimage.png?alt=media&#x26;token=82f5eabe-2426-476d-bf67-617f1966deb4" alt=""><figcaption></figcaption></figure>

6.) Update the stack file

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2FAKjkoMka48TdRzNtXPI8%2Fimage.png?alt=media&#x26;token=559a7952-2744-45ab-bf32-ff6cb4206360" alt=""><figcaption></figcaption></figure>

7.) Access Helmut webpage using *https:* and check if the certificate is loaded<br>

### Convert pem certificate in crt / key

If the certificate is a pem one (it doesn't matter if it is a single one or a split one: cert + key) the easiest way to convert pem into a .crt & .key file is to open those in an editor and copy/paste the content in the appropriate server.\* file.\
Attention: please check that there is no empty line at the end of both files as this can lead to problems as we suggest to remove also comments\
\
This is an example of a pem containing key & certificate

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2FHFZpu0O9yZucSoi9QvBU%2Fimage.png?alt=media&#x26;token=826801ab-4798-4104-8df8-c1fa3d32be09" alt=""><figcaption></figcaption></figure>

If there are several certificates fo a CA-chain those need to be copied one after another which will look like this:

<figure><img src="https://2374370994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4B9pliaE3NVishYbI61g%2Fuploads%2FRCYHYbvA90NMyFPoHyJT%2Fimage.png?alt=media&#x26;token=69303dc7-a90d-45fb-8544-a5dabeee6acf" alt=""><figcaption></figcaption></figure>
