Overview
Discover what makes ActivityWatch powerful
ActivityWatch is a privacy‑first, self‑hosted time‑tracking platform that captures user activity across multiple devices. From a developer standpoint, it is an event‑driven microservice architecture written primarily in **Python** and **Rust**, with a modular plugin system that allows for custom data collection and processing. The core of the application is a lightweight **SQLite** or **PostgreSQL** database that stores activity events in a time‑series format, while the UI is a **React/Redux** single‑page application served by an embedded **Actix‑web** backend. The project is distributed as cross‑platform binaries (Windows, macOS, Linux) and also offers Docker images for easy containerized deployment.
Event Stream API
Extensible Plugins
Query Engine
Privacy Controls
Overview
ActivityWatch is a privacy‑first, self‑hosted time‑tracking platform that captures user activity across multiple devices. From a developer standpoint, it is an event‑driven microservice architecture written primarily in Python and Rust, with a modular plugin system that allows for custom data collection and processing. The core of the application is a lightweight SQLite or PostgreSQL database that stores activity events in a time‑series format, while the UI is a React/Redux single‑page application served by an embedded Actix‑web backend. The project is distributed as cross‑platform binaries (Windows, macOS, Linux) and also offers Docker images for easy containerized deployment.
Key Features
- Event Stream API – Exposes a WebSocket and RESTful interface for real‑time ingestion of activity events (
aw-activity,aw-window,aw-appstreams). - Extensible Plugins – Written in Python or Rust, plugins can tap into the event pipeline to augment data (e.g., add geolocation, parse log files) or push metrics to external services.
- Query Engine – Uses a custom SQL dialect with built‑in window functions to aggregate time per app, window title, or project tag.
- Privacy Controls – All data remains on the host; optional encryption of the database with a user‑supplied key is supported.
Technical Stack
| Layer | Technology | Purpose |
|---|---|---|
| Data Ingestion | Python (aw‑core), Rust (high‑performance collectors) | Capture OS events via platform APIs (WinAPI, X11, macOS CGEvent). |
| Storage | SQLite / PostgreSQL | Time‑series event tables with indices on timestamps and tags. |
| API | Actix‑web (Rust) + FastAPI (Python) | WebSocket/REST endpoints for clients and plugins. |
| Frontend | React + Redux + TypeScript | Interactive dashboard, charts (Chart.js), and real‑time updates. |
| Containerization | Docker, docker‑compose | Official images for each core component (watcher, server, ui). |
| CI/CD | GitHub Actions + AppVeyor | Automated builds for all platforms, test coverage checks. |
Core Capabilities
- Real‑time event streaming: Clients subscribe to
aw-*streams over WebSocket; events are JSON objects with timestamps, metadata, and optional tags. - RESTful data retrieval: Endpoints like
/api/v1/activities?start=...&end=...return aggregated results in JSON. - Plugin API: Plugins expose
register()functions that receive the event bus; they can emit new events or modify existing ones. - Webhooks: External services can subscribe to specific event types via configurable webhook endpoints, enabling integrations with Slack, Grafana, or custom dashboards.
- Tagging & Filtering: Users can tag events (e.g.,
project:alpha) and query by tags, making it suitable for project‑based time accounting.
Deployment & Infrastructure
- Self‑hosting: Requires a machine with Python 3.9+, Rust (for building plugins), and an OS‑level service manager (systemd, launchd).
- Scalability: The architecture is horizontally scalable; multiple watcher agents can feed into a single server, and the database can be sharded or replicated if needed.
- Containerization: Official Docker images expose environment variables for configuration (e.g.,
AW_DB_URL,AW_UI_PORT). Docker‑compose setups allow zero‑config deployments. - Resource Footprint: The watcher agent consumes <50 MB RAM; the server stays under 200 MB on typical workloads.
Integration & Extensibility
- Plugin Ecosystem: Thousands of community plugins exist for log parsing, calendar integration, or custom UI widgets.
- SDKs: A lightweight Rust crate (
aw-client) and a Python package (activitywatch-client) provide typed interfaces to the API. - Webhooks & Callbacks: Supports outgoing HTTP POSTs with customizable payload templates, enabling telemetry pipelines.
- Customization: The UI can be forked; React components are modular, and styling is themeable via CSS variables.
Developer Experience
- Documentation: Comprehensive docs on ReadTheDocs cover API reference, plugin development guide, and deployment tutorials.
- Community: Active Discord channel, forum discussions, and GitHub issue tracker provide rapid feedback loops.
- Testing: PyTest for Python modules and Rust unit tests; integration tests run in CI.
- Licensing: MIT license ensures freedom to embed or modify without copyleft constraints.
Use Cases
- Enterprise Time Accounting: Deploy on a private server to collect employee activity, export reports to payroll systems.
- Personal Productivity: Run a local watcher on laptops/desktops; visualize time spent per project.
- Research Studies: Capture fine‑grained user interaction data for HCI experiments, leveraging the plugin system to enrich events.
- DevOps Monitoring: Hook into logs and metrics, sending activity summaries to Prometheus or Grafana dashboards.
Advantages Over Alternatives
- Full Data Control: Unlike SaaS solutions (RescueTime, WakaTime), all raw data remains on the host.
- Low Latency: Real‑time WebSocket streams enable
Open SourceReady to get started?
Join the community and start self-hosting ActivityWatch today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Reaparr
Cross‑platform Plex media downloader that syncs libraries
auto-mcs
Instant Minecraft server management for friends

Baserow
Collaborative data platform for secure, no-code apps
WildDuck Mail Server
Scalable, Unicode‑first IMAP/POP3 mail server
Kuvasz
Open‑source uptime & SSL monitoring with status pages
Redmine
Flexible project management for teams of any size
