Installing the Countly Server

In this article, we will guide you through installing a Countly Server in a self-hosted environment for both Countly Enterprise and Countly Lite editions.

Countly will no longer provide support for Ubuntu 18 or CentOS/RHEL 7.
Support will now be available for Ubuntu 20 and 22, as well as CentOS/RHEL 8 and 9.
CentOS/RHEL 9 will be the only supported OS for offline installations. For more details, contact your Customer Success Manager.

Requirements

Countly needs to be installed on a Linux server (see system requirements for more information). By default, the web server 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 (eg, Kubuntu, Lubuntu) are not supported.

Countly Lite Installation

Method 1: One-liner Installation

The following command will download and install Countly Lite on your Ubuntu or CentOS server.

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

Method 2: Downloading via GitHub or package installation

As an alternative method, you can download Countly Lite via GitHub:

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 3: Installation via Docker

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

Countly Enterprise Installation

The source code for Countly Enterprise is not publicly available and is downloaded from Countly Enterprise's customer-private repository.

Installation procedures for both Countly Lite and Countly Enterprise editions are the same as follows:

  1. Extract the Countly package to the directory of your choice (e.g., under /usr). Do not use the /root folder for this purpose. 

  2. 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

If you're looking to install Countly in a Docker/Kubernetes environment, please refer to our documentation here for more information.

Countly Offline Installation

There may be situations where you need to install Countly in environments without internet access. As a prerequisite, make sure you have the offline installer package. If you need to obtain one, see the required information to request the offline installer package here

Offline installation is available for Countly Enterprise customers only.

The offline installer automatically installs and configures all required dependencies, including:

  • MongoDB
  • Node.js
  • Python
  • Nginx
  • Other supporting components

Add-on plugins are not included by default unless requested beforehand.

All dependencies are installed at versions compatible with the Countly release. At the end of the installation process:

  1. Countly will be fully operational
  2. MongoDB will be running on the same instance

HTTPS configuration is performed after installation.

Prerequisites

Ensure you have the following before starting the installation: 

Hardware Requirements

Verify that your server meets Countly’s hardware requirements based on your expected usage:

  • Number of users
  • Event volume
  • Retention needs

Consult with the Countly team for sizing recommendations, or contact your Customer Success Manager if you are uncertain.

Obtain the Offline Package 

You can request an offline installer package by creating a support ticket with our Support Team. When requesting the offline installer package, please specify the following: 

  • Operating System (e.g., Ubuntu, RHEL, CentOS)
  • OS Version
  • Required plugins (if any)

Plugins must be requested before package generation.

Root Access

Make sure you have root privileges on your target host.

Installation Steps

Step 1: Upload the Package

Transfer the offline installer package to the server. Recommended location:

/opt/

Example:

scp countly-offline-installer.tar.gz user@server:/opt/

Step 2: Extract the Package

Navigate to the package directory:

cd /opt/

Extract the archive:

tar -xzvf <package_name>

Example:

tar -xzvf countly-offline-installer.tar.gz

Step 3: Run the Installer

Execute the installation script:

bash countly/bin/offline_installer.sh

This installer script automatically installs the dependencies, configures the required services, sets up MongoDB, deploys Countly, and starts all components. No manual Intervention is typically required.

Post-Installation Tasks

HTTPS Configuration

Note that HTTPS is not enabled by default. To configure HTTPS, you'll need to

  • Install SSL certificates
  • Update Nginx configuration
  • Restart Nginx

For more detailed instructions, please refer to our HTTPS Configuration Guides here.

Plugin Configuration

If you requested plugins, they will be installed and accessible.

Please note that additional configuration may be required. This setup should be performed after the main installation is complete.

Was this page helpful?
Reach out to us for any other questions.
Helpful?

Looking for more Help?