Creating a new OpenLMIS instance requires the creation of appropriate docker certificates. They can be created on the basis of documentation contained on the docker page . For OpenLMIS instances, certificates are created when the instance is started using Terraform.
When creating a new certificate, you can easily specify the number of days the certificate is valid thanks to the `-days` parameter. In the OpenLMIS project, the validity of the certificate is determined by the docker_tls_expiry_days parameter. Usually this number is set to 365 days, but you can increase it to e.g. 1095 days - it's 3 years. Certificates are responsible for security, so remember to set it carefully (it should not be too large).
When the certificate loses its validity, it is necessary to generate a new certificate. The easiest way to do this is to run the following command on your local machine (step 3 fromthis instruction):
docker-machine create --driver generic --generic-ip-address=*.*.*.* --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user ubuntu name1
If the certificates are additionally stored on S3 on AWS or on the GitHub repository then you should also update them in these places.