noted.lol Open in urlscan Pro
2a06:98c1:3120::3  Public Scan

URL: https://noted.lol/umami-a-self-hosted-privacy-focused-analytics-platform/
Submission: On January 12 via manual from FR — Scanned from NL

Form analysis 1 forms found in the DOM

<form class="gh-form" data-members-form="">
  <input class="gh-form-input" type="email" placeholder="jamie@example.com" required="" data-members-email="">
  <button class="gh-button" type="submit">
    <span><span>Subscribe</span> <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" viewBox="0 0 256 256">
        <path d="M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z"></path>
      </svg></span>
    <svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">
      <g stroke-linecap="round" stroke-width="2" fill="currentColor" stroke="none" stroke-linejoin="round" class="nc-icon-wrapper">
        <g class="nc-loop-dots-4-24-icon-o">
          <circle cx="4" cy="12" r="3"></circle>
          <circle cx="12" cy="12" r="3"></circle>
          <circle cx="20" cy="12" r="3"></circle>
        </g>
        <style data-cap="butt">
          .nc-loop-dots-4-24-icon-o {
            --animation-duration: 0.8s
          }

          .nc-loop-dots-4-24-icon-o * {
            opacity: .4;
            transform: scale(.75);
            animation: nc-loop-dots-4-anim var(--animation-duration) infinite
          }

          .nc-loop-dots-4-24-icon-o :nth-child(1) {
            transform-origin: 4px 12px;
            animation-delay: -.3s;
            animation-delay: calc(var(--animation-duration)/-2.666)
          }

          .nc-loop-dots-4-24-icon-o :nth-child(2) {
            transform-origin: 12px 12px;
            animation-delay: -.15s;
            animation-delay: calc(var(--animation-duration)/-5.333)
          }

          .nc-loop-dots-4-24-icon-o :nth-child(3) {
            transform-origin: 20px 12px
          }

          @keyframes nc-loop-dots-4-anim {

            0%,
            100% {
              opacity: .4;
              transform: scale(.75)
            }

            50% {
              opacity: 1;
              transform: scale(1)
            }
          }
        </style>
      </g>
    </svg> <svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
      <path class="checkmark__check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"></path>
      <style>
        .checkmark {
          width: 40px;
          height: 40px;
          display: block;
          stroke-width: 2.5;
          stroke: currentColor;
          stroke-miterlimit: 10;
        }

        .checkmark__check {
          transform-origin: 50% 50%;
          stroke-dasharray: 48;
          stroke-dashoffset: 48;
          animation: stroke .3s cubic-bezier(0.650, 0.000, 0.450, 1.000) forwards;
        }

        @keyframes stroke {
          100% {
            stroke-dashoffset: 0;
          }
        }
      </style>
    </svg> </button>
</form>

Text Content

 * Home
 * Get Started
 * About
 * Sponsors
 * Contact
 * Contribute
 * Sign Up

Sign in Subscribe
Self Hosting


UMAMI - A SELF HOSTED PRIVACY FOCUSED ANALYTICS PLATFORM

Umami is a free, open source analytics alternative that's easy to self host and
gives complete privacy to users.

JEREMY

Apr 20, 2022 — 4 min read

For me, having analytics on Noted was not a priority. I was more focused on
content and knew a majority of my readers were using RSS readers or other means
to siphon the content from Noted 😆. The thing is, I'm completely fine with
that. I myself use a FOSS desktop RSS reader for my favorite blogs because it
can be tedious keeping up with them all through bookmarks.

When I finally decided I wanted to use analytics, I knew it had to be Umami.
I've been using Umami on my wiki website The Homelab Wiki for a few years
already. It's a perfect solution.


WHAT I WANTED FROM ANALYTICS

 * Simple one page view of everything I need to know
 * Analytics software I can self host with Docker
 * Easy to setup
 * Simple navigation and implementation
 * Privacy for the users of the site

Umami is a simple, easy to use, self-hosted web analytics solution. The goal is
to provide you with a friendlier, privacy-focused alternative to Google
Analytics and a free, open-sourced alternative to paid solutions. Umami collects
only the metrics you care about and everything fits on a single page. You can
view a live demo here.

Here is a user friendly way to install Unami assuming you are already familiar
with Docker and have it installed on your host machine.

 1. Install Filebrowser (if you want to cheat and not use CLI)

version: "2.1"
services:
  filebrowser:
    image: hurlenko/filebrowser:latest
    container_name: filebrowser
    environment:
      - FB_BASEURL=/f
    volumes:
      - /:/data
      - /docker/filebrowser:/config
    ports:
      - 8081:8080
    restart: unless-stopped


2. Create the schema.postgresql.sql file and place it in /docker/umami

Paste the following into the schema.postgresql.sql file.

drop table if exists event;
drop table if exists pageview;
drop table if exists session;
drop table if exists website;
drop table if exists account;

create table account (
    user_id serial primary key,
    username varchar(255) unique not null,
    password varchar(60) not null,
    is_admin bool not null default false,
    created_at timestamp with time zone default current_timestamp,
    updated_at timestamp with time zone default current_timestamp
);

create table website (
    website_id serial primary key,
    website_uuid uuid unique not null,
    user_id int not null references account(user_id) on delete cascade,
    name varchar(100) not null,
    domain varchar(500),
    share_id varchar(64) unique,
    created_at timestamp with time zone default current_timestamp
);

create table session (
    session_id serial primary key,
    session_uuid uuid unique not null,
    website_id int not null references website(website_id) on delete cascade,
    created_at timestamp with time zone default current_timestamp,
    hostname varchar(100),
    browser varchar(20),
    os varchar(20),
    device varchar(20),
    screen varchar(11),
    language varchar(35),
    country char(2)
);

create table pageview (
    view_id serial primary key,
    website_id int not null references website(website_id) on delete cascade,
    session_id int not null references session(session_id) on delete cascade,
    created_at timestamp with time zone default current_timestamp,
    url varchar(500) not null,
    referrer varchar(500)
);

create table event (
    event_id serial primary key,
    website_id int not null references website(website_id) on delete cascade,
    session_id int not null references session(session_id) on delete cascade,
    created_at timestamp with time zone default current_timestamp,
    url varchar(500) not null,
    event_type varchar(50) not null,
    event_value varchar(50) not null
);

create index website_user_id_idx on website(user_id);

create index session_created_at_idx on session(created_at);
create index session_website_id_idx on session(website_id);

create index pageview_created_at_idx on pageview(created_at);
create index pageview_website_id_idx on pageview(website_id);
create index pageview_session_id_idx on pageview(session_id);
create index pageview_website_id_created_at_idx on pageview(website_id, created_at);
create index pageview_website_id_session_id_created_at_idx on pageview(website_id, session_id, created_at);

create index event_created_at_idx on event(created_at);
create index event_website_id_idx on event(website_id);
create index event_session_id_idx on event(session_id);

insert into account (username, password, is_admin) values ('admin', '$2b$10$BUli0c.muyCW1ErNJc3jL.vFRFtFJWrT8/GcR4A.sUdCznaXiqFXa', true);


3. Run the Docker Compose stack and install

version: '3'
services:
  umami:
    image: ghcr.io/mikecao/umami:postgresql-latest
    ports:
      - "3000:3000"
    environment:
      DATABASE_URL: postgresql://umami:umami@db:5432/umami
      DATABASE_TYPE: postgresql
      HASH_SALT: H6ei6O1tdLNxIQLRs4Mw
    depends_on:
      - db
    restart: always
  db:
    image: postgres:12-alpine
    environment:
      POSTGRES_DB: umami
      POSTGRES_USER: umami
      POSTGRES_PASSWORD: umami
    volumes:
      - /docker/umami/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro
      - /docker/umami/db:/var/lib/postgresql/data
    restart: always
volumes:
  umami-db-data:


4. Connect to the web UI

Go to your.server.ip.here:3000 and log in using admin as the username and umami
as the password.

My favorite thing about Umami is the Realtime view. It allows you to see the
traffic on your website in realtime. It's fun to look at and see what people are
reading in real time.


TUTORIAL VIDEO


🚀
Run your own instance of Umami for as little as $1.2/Month with PikaPods! –
Start free with $5 welcome credit 🤗


FINAL NOTES AND THOUGHTS

Umami is a fantastic self hosted analytics solution and we value the key
component of allowing the privacy of the users.

To be clear, Umami is not the only self hosted analytics option out there. There
are a couple more honorable mentions that I have not tried. Post Hog and Matomo
are the two I am most familiar with. I've dabbled with Matomo and it is another
good solution but was a bit excessive for my needs.

Let me know what you think and what you use on your websites in the comments
below!










READ MORE


TINYPILOT VOYAGER 2A - PALM SIZE KVM OVER IP MADE EASY

Let's talk about the TinyPilot Voyager 2a which is an amazing product to make
having headless servers easier to manage.

By Mediacowboy Jan 2, 2024


SNAPP - YET ANOTHER SELF-HOSTED URL SHORTENER

Snapp empowers you to effortlessly create and manage shortened links.

By Jeremy Dec 7, 2023


SELF HOSTING 101 - OOPS WE HAVE TO LEARN WHAT WE BREAK!

From homelab to cloud hosted VPS. Self-hosting has many meanings! Which one is
for you?

By Flavius Nov 27, 2023


DOCKGE - A DOCKER MANAGER FOR SELF-HOSTING ENTHUSIASTS

Finally, A Docker manager tailored to the homelab enthusiast!

By Jeremy Nov 25, 2023
 * Discord
 * RSS
 * Contact
 * As seen on HN
 * Archive

Powered by Ghost


NOTED

Maximize Your Homelab Potential with Self-Hosting and Open-Source Solutions.

Subscribe