Wakapi
Minimalist, self-hosted WakaTime-compatible backend for coding statistics
Alternative to: wakatime
Wakapi is a self-hosted, WakaTime-compatible backend that tracks how much time you spend coding. It provides statistics for projects, languages, editors, hosts and operating systems, with badges, weekly e-mail reports, a REST API and Prometheus exports.
Wakapi Docker Compose example
Self-host Wakapi on your own server, homelab, or VPS starting from this Docker Compose example.
It runs Wakapi in Docker containers using the official ghcr.io/muety/wakapi:latest, postgres:17 images, with persistent volumes and automatic restarts preconfigured.
Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.
services:
wakapi:
image: ghcr.io/muety/wakapi:latest
init: true
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
# Public URL of this Wakapi instance, used for links in e-mails (e.g. password reset).
WAKAPI_PUBLIC_URL: "http://localhost:3000"
# Secret salt used to hash user passwords. Set a long random string and never change it afterwards.
WAKAPI_PASSWORD_SALT: "changeme"
# Allow cookies over plain HTTP. Set to "false" when Wakapi is served via HTTPS.
WAKAPI_INSECURE_COOKIES: "true"
# Whether new users can sign up.
WAKAPI_ALLOW_SIGNUP: "true"
# Whether to enable public leaderboards.
WAKAPI_LEADERBOARD_ENABLED: "true"
# Database connection (the bundled Postgres service).
WAKAPI_DB_TYPE: "postgres"
WAKAPI_DB_HOST: "db"
WAKAPI_DB_PORT: "5432"
WAKAPI_DB_NAME: "wakapi"
WAKAPI_DB_USER: "wakapi"
WAKAPI_DB_PASSWORD: "wakapi"
# Enable sending e-mails (password resets, weekly reports).
WAKAPI_MAIL_ENABLED: "false"
# Sender address for outgoing e-mails, e.g. Wakapi <wakapi@example.org>.
WAKAPI_MAIL_SENDER: ""
# SMTP server hostname.
WAKAPI_MAIL_SMTP_HOST: ""
# SMTP server port.
WAKAPI_MAIL_SMTP_PORT: ""
# SMTP username.
WAKAPI_MAIL_SMTP_USER: ""
# SMTP password.
WAKAPI_MAIL_SMTP_PASS: ""
# Use implicit TLS for the SMTP connection.
WAKAPI_MAIL_SMTP_TLS: "false"
db:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: "wakapi"
POSTGRES_PASSWORD: "wakapi"
POSTGRES_DB: "wakapi"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "wakapi", "-d", "wakapi"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db_data:
Values set to changeme are required — replace them with your own
values before starting Wakapi.
Prefer a managed setup? WinterFlow installs, configures, and updates Wakapi for you using this same Docker Compose configuration.