Self-hosted service
muety/wakapi avatar
muety/wakapi

Wakapi: a self-hosted WakaTime-compatible backend in Go

📊 A minimalist, self-hosted WakaTime-compatible backend for coding statistics

4,480 stars315 forksGoMIT

At a glance

What is it?
Wakapi re-implements the server half of WakaTime so heartbeats from wakatime-cli land on infrastructure you control. The fit is narrow and concrete: one Go binary, SQLite by default, and a documented gap where the compatibility stops.
Who is it for?
Adopt Wakapi if your editors already push heartbeats through wakatime-cli and you want the data on your own disk. Do not adopt it if you need the full WakaTime feature set, since compatibility is only partial.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • muety/wakapi4,480 ★ · +51
Star history
Repository2026-09-112026-11-15
muety/wakapi4.4k4.5k

51 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Wakapi keeps the wakatime-cli client and replaces only the server

Wakapi keeps the client half of WakaTime exactly as WakaTime ships it and re-implements the half you do not control. The editors you already use keep sending heartbeats through the open-source wakatime-cli, and the only change on your workstation is two lines in ~/.wakatime.cfg. That boundary is what makes the project worth reading: nothing in your editor setup has to change, so the migration cost sits entirely on the server side.

The audience is narrow and specific. Individual developers and small teams who want a year or two of editing history they can query directly, or operators who would rather not ship that history to a third party. Wakapi is not a project management tool and does not try to be. It stores heartbeats and renders summaries of projects, languages, editors, hosts and operating systems, and it exposes them over a REST API, through badges, in weekly e-mail reports, and as Prometheus exports.

One thing the project states plainly deserves to be repeated here. Compatibility with WakaTime is partial, and pull requests are not being accepted right now because of maintainer time. Both facts bear directly on the adoption decision, and the first is the reason the comparison with WakaTime has to be made section by section rather than at the slogan level.

One Go binary, three database engines, and a config file that reads like a table

Wakapi is a single Go program. go.mod declares module github.com/muety/wakapi and requires go 1.27, and the Dockerfile builds one static binary from main.go with CGO_ENABLED=0, then ships it on gcr.io/distroless/static:nonroot. That is the whole runtime. There is no application server to configure and no message broker in the request path.

Storage is a choice rather than a fixed decision. SQLite is the default and the distroless image sets WAKAPI_DB_TYPE=sqlite3 with WAKAPI_DB_NAME=/data/wakapi.db, so a single file holds everything. For anything beyond a single machine, compose.yml switches the same binary to postgres:17 with WAKAPI_DB_HOST set to db and port 5432, and the README points at the Dockerfile and config.default.yml for MySQL. The engine is selected with WAKAPI_DB_TYPE, so the same binary serves both.

Configuration arrives as a YAML file, defaulting to config.yml and pointed elsewhere with the -c argument, or as environment variables. The salt that hashes passwords deserves attention before anything else is deployed. The README's Docker instructions generate WAKAPI_PASSWORD_SALT from /dev/urandom in your shell before docker run, so it is something you supply, not something the server invents. Three variables can be held as Docker secrets instead of plaintext in a compose file: WAKAPI_PASSWORD_SALT, WAKAPI_DB_PASSWORD and WAKAPI_MAIL_SMTP_PASS.

Two lines in ~/.wakatime.cfg are the entire client change

Install a release, run a container, or build from source, and the client work is identical in every case. Point api_url at your own server and paste in the key you generated from the web interface after creating an account.

ini
[settings]

# Your Wakapi server URL or 'https://wakapi.dev/api' when using the cloud server
api_url = http://localhost:3000/api

# Your Wakapi API key (get it from the web interface after having created an account)
api_key = 406fe41f-6d69-4183-a4cc-121e0c524c2b

The port 3000 in that snippet is the port the container publishes, not an arbitrary default. To quick-run a release, the README gives one pipeline:

bash
$ curl -L https://wakapi.dev/get | bash

Reading a remote script into a shell is not a habit worth forming. That is the argument for the Docker path, which shows every flag it uses: a named volume wakapi-data mounted at /data, the generated salt passed in as WAKAPI_PASSWORD_SALT, and --restart unless-stopped so the collector survives a reboot. For Kubernetes there is a third-party chart, wakapi-helm-chart by ricristian, maintained outside this repository.

Relay mode keeps WakaTime in the loop, but the INI file only allows one wildcard

Wakapi can forward your heartbeats to WakaTime as well as storing them, which is useful when you want a local record and a shared team view at the same time. Two routes exist. The preferred one is client-side and lives in the same ~/.wakatime.cfg, using an [api_urls] section where each entry is a URL followed by a key:

ini
[settings]
api_key = waka-api-key

[api_urls]
.* = https://wakapi.dev/api|wakapi-api-key

The README explains the split plainly: the key in [settings] is used for WakaTime's own default API, while [api_urls] names additional destinations. So the key stays with WakaTime and the second key travels with the extra entry.

Here is the detail a skim misses, and it is a real failure mode. The same documentation warns against adding more than one .* entry, because duplicate keys are invalid in an INI file and wakatime-cli ignores them. A relay configuration that looks correct on screen can therefore send everything to one destination and silently drop the other. If you run both systems, confirm that heartbeats arrive on both sides before you delete anything.

The alternative route is server-side relay, configured under Settings then Integrations in the web interface, which forwards from Wakapi instead of from your machine. The README marks the client-side form as preferred.

Metrics leave over Prometheus, but the frontend build is a separate toolchain

Wakapi lists support for Prometheus exports among its features. There is a routes directory, middlewares, services, repositories and models, the standard shape of a Go web application that keeps query logic out of handlers. go.mod pulls in go-chi for routing, go-chi/httprate for rate limiting, robfig/cron for scheduled jobs, and getsentry/sentry-go for error reporting. Authentication is not a single scheme: coreos/go-oidc, go-webauthn and descope/virtualwebauthn are all in the dependency list, and golang-jwt handles tokens.

The awkward part is the frontend. package.json is not a runtime dependency at all, dependencies is empty, and the devDependencies are a Tailwind 3 toolchain: tailwindcss, chokidar-cli for the watch task, and @iconify/json plus @iconify/json-tools for the icon bundle. Running npm run build bundles the icons and minifies static/assets/css/app.css into app.dist.css; brotli compression is a separate step in npm run build:all:compress. Anything hacking on the views directory needs Node installed alongside a Go toolchain. Anyone planning to restyle the dashboard should know that before they start.

Two more files matter for an operator. etc/wakapi.service is the SystemD unit the README recommends when running the binary standalone, since a collector that dies when your SSH session ends collects nothing. And the repository carries a migrations/ directory.

Partial compatibility and a closed pull request window are the two real costs

The first cost is stated in the feature list and deserves to be read as a boundary rather than a caveat. Wakapi is partially compatible with WakaTime. Plan on your own tooling for anything the shared dashboard does not already expose, and check the specific endpoint you depend on before you commit.

The second cost is operational and more unusual to find. The repository carries a notice that pull requests are temporarily not accepted because of limited maintainer time, and asks contributors to hold off for now. The project is not archived, and the last push was on 2026-10-24, with releases 2.18.2 on 2026-10-14, 2.18.1 on 2026-10-03 and 2.18.0 on 2026-09-14. So the code is moving and you are not inheriting a tombstone. What you are inheriting is a dependency you cannot currently contribute a fix to. That is a procurement question, not a code question.

A third friction point is smaller and easier to hit by accident. compose.yml persists Postgres data in a named volume and reads its password from a secret file, so anyone running SQLite against a bind mount instead will need the user option in the Compose file set correctly or the container will not be able to write its database. The project flags this in the README for a reason.

Licensing is the least complicated part. Wakapi is MIT licensed, so self-hosting it internally carries no distribution obligation.

Where Wakapi and WakaTime actually differ

WakaTime is the service most editors already know, and its hosted product bundles the statistics with the account system, dashboards and sharing around it. Wakapi takes a narrower position: it implements the server side of the same protocol, keeps your history on hardware you control, and gets out of the way on the parts it does not do. The difference in approach is ownership of the data and a smaller surface, not a different way of counting time. Heartbeats arrive through the same client.

That makes the comparison a deployment decision. If you want someone else to run the account recovery, the billing and the uptime, WakaTime is the shorter path. If you want a Postgres-backed statistics table on your own machine and a REST API you can query from your own scripts, Wakapi does that job in one binary with no runtime dependencies beyond a database.

The catch sits where you would expect it. Wakapi calls itself WakaTime-compatible, and partial is the operative word. Anyone who wants a drop-in replacement for the full hosted feature set should expect gaps. Decide on that basis, and read the difference as a scope statement rather than a promise of parity.

Editorial conclusion

Adopt Wakapi if your editors already push heartbeats through wakatime-cli and you want the data on your own disk. Do not adopt it if you need the full WakaTime feature set, since compatibility is only partial. Verify first that your own editing habits survive the client setup in ~/.wakatime.cfg, then check the migration path before you have data worth keeping.

Frequently asked questions

What is Wakapi and who is it for?

Wakapi is a minimalist, self-hosted, WakaTime-compatible backend for coding statistics, written in Go and MIT licensed. It is aimed at developers and teams who want editing statistics collected by wakatime-cli to be stored on infrastructure they control.

How do I install Wakapi with Docker?

Create a volume named wakapi-data, generate a value for WAKAPI_PASSWORD_SALT, and run the ghcr.io/muety/wakapi:latest image with port 3000 published and the volume mounted at /data. SQLite is the default database unless you change WAKAPI_DB_TYPE, and compose.yml shows the same setup against postgres:17.

Is Wakapi a full replacement for WakaTime?

No. The project describes itself as partially compatible with WakaTime, and it stores statistics, badges, weekly e-mail reports, REST API data and Prometheus exports rather than the whole hosted product. You can also keep both systems running at once, using a client-side api_urls entry or the relay setting under Settings then Integrations.

Official sources

  1. License: MIT
  2. muety/wakapi on GitHub
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/muety-wakapi.svg)](https://hysenlabs.com/projects/muety-wakapi)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/muety-wakapi.svg)](https://hysenlabs.com/projects/muety-wakapi)

Was this useful?