Installing the Countly Server

Follow

Requirements

Countly needs to be installed on a Linux server (see system requirements for more information). By default, the webserver will run on port 80 or 443 (for HTTPS), so it is essential to ensure that those ports are free and unblocked (as in the case of Amazon AWS).

Ubuntu Flavors

Ubuntu flavors (eg. Kubuntu, Lubuntu) are not supported.

Method 1: One liner installation

The following command will download and install the Countly Community Edition on your Ubuntu or CentOS server.

Latest Stable Development
sudo su - 
wget -qO- http://c.ly/install | bash

Method 2: One-click installation via Digital Ocean

If you have a Digital Ocean account and would like to install Countly Community Edition, create a droplet using this link. Once you select a plan and a datacenter region, your Countly instance is ready to go!

Method 3: Downloading via Github or package installation

As an alternative method, you can download Countly Community Edition via Github:

Note: The Enterprise Edition’s source code is not available to the public and is downloaded from the Enterprise Edition customer private repository. However, installation procedures for both editions is the same as follows:

Extract the Countly package to the directory of your taste (e.g. under /usr) - do not use the /root folder for this purpose. Then, fire the easy installation script that comes with Countly, which will work for both Ubuntu and RHEL/CentOS:

sudo su - 
cd COUNTLY_INSTALLATION_DIRECTORY/bin
bash countly.install.sh

Using SELinux

Countly may not work on a server where SELinux is enabled (blocking Nginx and its ports), so you must add those as exceptions or disable SELinux. In order to disable SELinux, run "setenforce 0".

Installation will take between 10-15 minutes. Using your browser, go to http://YOUR_SERVER_IP_OR_DOMAIN in order to create your admin account and login to your dashboard. Also, do not forget to download the client SDKs.

64-bit support only

Due to MongoDB and 32-bit limitations, we only support new installations on 64-bit servers.

Running Countly from a Subdirectory

It is also possible to run Countly from a subdirectory. Follow these instructions for configuration.

Method 4: Installation via Docker

We provide various Docker images suitable for both Countly Community Edition and Countly Enterprise Edition: standard Docker installations and Kubernetes clusters. Please, refer to the Docker & Kubernetes page for further information.

Configure DNS

While the Countly server will work without a DNS, it's suggested that you assign a DNS A record to your server, so you won’t have to memorize an IP address, such as countly.yourserver.com.

Configure Email Delivery

Due to potential spam issues, you need to ensure that you configure your DNS records (explained below), so that emails sent from Countly (e.g. when you add a new user or daily/weekly email reports) can be sent and not caught by SPAM preventions.

Here are a few important things you should check first:

  1. Ensure your ISP has a reverse DNS record entered to associate the domain names and IP addresses from which you send mail. Test your Reverse PTR record here. If your ISP does not enter the proper reverse DNS pointer record, it's very unlikely any of your emails will be delivered.
  2. Is your domain's SPF record correct? Test your SPF record here. Note that TXT is the correct official record type for SPF.
  3. Is your domain's DKIM record correct? This will significantly improve email deliverability. Test your DKIM record here.
  4. If you run your own mail server, check to ensure your mail server IPs are not on any email blacklists. Also, verify that it is definitely sending a fully qualified hostname that resolves in DNS in its HELO message. If not, this will cause your email to be rejected by many mail services.

We highly recommend you send a test email to mail-tester.com to verify that everything mentioned above is working correctly.

Using a Third-party Email Server

  1. Rename this file (countly/extend/mail.example.js in your Countly directory) to countly/extend/mail.js.
  2. Add your email server information. An example has been provided below:
module.exports = function(mail){
    //define this if you need to send email from some third party service
    mail.smtpTransport = nodemailer.createTransport(smtpTransport({
        host: "example-mailserver-host.com",
        secureConnection: true,
        port: 2525,
        auth: {
            user: "your-mailserver-username",
            pass: "your-mailserver-password"
        }
    }));

Configure Server Monitoring

When your server has a problem (e.g. lack of enough RAM, lack of swap space, running out of disk, etc.), chances are that Linux kernel will kill some of the processes or Countly won't work properly. In order to ensure you have a healthy and stable server, we suggest using a monitoring and alerting solution, such as Server DensityNagios, or New Relic.

Making Countly More Secure

We have a list of security and privacy recommendations, together with guidelines, on how to ensure secure deployment. Read more here.

Was this article helpful?
0 out of 0 found this helpful

Looking for help?