<!-- Note: This file is primarily defined to be used in the IXP documentation. However, it is also provided in the docker-deployment repository for reference. If you accessed this file from the docker-deployment repository, please be aware that the links used in this file may not work as expected. -->

## HTTPS Deployment with your own certificates

For deployment of the IXP with your own SSL certificates, download the latest
`https-owncert` compose preset folder
[here](https://gitlab.fi.muni.cz/inject/docker-deployment/-/packages).

After downloading the preset, unzip it, set the unzipped folder as your working
directory, and follow the instructions below.

### Adding Your Own Certificates

Add `fullchain.pem` and `privkey.pem` into the `./certificates` directory. If
the format of the keys or selection of keys does not suffice, modify the
`nginx.conf.template` file and change the related configuration on the line
`:32-33`.

### Notes:

- Docker compose mounts the `./certificates` folder as
    `/etc/nginx/certificates/` in the Nginx container.

- For development purposes, you might want to use self-signed certificates. You
    can generate them using the following command:

    ```bash
    openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
        -keyout privkey.pem -out fullchain.pem \
        -subj "/C=US/ST=State/L=City/O=Organization/OU=Unit/CN=localhost"
    ```

### Next Steps

After adding the certificates, proceed with the installation as described in the
[installation guide](../overview.md).

<div class="navigation" markdown>
  [&larr; Installation overview](../overview.md){ .md-button }
  [Basic HTTPS](./base-setup.md){ .md-button }
</div>
