Tutorials  /  Linux Basics

Install Countly Server on CentOS 7 – Full Setup Guide

Ccentron Redaktion · April 2025 ·4 min read ·Linux Basics, Tutorial

Countly is an open source analytics and marketing platform for web and mobile applications. It supports real-time data updates and uses a plugin-based architecture for extensibility. This guide will walk you through the process of installing the Countly server on a CentOS 7 machine.

Prerequisites

  • A 64-bit CentOS 7 server instance with a minimum of 2 GB RAM.
  • A user with sudo privileges.
VM

Matching infrastructure at centron

No hardware needed to follow along: ccloud³ VMs with full root access start at €3.12 per month, billed by the hour and ready in seconds. Rent a cloud server →

Step 1: Update the System

Begin by logging in as the sudo user and updating your CentOS system packages using the commands below:

Console
sudo yum -y install epel-release
sudo yum -y update
sudo shutdown -r now

Once the server reboots, log back in with your sudo credentials to continue the setup process.

Step 2: Install the Countly Server

Use the following command to install Countly and all required dependencies. The root password will be requested:

Code
su -c "wget -qO- http://c.ly/install | bash"

Step 3: Open Firewall Ports

Allow necessary ports for HTTP, HTTPS, and SMTP through the system firewall using the following commands:

Console
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --add-service=smtp --permanent
sudo firewall-cmd --reload

To check Countly’s status, run:

Console
sudo countly status

You can also manually start or stop Countly:

Console
sudo countly start
sudo countly stop

Step 4: Enable HTTPS with Let's Encrypt

Before proceeding, ensure your domain or subdomain points to your server’s IP. Begin by installing Certbot:

Console
sudo yum -y install certbot

Replace countly.example.com with your actual domain and <user_name> with your Linux username in the following command:

Console
sudo certbot certonly --webroot -w /home/<user_name>/countly/frontend/express/public -d countly.example.com

Once the certificates are generated, enhance security by generating Diffie-Hellman parameters:

Console
sudo openssl dhparam -outform pem -out /etc/letsencrypt/live/countly.example.com/dhparam2048.pem 2048

Next, update the default Nginx configuration by editing the following file:

Console
sudo nano /etc/nginx/conf.d/default.conf

Replace the contents with this configuration:

Code
server {
    listen 80;
    return 301 https://$host$request_uri;
}
server {
    listen   443;
    server_name  localhost;
    access_log  off;
    ssl on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers 'kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 DES-CBC3-SHA +SHA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED';
    ssl_session_cache builtin:1000 shared:SSL:10m;
    ssl_stapling on;

    ssl_dhparam /etc/letsencrypt/live/countly.example.com/dhparam2048.pem;
    ssl_certificate /etc/letsencrypt/live/countly.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/countly.example.com/privkey.pem;

    location = /i {
        proxy_pass http://127.0.0.1:3001;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }
    
    location ^~ /i/ {
        proxy_pass http://127.0.0.1:3001;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }

    location = /o {
        proxy_pass http://127.0.0.1:3001;
    }
    
    location ^~ /o/ {
        proxy_pass http://127.0.0.1:3001;
    }

    location / {
        proxy_pass http://127.0.0.1:6001;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

To finalize everything, restart both Countly and Nginx services:

Console
sudo countly restart
sudo systemctl restart nginx

You can now access your Countly dashboard at:

https://countly.example.com

On first access, you'll be prompted to set up an administrator account. After that, you can begin adding applications for data collection and monitoring.

Conclusion

Countly is a powerful, open-source platform for analyzing user behavior across web and mobile apps. Its real-time data updates and modular plugin architecture make it a flexible and extensible choice for developers and marketers alike. With the successful installation and configuration on CentOS 7, you are now equipped to take full advantage of Countly’s comprehensive analytics capabilities.

Jetzt 200 € Guthaben sichern

Testen Sie Ihr Setup auf ccloud³

Registrieren Sie sich in der ccloud³ und erhalten Sie 200 € Startguthaben für Ihr Projekt – z. B. für eine PostgreSQL-VM mit automatischen Backups.

centron Redaktion Technische Redaktion

Das Redaktionsteam von centron schreibt Anleitungen aus dem Betriebsalltag: getestet auf unserer eigenen Plattform, betrieben im Rechenzentrum in Hallstadt bei Bamberg.

Kategorie Linux Basics
Teilen
Noch offene Fragen?

Unser Team hilft Ihnen bei Ihrem konkreten Setup weiter – von Menschen, die die Plattform selbst betreiben.

War dieses Tutorial hilfreich?

Ihre Antwort wird anonym gespeichert und hilft uns, die Tutorials zu verbessern.

Kommentare

Noch keine Kommentare – stellen Sie die erste Frage zu diesem Tutorial.

Zum Kommentieren anmelden

Kommentare stehen centron-Kunden offen. Melden Sie sich in Ihrem Konto an, um eine Frage zu diesem Tutorial zu stellen.

Weiterlesen

Das könnte Sie auch interessieren

Jetzt kostenlos anfangen

Melden Sie sich an und erhalten Sie in den ersten 60 Tagen ein Guthaben von 200 € bei centron.

Dieses Werbeangebot gilt nur für neue Konten. Angebot ausschließlich für Gewerbetreibende.

Jetzt loslegen Sales kontaktieren