this post was submitted on 22 Apr 2024
54 points (96.6% liked)

Selfhosted

40183 readers
770 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hello y'all! I have my personal (static) website / blog running on netlify out on the public internet. Netlify, in case you're not familiar, is not a traditional web host, so I can't add databases or anything else like that on the server itself. Right now, that site has zero analytics / visitor tracking and I've decided I want to fix that. I want to know how many people visited my site and which pages they looked at. I am NOT looking to monetize anything though, to be clear.

I want to self-host that analytics service at home, on my home server, but I need two things, please:

  1. Recommendations for which app to use. I've checked out Umami and Plausible and they both look good for my meager purposes. But please - let me know which app makes sense for a personal web site with low-ish traffic. Is there something simpler I could do?

  2. Help getting the reverse proxy set up so my public web site can send analytics data into my home server. I would prefer this to be entirely under my control, so no CloudFlare or Tailscale, for instance. Is Caddy an option? I get really confused really quickly about this level of networking, to be clear, so maybe I just need a really plain-English guide to handling this sort of thing?

Thanks for any / all ideas! Y'all so totally rock!

ETA: A little more info about Netlify and why I can't install or use tools other traditional web hosts might offer.

** SECOND EDIT**: Thanks to @andrew@radiation.party for the goatcounter suggestion, I am trying that out now for the analytics side of this. Getting it set up was easy and free, using their server. (I know, I know...) If I still like the app after the next couple of weeks, I will move it in-house and self-host. That gives me a couple of weeks to figure out my second issue above, how to have my public web site make requests to my self-hosted, behind the firewall/NAT service. Yay, more learning!

top 25 comments
sorted by: hot top controversial new old
[–] BaalInvoker@lemmy.eco.br 10 points 6 months ago (1 children)

Im using Matomo, however my use case is different from yours. I run a business and need more complete data, which Matomo gives me

I also had in mind Plausible, cause it's less resource demandant, but at the end I have chosen Matomo

[–] perishthethought@lemm.ee 1 points 6 months ago (1 children)

Gotcha - thanks! Yeah, I saw Motomo listed on the selfh.st apps list but right, it seems more than I need.

https://selfh.st/apps/

[–] markstos@lemmy.world 1 points 6 months ago

I also host Matomo. It was easy to install and has been easy to maintain.

[–] bobs_monkey@lemm.ee 6 points 6 months ago (2 children)

Off topic, but I wonder if those old visitor counters from the web 1.0 days still work

[–] vvv@programming.dev 8 points 6 months ago (2 children)

yep. they're still here. they got smaller, and we call them "tracking pixels" now.

it's just an image, which, server side, you can count the number of times it got loaded. easy to embed and no js required.

[–] perishthethought@lemm.ee 1 points 6 months ago* (last edited 6 months ago) (1 children)

Thanks for this idea - the counting would be easy, but I don't have anywhere to store the numbers. With my free Netlify account and my static web site, I don't have a DB and and can't write to a file when someone visits, at least not that I know of.

[–] taladar@sh.itjust.works 4 points 6 months ago

If you don't have a DB or the ability to store data in general none of the open source analytics software will work either.

[–] bobs_monkey@lemm.ee 1 points 6 months ago

Ah I'm not talking about modern tracking pixels, but that actual html (js?) code from yesteryear

[–] perishthethought@lemm.ee 1 points 6 months ago

Sure but I can't have a HTML or JS file write to any file on my web server directly, so I can't store a number anywhere in Netlify to increment a counter.

[–] mbirth@lemmy.mbirth.uk 4 points 6 months ago (1 children)

My geeky web hoster provides AWStats and GoAccess. Both work by analysing Apache logfiles, so no JavaScript needs to be injected to the pages. Should be more than sufficient to get easy page tracking. (And also catches those visitors that have JavaScript disabled or tracking stuff blocked.)

[–] perishthethought@lemm.ee 2 points 6 months ago (1 children)

My web provider doesn't offer anything like that or what they do offer, they charge quite a lot for.

[–] mbirth@lemmy.mbirth.uk 1 points 6 months ago

Does your provider not give you access to the webserver log files?

[–] jtp@lemmy.ml 4 points 6 months ago

I used Matomo for a while for a few of my non-monetized sites, and like you, I found it to be just a little too much for small projects. I switched over to Shynet a few years ago - basic, easy to understand, and self-hostable. I noticed it's a lot more accurate than Matomo was, probably because it's on fewer adblock lists. I wouldn't be bothered to see my browser making requests to an instance either since it's pretty respectful of privacy and doesn't collect much.

[–] TacoEvent@lemmy.zip 3 points 6 months ago (1 children)

I spun up Plausible for my company site. Pretty straight forward honestly. It’s completely dockerized so there’s not a lot going on.

Your biggest problem is exposing the service on your home server to the internet. I personally wouldn’t recommend it, but if you know what you’re doing it’s possible.

[–] perishthethought@lemm.ee 1 points 6 months ago (1 children)

Yes, thanks. That's why I added my #2 above. I don't know what I'm doing, haha.

[–] TacoEvent@lemmy.zip 1 points 6 months ago

Gotcha. All I can add is a vote for Plausible. It’s great!

[–] anguo@lemmy.ca 2 points 6 months ago* (last edited 6 months ago) (1 children)

I'm running Umami on Railway (so not self-hosted), for two small websites. Works pretty well. I think Railway changed their pricing, but I've been grandfathered in with a free plan.

Edit: all of my websites are also on Netlify.

[–] perishthethought@lemm.ee 1 points 6 months ago* (last edited 6 months ago) (1 children)

Thank you for this. I will definitely check out Railway.

ETA: I checked out Railway and their $5 a month plan is still more than I can spend rn. But I will keep them in mind for future uses.

[–] anguo@lemmy.ca 2 points 6 months ago

If you do go this route, the best way is to make a fork of the main Umami github repository, then link that to railway. When you want to update, you can just sync new changes to the repo, and railway will rebuild your instance.

[–] joneskind@lemmy.world 2 points 6 months ago

Hello,

If you only want to track the number of page views you can do something simpler.

On your website, add an empty image with a known name in the footer that point to your home server (no proxy needed if your website allows loading images from external site)

You should see the attempt to download the empty image in your home server logs. There are tools to parse your server logs for specific keys (I have Logstash in mind)

If you want to track anything else, just add another empty image linked to the website event you want to track.

[–] andrew@radiation.party 1 points 6 months ago (1 children)

Umami has been pretty good to me. Plausible was a close choice but I ran into technical difficulties getting it going.

I didn’t get around to trying it, but goatcounter looked promising as well.

[–] perishthethought@lemm.ee 1 points 6 months ago

I'm checking out goatcounter now and so far, it looks great. Thanks for this suggestion!

[–] knobbysideup@sh.itjust.works 1 points 6 months ago (1 children)

You can ship to Graylog with netcat or filebeat. Then you can do all of your graphing, searching, and analysis there.

[–] perishthethought@lemm.ee 0 points 6 months ago

Hey thanks, but I don't have anything to ship to graylog. I was thinking I would get a solution which records those logs for me.

[–] tagginator@utter.online -2 points 6 months ago

New Lemmy Post: Recommendations please: Self-hosted web site analytics (https://lemmyverse.link/lemmy.world/post/14554432)
Tagging: #SelfHosted

(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)

I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md