Step-by-Step Guide to Installing Umami on Linux for Website Analytics

Key Notes

  • Umami offers a privacy-focused approach to website analytics.
  • Installation relies on Docker, simplifying constraints of traditional setups.
  • Implementing SSL ensures secure data transmission for your analytics platform.

Mastering Analytics: How to Install Umami on Ubuntu Linux

Umami Analytics allows webmasters to gather insights about website performance while prioritizing user privacy. In this guide, we will demonstrate how to install Umami on Ubuntu Linux, setting you up for effective data tracking.

Why Choose Umami for Your Analytics Needs

Umami stands out as a privacy-centric analytics solution that anonymizes user data, making it an appealing choice for webmasters seeking to analyze their website performance without compromising visitor privacy.

Furthermore, Umami is GDPR-compliant and does not rely on cookies, enabling easier website navigation without additional opt-in requests.

Another advantage is that Umami is free to use and lightweight, allowing it to be installed on existing servers without consuming significant system resources.

Setting Up Docker and Docker Compose for Umami

To begin self-hosting Umami analytics, you must first install Docker and Docker Compose on your Ubuntu machine:

Step 1: Fetch the Docker Signing Key

Obtain the signing key from the official Docker website.

Step 2: Create a New Repository File

Utilize a text editor to create a repository file in the “/etc/apt/sources.list.d/” directory.

Pro Tip: Always verify the repository’s contents before saving.

Step 3: Update Your System

Ensure your system is fully updated by running:

sudo apt update

Step 4: Install Docker and Dependencies

Install Docker, Docker Compose, and any necessary dependencies by executing:

sudo apt install docker docker-compose

How to Install Umami

Next, navigate to the Umami GitHub repository and open the preconfigured Docker Compose file in a text editor:

Step 5: Configure Environment Variables

Locate the “environment:” section in the Docker Compose file and set the APP_SECRET variable to a unique random string.

Step 6: Build the Umami Container

After saving your modifications, build and run the Umami container using:

sudo docker-compose up -d

Step 7: Verify Container Status

Check that your Umami instance is up by listing the running Docker containers:

sudo docker ps

Securing Umami with SSL

To make your Umami analytics accessible online, set up an SSL reverse proxy:

Step 8: Update DNS Settings

Create a new “A” record in your DNS settings pointing to your Umami server’s IPv4 address.

Pro Tip: Ensure propagation of DNS changes before proceeding to SSL settings.

Step 9: Install Certbot

Next, install the Certbot snap package for obtaining SSL certificates:

sudo snap install core && sudo snap refresh core

Step 10: Configure your Reverse Proxy

Create a new NGINX configuration file for your Umami domain and add the necessary configuration block.

Step 11: Generate SSL Certificate

Use the following command to acquire an SSL certificate:

sudo certbot --nginx

Step 12: Test SSL Access

Ensure that your Umami instance is accessible securely by visiting your subdomain in a web browser.

Integrating Umami Analytics into Your Website

Upon successful installation, the next step is to configure your Umami user account:

Step 13: Change Default Credentials

Log in with the default credentials (username: admin, password: umami ), and change your password immediately for security.

Steps to Add a Website for Tracking

Step 14: Add a New Website

Click on Settings in the navigation bar and then Add Website.

Step 15: Input Website Information

Fill out the website details, such as name and domain, then click Save.

Step 16: Copy Tracking Code

Navigate to the Tracking Code tab, and copy the provided HTML snippet.

Step 17: Paste Tracking Code into Your Website

Insert the copied snippet into the <head> section of your website’s HTML on each page you wish to track.

Summary

By following these steps, you can successfully install and configure Umami Analytics on your Ubuntu server, allowing for efficient and privacy-focused tracking of your website’s performance.

Conclusion

Umami Analytics presents a powerful alternative for webmasters desiring privacy and GDPR compliance. By installing it on your Ubuntu server, you take a significant step in analyzing your site while respecting user data.

FAQ (Frequently Asked Questions)

What is Umami Analytics?

Umami is a self-hosted, privacy-focused website analytics tool that provides insights without compromising user privacy.

Is Umami free to use?

Yes, Umami is completely free to use and can be installed on your server with minimal system requirements.