Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

SSL Certificate Renewal

Emran BatmanGhelich edited this page Aug 31, 2021 · 6 revisions

Sahabee currently uses Let's Encrypt for establishing a secure SSL connection.
Let's Encrypt currently issues 3-month certificates as a free plan. So it's necessary to keep the certificates up to date every 3 months (or more frequently) by going through the renewal process.

Renewal Procedure

Here are the steps to renew sahabee.ir certificates in production:

  • Make sure the certbot is installed in your local machine.
  • Run sudo certbot certonly --preferred-challenges dns --manual and keep going on with the interactive procedure.
    • Make sure you enter both sahabee.ir and api.sahabee.ir when requested.
  • Certbot will ask you to add a specific TEXT record into the DNS settings of sahabee.ir.
    • Currently sahabee.ir DNS service is provided by Arvan Cloud.
  • After adding the record just continue the certbot procedure to finish out. The certbot will generate fullchain.pem and privkey.pem files alongside some other files.
  • Update the SSL_FULL_CHAIN_FILE and SSL_PRIVATE_KEY_FILE environment variables with the content of new fullchain.pem and privkey.pem files, respectively.
  • Run the Update SSL certs workflow.
Clone this wiki locally