Skip to content

ihucos/counter.dev-selfhost

Repository files navigation

This is the official way to self host counter.dev.

Please note:

  • The self-hosted version is maturing and can be currenlty considered beta
  • Due to complexity constraints in this iteration the archiving functionality is not implemented.
  • Please create an issue if there is anything

Quickstart

1. Install

$ curl https://github.com/ihucos/counter.dev-selfhosted/releases/download/0.2/cntr-linux-amd64 > /usr/local/bin/cntr
$ chmod +x /usr/local/bin/cntr

2. Create user

$ cntr createuser --redis-url redis://localhost:6379 --utc-offset 2 admin
Password for new user:

("Utc offset" is your timezones utc offset.)

3. Serve

$ cntr serve --redis-url redis://localhost:6379 --bind :80

4. Go to UI

Visit the fired up server, login and follow the integrations steps for your website there.

Screenshots

Screenshot 2023-03-26 at 21 21 36

Screenshot 2023-03-26 at 21 24 30

Technical Description

Redis is the primary database. With Golang all static assets are nicely inside a single binary which you just need to run at your server. Everything basically works exactly as in the hosted version of this project, consult it's README.

I forgot my password.

Keep calm and don't email me. Run this at your server:

$ cntr chgpwd --redis-url redis://localhost:6379 youruser