Skip to main content

How to Self-Host Wakapi: Coding Time Tracker WakaTime Alternative 2026

·OSSAlt Team
wakapiwakatimecoding-statsdeveloper-toolsself-hostingdocker2026

TL;DR

Wakapi (MIT, ~2K GitHub stars, Go) is a self-hosted WakaTime-compatible coding statistics server. Install the WakaTime plugin in your editor → point it at your Wakapi instance → get detailed breakdowns of time spent per project, language, editor, and OS. WakaTime charges $9/month for the full dashboard. Self-hosted Wakapi is free, stores your data locally, and provides the same statistics without sending your coding habits to a third-party.

Key Takeaways

  • Wakapi: MIT, ~2K stars, Go — WakaTime-compatible server, self-hosted
  • WakaTime plugin compatible: Use the existing WakaTime IDE plugins, just point them at your server
  • Language stats: See exactly how much time you spend in Python vs TypeScript vs Go
  • Project stats: Time per project, per day/week/month
  • Editor stats: VS Code vs Vim vs JetBrains
  • Leaderboards: Compare coding time with teammates on your Wakapi instance

Wakapi vs WakaTime

FeatureWakapi (self-hosted)WakaTime FreeWakaTime Pro
CostFree (hosting)Free (2-week history)$9/month
History retentionUnlimited2 weeksUnlimited
Project statsYesYesYes
Language breakdownYesYesYes
Team/leaderboardsYesNoYes
GoalsNoNoYes
APIYesLimitedYes
Data ownershipFullWakaTimeWakaTime
GitHub Stars~2K

Part 1: Docker Setup

# docker-compose.yml
services:
  wakapi:
    image: ghcr.io/muety/wakapi:latest
    container_name: wakapi
    restart: unless-stopped
    ports:
      - "3000:3000"
    volumes:
      - wakapi_data:/data
      - ./wakapi.yml:/etc/wakapi/config.yml:ro
    environment:
      WAKAPI_DB_TYPE: sqlite3
      WAKAPI_DB_NAME: /data/wakapi.db
      WAKAPI_ALLOW_SIGNUP: "true"    # Disable after setup
      WAKAPI_PUBLIC_URL: "https://code.yourdomain.com"

volumes:
  wakapi_data:

Or use PostgreSQL for production:

environment:
  WAKAPI_DB_TYPE: postgres
  WAKAPI_DB_HOST: db
  WAKAPI_DB_PORT: "5432"
  WAKAPI_DB_NAME: wakapi
  WAKAPI_DB_USER: wakapi
  WAKAPI_DB_PASSWORD: "${POSTGRES_PASSWORD}"

Part 2: Configuration

# wakapi.yml
server:
  port: 3000
  public_url: "https://code.yourdomain.com"
  time_zone: "America/Los_Angeles"

db:
  type: sqlite3
  name: /data/wakapi.db

security:
  password_salt: "your-random-salt"    # openssl rand -hex 16

app:
  leaderboard_enabled: true
  leaderboard_scope: "7d"    # 7-day leaderboard
  aggregate_by_project: true
  max_inactive_months: 12    # Remove inactive users after 12 months
  
  # Custom language colors:
  # languages:
  #   TypeScript: "#3178c6"
docker compose up -d

Part 3: HTTPS with Caddy

code.yourdomain.com {
    reverse_proxy localhost:3000
}

Visit https://code.yourdomain.com → register your account.


Part 4: Connect Your IDE

Wakapi is WakaTime-compatible — use the existing WakaTime plugin in any editor.

VS Code

  1. Install WakaTime extension
  2. Open Command Palette (Cmd/Ctrl + Shift + P) → WakaTime: Settings
  3. Update ~/.wakatime.cfg:
[settings]
api_url = https://code.yourdomain.com/api
api_key = YOUR_WAKAPI_API_KEY

Get your API key from: Wakapi → Settings → API Key

JetBrains (IntelliJ / PyCharm / WebStorm / GoLand)

  1. Settings → Plugins → Search "WakaTime" → Install
  2. WakaTime Settings → API Key: your Wakapi key
  3. API URL: https://code.yourdomain.com/api

Vim/Neovim

" .vimrc
Plugin 'wakatime/vim-wakatime'

In ~/.wakatime.cfg:

[settings]
api_url = https://code.yourdomain.com/api
api_key = YOUR_API_KEY

Emacs

;; .emacs or init.el
(use-package wakatime-mode
  :config
  (setq wakatime-api-url "https://code.yourdomain.com/api")
  (global-wakatime-mode))

Part 5: Dashboard Overview

After a day of coding, the Wakapi dashboard shows:

Today: 6h 23m

Projects:
  my-startup-app      3h 45m  ██████████████████
  personal-scripts    1h 12m  █████
  dotfiles             46m    ██

Languages:
  TypeScript          2h 30m  ████████████
  Python              1h 45m  ████████
  Go                  1h 15m  ██████
  Markdown             53m    ████

Editors:
  VS Code             4h 20m  ████████████████████
  Neovim              2h  3m  ██████████

Systems:
  macOS               6h 23m  ████████████████████████████

Part 6: API

# Get summary for today:
curl "https://code.yourdomain.com/api/summary?from=today&to=today" \
  -H "Authorization: Basic $(echo -n 'username:YOUR_API_KEY' | base64)"

# Get all-time stats:
curl "https://code.yourdomain.com/api/users/current/stats/all_time" \
  -H "Authorization: Basic $(echo -n 'username:YOUR_API_KEY' | base64)"

# Heartbeats (raw data):
curl "https://code.yourdomain.com/api/v1/users/current/heartbeats" \
  -H "Authorization: Basic $(echo -n 'username:YOUR_API_KEY' | base64)"

Part 7: Leaderboards

Compare coding time with friends or teammates:

  1. All users on your Wakapi instance appear in the leaderboard
  2. View → Leaderboard → see who coded most this week
  3. Shows total time, top language, top project

Part 8: Badges (GitHub README)

Add your coding stats badge to GitHub:

![Wakapi Badge](https://code.yourdomain.com/api/badge/YOUR_USERNAME/interval:any/project:any)
Formats:
/badge/{username}/interval:today
/badge/{username}/interval:week  
/badge/{username}/interval:month
/badge/{username}/interval:year
/badge/{username}/interval:any      # All-time
/badge/{username}/project:my-app    # Specific project
/badge/{username}/language:Python   # Specific language

Maintenance

# Update Wakapi:
docker compose pull
docker compose up -d

# Backup:
tar -czf wakapi-backup-$(date +%Y%m%d).tar.gz \
  $(docker volume inspect wakapi_wakapi_data --format '{{.Mountpoint}}')

# Export your data:
# Settings → Export → Download JSON

# Logs:
docker compose logs -f wakapi

See all open source developer tools at OSSAlt.com/categories/developer-tools.

Comments