SSL Cert Install in CHT 3.x

SSL Cert Installation for Self-Hosting Setups using Medic OS/3.x

Requirements

  • Installed CHT-Core 3.x via either Self Hosted, EC2 or Local Setup, but must use docker compose.
  • Your own SSL certifications like Let’s Encrypt.

Copy certs into medic-os container

On your server copy the .crt and .key files to the medic-os container. The existing self signed .crt and .key files will be overwritten:

sudo docker cp /path/to/ssl.crt medic-os:/srv/settings/medic-core/nginx/private/default.crt
sudo docker cp /path/to/ssl.key medic-os:/srv/settings/medic-core/nginx/private/default.key

Restart services

Now that the .crt and .key files are in place, restart nginx in the medic-os container with:

docker exec -it medic-os /boot/svc-restart medic-core nginx 

View Nginx Logs

To troubleshoot any problems with the new certificates, after running docker exec -it medic-os bash, the nginx log files can be found in /srv/storage/medic-core/nginx/logs/, including:

  • access.log
  • error-ssl.log
  • error.log
  • startup.log

Hosting > 3.x > Production Hosting - Docker

Hosting the CHT on self run infrastructure