Countly Documentation

Countly Resources

Here you'll find comprehensive guides to help you start working with Countly as quickly as possible.

Installing Let's Encrypt for HTTPS

If you would like to use Let's Encrypt, a free encryption service for Countly server, this document explains how to generate, install and update your certificate on your Countly instance.

Visit Let’s Encrypt and install certbot

First step is go to go Let's Encrypt page and install your certification bot (certbot) which will guide you towards generation your certification.

Here, select Nginx as platform and then Ubuntu, CentOS or Red Hat Enterprise Linux based on the Linux distribution you use.

Now, in the next page, run commands as instructed (e.g using wget, apt or yum) so it installs Certbot.

Running Certbot

Depending on the method of installation, run Certbot command directly on the console with root credentials, or if you have downloaded Certbot as a tar.gz package, run it on its directory. Below command assumes you downloaded using a package manager.

# certbot certonly

This will start generating SSL files by asking you a few questions below.

In screen above, you should select (1) and then click OK.

In next screen, enter your email so it can notify you 90 days beforehand for leases. Also it will be used for notifications and lost keys.

Now input your URL host where Countly runs:

Now select your Countly folder as shown below. It should show /frontend/express/public folder.

From this point, Let's Encrypt will successfully create necessary files.

Configuration options

Now, edit Countly Nginx configuration based on the Countly document in this link. You also can redirect HTTP request to HTTPS based on instructions given in the same document.

Next step is setting certificate files for auto renewal. In order to do this, add a cron job as shown below. Don't forget to to replace COUNTLY_SERVER_PATH to the real directory of your installation.

0 0 */80 * *  /COUNTLY_SERVER_PATH/bin/certs/certbot-auto renew --quiet --no-self-upgrade

This way, certificate will renew every 80 days.

With this last step, you are done. Restart Countly server and enjoy.

Installing Let's Encrypt for HTTPS

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.