Repolode
Swetrix

Swetrix/selfhosting

Docker Compose setup for self-hosting Swetrix Community Edition, a privacy-focused, cookieless web analytics platform.

Open-source alternative to:Google Analytics

Stars
76
Forks
27
Open issues
2
Last commit
5 days ago

What is it?

Swetrix is an open source, cookieless alternative to Google Analytics that aims to track traffic, site speed, user sessions and pageflows without collecting personal data. Its tracking script is under 5 KB. This repository provides the Docker Compose files and a configure.sh script that generate the environment file needed to run a self-hosted Swetrix Community Edition instance.

Setup involves cloning the repository, running configure.sh to set values such as BASE_URL, and starting the services with docker compose up -d. The web portal is then served at the configured URL.

The Community Edition also supports session replay: recording, playback and MP4 exports, stored in a private S3-compatible bucket such as AWS S3, MinIO, Cloudflare R2 or Hetzner. Replay retention, export concurrency and export file lifetime are configurable through environment variables.

Key features

  • 01Generates the .env file through an interactive configure.sh script.
  • 02Starts the full Swetrix stack with a single docker compose command.
  • 03Tracks traffic, site speed, sessions and pageflows without cookies.
  • 04Supports session replay storage in S3-compatible buckets.
  • 05Configurable replay retention of 30 days up to 5 years.

Use cases

  • Running a privacy-friendly analytics service on your own server instead of Google Analytics.
  • Keeping visitor data under your control for sites subject to strict data-protection rules.
  • Reviewing user sessions and replays to understand how visitors use a website.

Quick start

  1. 1

    Clone this repository

    git clone https://github.com/swetrix/selfhosting
  2. 2

    Change into the project directory

    cd selfhosting
  3. 3

    Generate the environment configuration with the configure script

    ./configure.sh
  4. 4

    Start the Swetrix services with Docker Compose

    docker compose up -d

Things to know

  • Requires Docker and a multi-service Docker Compose stack to run.
  • Session replay storage needs a separate S3-compatible bucket and is optional.
  • The repository has no license listed, so usage rights are unclear.

In collections

Topics

FAQ

What is selfhosting?
Docker Compose setup for self-hosting Swetrix Community Edition, a privacy-focused, cookieless web analytics platform. Swetrix is an open source, cookieless alternative to Google Analytics that aims to track traffic, site speed, user sessions and pageflows without collecting personal data. Its tracking script is under 5 KB. This repository provides the Docker Compose files and a configure.sh script that generate the environment file needed to run a self-hosted Swetrix Community Edition instance.
Is selfhosting free to use? What license does it have?
selfhosting has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
Is selfhosting still maintained?
Actively maintained. The last commit to selfhosting was on Oct 31, 2026.
What can I use selfhosting for?
Running a privacy-friendly analytics service on your own server instead of Google Analytics. Keeping visitor data under your control for sites subject to strict data-protection rules. Reviewing user sessions and replays to understand how visitors use a website.
How do I install selfhosting?
Clone this repository: git clone https://github.com/swetrix/selfhosting Change into the project directory: cd selfhosting Generate the environment configuration with the configure script: ./configure.sh Start the Swetrix services with Docker Compose: docker compose up -d
Where can I get selfhosting?
The source code and installation instructions are on GitHub: https://github.com/Swetrix/selfhosting

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects