Skip to content

Repository files navigation

Tinyauth analytics

A simple server to transparently collect version information from Tinyauth instances.

How it works

Every Tinyauth instance runs a goroutine (unless you choose to opt-out) that does a "heartbeat" every 12 hours indicating the instance is still "alive". The heartbeat contains the UUID generated by Tinyauth on startup and the version information. The server stores them in the SQLite database alongside with the last seen date. When you request all the instances, the server responds with an array containing the versions, UUIDs and last seen dates.

Running

The central information server is hosted at https://api.tinyauth.app and all instance information can be requested from the /v1/instances/all endpoint or be seen visually on the /dashboard page. If you like, you can run your own server for your own projects. This can be done by cloning the repository and running:

docker compose up -d

Configuration

The server is configured using environment variables, the following options are supported:

NameTypeDescriptionDefault
DATABASE_PATHstringPath to the SQLite database file./data/analytics.db
PORTnumberThe port to run the server on.8080
ADDRESSstringThe address to bind the server to.0.0.0.0
RATE_LIMIT_COUNTnumberMaximum number of requests per minute per IP.3
CORS_ALLOWED_ORIGINSstring/arrayComma-separated list of allowed CORS origins.*
TRUSTED_PROXIESstring/arrayComma-separated list of trusted proxy IPs.``
DASHBOARD_ENABLEDbooleanWhether to enable the dashboard.true
BADGE_ENABLEDbooleanWhether to enable the badge endpoint.true

Contributing

If you like you can contribute to this project by picking up an issue or creating a pull request. Contributing is appreciated a lot!

License

Tinyauth analytics is licensed under the MIT License. TL;DR — You can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software. Just make sure to include the original license in any substantial portions of the code. There’s no warranty — use at your own risk. See the LICENSE file for full details.

About

A simple server to transparently collect version information from Tinyauth instances.

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages