TimeTracker-DB
OfficialDocker app from Drytrix's Repository
Overview
Readme
View on GitHubTimeTracker
Self-hosted time tracking, invoicing and Peppol e-invoicing for freelancers and teams β with no per-seat fees.
GitHub stars Docker Pulls Latest Release License: GPL-3.0
Live demo (login test / test123!) Β· Website Β· Docs Β· Changelog
Demo login: test / test123! (standard user role; no admin settings).
Quick start (60 seconds)
No git clone, no certificate warning β plain HTTP on port 8080 with bundled PostgreSQL:
curl -fsSLO https://raw.githubusercontent.com/drytrix/TimeTracker/main/docker-compose.nas.yml
echo "SECRET_KEY=$(openssl rand -hex 32)" > .env
docker compose -f docker-compose.nas.yml up -d
# open http://localhost:8080 β first login creates the admin
Latest release: v5.19.1 β see CHANGELOG.md.
First 5 minutes
- Open http://localhost:8080 and create the admin account.
- Add a client under Clients β Create Client.
- Create a project under that client (Projects β Create Project).
- Start a timer or log time against the project.
- Optional: generate a draft invoice under Invoices.
More install paths (HTTPS production, NAS UI paste, cloud): Install options.
Why TimeTracker?
- Peppol & EN 16931 e-invoicing β Send invoices yourself via the bundled Peppol Bridge; embed Factur-X / ZUGFeRD XML in PDFs. No paid SaaS middleman for e-invoicing.
- Self-hosted β Your timers, clients, and invoices stay on your server (Docker, NAS, VPS, or Raspberry Pi).
- GPL-3.0 open source β Free to use, modify, and run commercially; features are never locked behind a paywall.
- No per-user pricing β Unlimited users and projects; optional one-time supporter key only hides donate prompts.
| Feature | TimeTracker | Toggl Track | Clockify | Harvest |
|---|---|---|---|---|
| Self-hosted | β Full control | β Cloud only | β Cloud only | β Cloud only |
| Open source | β GPL-3.0 | β | β | β |
| Built-in invoicing | β PDF + Peppol / Factur-X | β οΈ Limited / paid add-ons | β οΈ Limited | β |
| Peppol / EN 16931 | β Bundled bridge | β | β | β |
| Per-seat pricing | β Unlimited users | β Paid seats | β οΈ Free tier limits | β Paid seats |
| Persistent server timers | β | β οΈ Client-side | β οΈ Client-side | β οΈ Client-side |
What is TimeTracker?
TimeTracker is a self-hosted, web-based time tracking application for freelancers, teams, and agencies who need professional time management with complete control over their data β an open-source alternative to Toggl Track, Clockify, and Harvest.
Perfect for:
- Freelancers tracking billable hours across multiple clients
- Small teams managing projects and productivity
- Agencies needing reporting and client billing
- EU businesses that must send Peppol / EN 16931 e-invoices
- Privacy-focused organizations that want self-hosted tooling
UI layout and navigation conventions: UI Guidelines.
Features
Timers, projects, clients, CRM pipeline, PDF + Peppol invoicing, expenses, reports, OIDC/SSO, REST API, and optional mobile/desktop apps β full catalog in the docs:
- Complete features list
- Time tracking Β· Projects & tasks Β· Invoicing
- Financial management Β· Reporting
- Peppol e-invoicing setup
Screenshots
Login & profile
Projects & tasks
Kanban
Time tracking
Invoicing & clients
Reports
Admin
Create flows
Install options
| Method | Best for | Get started |
|---|---|---|
| One-command (above) | Homelab, quick try | docker-compose.nas.yml + SECRET_KEY |
| Docker image | Servers, VPS | docker pull ghcr.io/drytrix/timetracker:latest or Docker Hub |
| NAS compose | QNAP, Synology, Portainer | Paste docker-compose.nas.yml β NAS guide |
| GitHub Release | Compose files + desktop/mobile | Releases |
| Cloud (Render) | Managed hosting | Deploy to Render |
| Cloud (DigitalOcean) | Managed hosting | Deploy to DigitalOcean |
| Railyard | Managed hosting | Deploy to Railyard |
| Cloud (RepoCloud) | Managed hosting | Deploy on RepoCloud |
Full list of install paths: Distribution Guide (Portainer templates, Unraid, Railway, Fly.io, Coolify, DigitalOcean, Docker Hub)
Docker Hub namespace: images are published at
drytrix/timetracker(formerlydriesp/timetracker).
For a full step-by-step guide, see INSTALLATION.md.
Prerequisites
- Docker (20.10+) and Docker Compose (2.0+)
- 2GB+ RAM available for Docker containers
- Port 8080 (HTTP) or 80/443 (HTTPS production)
New to Docker? See Docker Installation Guide for your platform.
Option 1: NAS / one-file compose (recommended for first try)
Same stack as Quick start. Paste docker-compose.nas.yml into Container Station, Synology Container Manager, or Portainer; set SECRET_KEY; open http://<host>:8080.
Works on QNAP, Synology, Unraid/Portainer, and other Docker-capable NAS devices (amd64 and arm64).
Full guide: NAS Deployment Guide
Option 2: Production with HTTPS
Clone the repo and use the root compose file (nginx + self-signed cert):
git clone https://github.com/drytrix/TimeTracker.git
cd TimeTracker
cp env.example .env
# Set a strong SECRET_KEY, TZ, and CURRENCY in .env
docker compose up -d
# Access at https://localhost β accept the self-signed certificate warning
First login creates the admin account. For setup problems, see INSTALLATION.md.
Default install (no bundled AI): the main docker-compose.yml starts the app and PostgreSQL only. Optional Ollama: see AI Helper.
Complete setup guide: docs/admin/configuration/DOCKER_COMPOSE_SETUP.md Β· Uninstall: UNINSTALL.md
Troubleshooting: Docker Startup Β· CSRF Β· Database
Option 3: Docker with plain HTTP (development)
git clone https://github.com/drytrix/TimeTracker.git
cd TimeTracker
docker compose -f docker-compose.example.yml up -d
# Access at http://localhost:8080
Option 4: Quick test with SQLite
git clone https://github.com/drytrix/TimeTracker.git
cd TimeTracker
docker compose -f docker/docker-compose.local-test.yml up --build
# Access at http://localhost:8080
No PostgreSQL or .env required. SQLite is not recommended for production.
Need help? Getting Started Guide
π» System Requirements
Minimum Requirements
For Small Teams (1-5 users):
- CPU: 1 core (2.0 GHz+)
- RAM: 2 GB
- Storage: 10 GB free space
- OS: Linux, macOS, or Windows (with Docker)
- Docker: 20.10+ and Docker Compose 2.0+
For Production (5+ users):
- CPU: 2+ cores (2.4 GHz+)
- RAM: 4 GB
- Storage: 20 GB free space (SSD recommended)
- OS: Linux (Ubuntu 20.04+, Debian 11+, or similar)
- Docker: 20.10+ and Docker Compose 2.0+
- PostgreSQL: 13+ (included in Docker Compose)
Recommended Requirements
For Optimal Performance:
- CPU: 4+ cores (3.0 GHz+)
- RAM: 8 GB
- Storage: 50+ GB SSD
- Network: Stable internet connection (for updates and optional telemetry)
- Backup: Automated backup solution for database
Platform Support
- β Linux (Ubuntu, Debian, CentOS, RHEL, etc.)
- β macOS (Intel and Apple Silicon)
- β Windows (Windows 10/11 with WSL2 or Docker Desktop)
- β Raspberry Pi (Raspberry Pi 4 with 2GB+ RAM)
- β Cloud Platforms (AWS, Azure, GCP, DigitalOcean, etc.)
Database Options
PostgreSQL (Recommended for production)
- Version 13+ required
- Included in Docker Compose setup
- Supports all features including full-text search
SQLite (Development/Testing only)
- No setup required
- Suitable for single-user or testing
- Limited concurrent write performance
Browser Support
TimeTracker works with all modern browsers:
- β Chrome/Edge 90+
- β Firefox 88+
- β Safari 14+
- β Opera 76+
π For detailed requirements, see Requirements Documentation
π‘ Use Cases
For Freelancers
Track time across multiple client projects, generate professional invoices, and understand where your time goes. TimeTracker helps you bill accurately and identify your most profitable clients.
For Teams
Assign tasks, track team productivity, and generate reports for stakeholders. See who's working on what, identify bottlenecks, and optimize team performance.
For Agencies
Manage multiple clients and projects simultaneously. Track billable hours, generate client invoices, and analyze project profitability β all in one place.
For Personal Projects
Even if you're not billing anyone, understanding where your time goes is valuable. Track personal projects, hobbies, and learning activities to optimize your time.
π Documentation
Comprehensive documentation is available in the docs/ directory. See the Documentation Index for a complete overview.
π Documentation by Use Case
For New Users:
- Getting Started Guide β Complete beginner's tutorial (β Start here!)
- Installation Guide β Step-by-step installation (Docker, SQLite test)
- Docker Public Setup β Production deployment
- Quick Start Guide β Get up and running quickly
For Administrators:
- Docker Compose Setup β Production deployment guide
- Configuration Guide β All configuration options
- Uninstall / remove data β Tear down Docker, volumes, and optional AI (Ollama); AI helper only
- OIDC/SSO Setup β Enterprise authentication
- Email Configuration β Email setup
- Release Process β Prepare/Finalize releases and version bumps
For Developers:
- Contributing β How to contribute (quick link)
- Contributing Guidelines (full) β Setup, standards, PR process
- Development Guide β Run locally, test, release process
- Architecture β System overview and design
- Project Structure β Codebase layout
- API Documentation β API quick reference Β· Full REST API
- Database Migrations β Schema management
- CI/CD Documentation β Build and deployment
For Troubleshooting:
- Docker Startup Issues β Common startup problems
- CSRF Token Issues β Fix CSRF errors
- Database Connection β Database issues
- Solution Guide β General problem solving
π― Feature Documentation
Core Features:
- π Complete Features Overview β All 130+ features (β Complete reference!)
- Time Tracking β Timer and entry features
- Task Management β Task tracking system
- Client Management β Client relationships
- Invoice System β Invoice generation
- Overdue reminders & recurring invoices β Daily overdue check and recurring billing
Advanced Features:
- Calendar & Bulk Entry β Calendar view and bulk operations
- Bulk Time Entry β Create multiple entries
- Time Entry Templates β Reusable templates
- Expense Tracking β Business expenses
- Payment Tracking β Invoice payments
- Budget Alerts & Forecasting β Budget monitoring
- Weekly Time Goals β Weekly targets
Productivity:
- Command Palette β Keyboard shortcuts
- Role-Based Permissions β Access control
- Multiple instances (independent companies) β One deployment per company
Integrations & Apps:
- Mobile & Desktop Apps β Flutter mobile and Electron desktop apps
- Build Guide (Mobile & Desktop) β Build scripts for Android, iOS, Windows, macOS, Linux
- Peppol & ZugFerd e-Invoicing β Peppol sending and ZugFerd/Factur-X PDF embedding (EN 16931)
- API Documentation β REST API reference
- API Token Scopes β Token permissions
π§ Technical Documentation
- Project Structure β Codebase architecture
- Database Migrations β Schema management
- Release Process β Version bumps and publishing Β· Version details
- CSRF Configuration β Security setup
- CI/CD Setup β Continuous integration
π Security & Configuration
- HTTPS Setup (Auto) β Automatic HTTPS
- HTTPS Setup (mkcert) β Manual HTTPS
- CSRF Troubleshooting β CSRF issues
- CSRF IP Access Fix β IP access issues
- OIDC/SSO Setup β Enterprise auth
π€ Contributing
- Contributing Guidelines β How to contribute
- Code of Conduct β Community standards
- Development Setup β Local development
π Reference
- π Changelog β Complete release history (β See what's new!)
- Requirements β System requirements
- Documentation Index β Complete documentation overview
π³ Deployment
Local Development
# Start with HTTPS (recommended)
docker-compose up -d
# Or use plain HTTP for development
docker-compose -f docker-compose.example.yml up -d
Production Deployment
Option 1: Build from Source
# Clone the repository
git clone https://github.com/drytrix/TimeTracker.git
cd TimeTracker
# Configure your .env file
cp env.example .env
# Edit .env with production settings:
# - Set a strong SECRET_KEY: python -c "import secrets; print(secrets.token_hex(32))"
# - Configure TZ (timezone) and CURRENCY
# - Set PostgreSQL credentials (POSTGRES_PASSWORD, etc.)
# Start the application
docker-compose up -d
Option 2: Use Pre-built Images
# Use the remote compose file with published images
docker-compose -f docker/docker-compose.remote.yml up -d
β οΈ Security Note: Always set a unique
SECRET_KEYin production! See CSRF Configuration for details.
AI Helper (Ollama or hosted)
TimeTracker includes an optional server-side AI helper for the web app and API clients. New installs default to AI off (AI_ENABLED=false in env.example and in the root docker-compose.yml app service) so time tracking works without downloading a large language model.
- Enable (any setup): set
AI_ENABLED=true(environment or Admin β System Settings β AI Helper). - Ollama: set
AI_PROVIDER=ollama,AI_MODEL=..., andAI_BASE_URLtohttp://ollama:11434when Ollama runs in Docker on the same Compose network, orhttp://127.0.0.1:11434when Ollama runs on the host. - OrcaRouter (hosted multi-model gateway): set
AI_PROVIDER=orcarouter,AI_BASE_URL=https://api.orcarouter.ai, andAI_API_KEY=.... Sign up for an API key. - Hosted OpenAI-compatible: set
AI_PROVIDER=openai_compatibleandAI_API_KEY=...
The AI helper is exposed as:
- Session web UI JSON:
POST /api/ai/chat(same-origin, login required) - REST API v1:
POST /api/v1/ai/chat(API token required, scopesread:ai/write:ai)
Time entry suggestions (when AI_ENABLED=true):
GET /api/ai/suggestβ deterministic suggestions from recent patterns and active tasks; optional?q=filters by notes/project name;?rich=truemerges LLM suggestions when configured. AI failures return deterministic results only.- Start Timer modal: horizontal suggestion chips above the project field (refresh for LLM-enhanced suggestions).
- Log Time form: ββ¦ Autofillβ popover and ghost-text autocomplete on the notes field (
app/static/js/ai_autocomplete.js).
All suggestion UI is hidden when AI is disabled (ai_enabled in template context).
Bundled Ollama service (Docker Compose, opt-in)
The root docker-compose.yml defines a CPU-only ollama service and a one-shot ollama-init sidecar that pulls AI_MODEL (default llama3.1, ~4.7 GB) into the ollama_data volume. These services use the Compose ai profile so they do not start by default.
Enable bundled Ollama:
In
.env, setAI_ENABLED=true,AI_PROVIDER=ollama,AI_BASE_URL=http://ollama:11434, and your desiredAI_MODEL.Start the stack with the profile:
docker compose --profile ai up -d
- The app reaches Ollama at
http://ollama:11434over the Docker network β no host ports need to be opened. - Change the model by setting
AI_MODELin.env(e.g.AI_MODEL=qwen2.5:3bfor lighter hardware) and re-runningdocker compose --profile ai up -d; the init sidecar will pull the new model when needed. - Pulled models are cached in the
ollama_datanamed volume, so subsequent boots are faster. - Verify in the UI: Admin β System Settings β AI helper, then click Test connection.
- To pull additional models manually:
docker compose exec ollama ollama pull <model>(with theaiprofile active). - Hosted provider only (no Ollama containers): set
AI_PROVIDER=orcarouter(oropenai_compatible),AI_BASE_URL, andAI_API_KEYin.env; keepdocker compose up -dwithout theaiprofile. For OrcaRouter, sign up here.
Disable or remove AI (turn off LLM calls, stop Ollama, revoke tokens, delete ollama_data safely): UNINSTALL.md.
Encrypting stored secrets (recommended)
To store sensitive settings (OAuth secrets, mail password, AI API key, Peppol token, 2FA secret) encrypted at rest, set:
SETTINGS_ENCRYPTION_KEY(Fernet key), orSETTINGS_ENCRYPTION_KEY_FILE(file path with the key on the first line)
Raspberry Pi Deployment
TimeTracker runs perfectly on Raspberry Pi 4 (2GB+ RAM):
# Same Docker commands work on ARM architecture
docker-compose up -d
HTTPS Configuration
Automatic HTTPS (Easiest)
# Uses self-signed certificates (generated automatically)
docker-compose up -d
# Access at https://localhost (accept browser warning)
Manual HTTPS with mkcert (No Browser Warnings)
# Use mkcert for locally-trusted certificates
docker-compose -f docker/docker-compose.https-mkcert.yml up -d
π See HTTPS Setup Guide for detailed instructions. HTTPS helper scripts live in scripts/ (e.g. from project root: bash scripts/setup-https-mkcert.sh, bash scripts/start-https.sh).
Monitoring & Analytics
# Alternate compose files (local-test, remote, analytics, https) are in docker/; use -f docker/docker-compose.xxx.yml
# Deploy with full monitoring stack (Prometheus, Grafana, Loki)
docker-compose -f docker-compose.yml -f docker/docker-compose.analytics.yml --profile monitoring up -d
# Grafana: http://localhost:3000
# Prometheus: http://localhost:9090
π See Deployment Guide for detailed instructions
π See Docker Compose Setup for configuration options
π§ Configuration
TimeTracker is highly configurable through environment variables. For a comprehensive list and recommended values, see:
Common settings:
# Timezone and locale
TZ=America/New_York
CURRENCY=USD
# Timer behavior
SINGLE_ACTIVE_TIMER=true
IDLE_TIMEOUT_MINUTES=30
ROUNDING_MINUTES=1
# User management
# Note: Only the first username in ADMIN_USERNAMES is auto-created during initialization.
# Additional usernames must self-register (if ALLOW_SELF_REGISTER=true) or be created manually.
ADMIN_USERNAMES=admin,manager
ALLOW_SELF_REGISTER=false
# Security (production)
SECRET_KEY=your-secure-random-key
SESSION_COOKIE_SECURE=true
π Analytics & Telemetry
TimeTracker includes optional analytics and monitoring features to help improve the application and understand how it's being used. All analytics features are:
- β Disabled by default β You must explicitly opt-in
- β Privacy-first β No personally identifiable information (PII) is collected
- β Self-hostable β Run your own analytics infrastructure
- β Transparent β All data collection is documented
What We Collect (When Enabled)
1. Structured Logs (Always On, Local Only)
- Request logs and error messages stored locally in
logs/app.jsonl - Used for troubleshooting and debugging
- Never leaves your server
2. Prometheus Metrics (Always On, Self-Hosted)
- Request counts, latency, and performance metrics
- Exposed at
/metricsendpoint for your Prometheus server - Stays on your infrastructure
3. Error Monitoring (Optional - Sentry)
- Captures uncaught exceptions and performance issues
- Helps identify and fix bugs quickly
- Opt-in: Set
SENTRY_DSNenvironment variable
4. Product Analytics (Optional - Grafana OTLP)
- Tracks feature usage and user behavior patterns with advanced features:
- Person Properties: Role, auth method, login history
- Group Analytics: Segment by version, platform, deployment
- Rich Context: Browser, device, environment on every event
- Sink config: Set
GRAFANA_OTLP_ENDPOINTandGRAFANA_OTLP_TOKEN
Rollouts and kill switches in this application are not driven by remote PostHog feature flags. Use environment variables and app/config.py (for example DEMO_MODE, ALLOW_SELF_REGISTER, ENABLE_TELEMETRY, SINGLE_ACTIVE_TIMER). Per-user UI visibility preferences are stored on the user record in the database, not in PostHog. With DEMO_MODE, the auto-created login is a standard user (no admin or settings access); see docs/deploy/RENDER.md for demo setup and upgrading old demo databases.
5. Installation Telemetry (Optional, Anonymous)
- Sends anonymous installation data via Grafana OTLP with:
- Anonymized fingerprint (SHA-256 hash, cannot be reversed)
- Application version
- Platform information
- No PII: No IP addresses, usernames, or business data
- Opt-in: Set
ENABLE_TELEMETRY=truefor detailed analytics; base telemetry remains anonymous
How to Enable Analytics
# Enable Sentry error monitoring (optional)
SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id
SENTRY_TRACES_RATE=0.1 # 10% sampling for performance traces
# Configure Grafana Cloud OTLP sink (optional)
GRAFANA_OTLP_ENDPOINT=https://otlp-gateway-prod-eu-west-2.grafana.net/otlp/v1/logs
GRAFANA_OTLP_TOKEN=your-grafana-otlp-token
# Enable detailed analytics (optional)
ENABLE_TELEMETRY=true
TELE_SALT=your-unique-salt
APP_VERSION=1.0.0
Self-Hosting Analytics
You can self-host all analytics services for complete control:
# Use docker-compose with monitoring profile
docker-compose --profile monitoring up -d
This starts:
- Prometheus β Metrics collection and storage
- Grafana β Visualization dashboards
- Loki (optional) β Log aggregation
- Promtail (optional) β Log shipping
Privacy & Data Protection
Telemetry: TimeTracker can optionally send anonymized usage data to help improve the product (errors, feature usage, install counts). All telemetry is opt-in. No personal data is collected. To disable telemetry, set
ENABLE_TELEMETRY=falseor simply don't set the environment variable (disabled by default).
What we DON'T collect:
- β Email addresses or usernames
- β IP addresses
- β Project names or descriptions
- β Time entry notes or client data
- β Any personally identifiable information (PII)
Your rights:
- π₯ Access: View all collected data
- βοΈ Rectify: Correct inaccurate data
- ποΈ Erase: Delete your data at any time
- π€ Export: Export your data in standard formats
π See Privacy Policy for complete details
π See Analytics Documentation for configuration
π See Events Schema for tracked events
π£οΈ Roadmap
Planned Features
- π Advanced Analytics β More charts, insights, and reporting options
- π API Extensions β Additional RESTful API endpoints for integrations
- π Push Notifications β Real-time browser notifications
- π± Mobile & Desktop App Enhancements β Additional features for the native Flutter mobile and Electron desktop apps
- π€ Automation Rules β Automated workflows and task assignments
- π Advanced Forecasting β AI-powered project timeline predictions
Technology stack
Flask, SQLAlchemy, PostgreSQL/SQLite, Tailwind CSS, Docker β see Architecture Β· Project Structure Β· UI Guidelines.
π€ Contributing
We welcome contributions! Whether it's:
- π Bug Reports β Help us identify issues
- π‘ Feature Requests β Share your ideas
- π Documentation β Improve our docs
- π» Code Contributions β Submit pull requests
Quick Start for Contributors
Fork and Clone
git clone https://github.com/your-username/TimeTracker.git cd TimeTrackerSet Up Development Environment
# Use SQLite for quick local testing docker-compose -f docker/docker-compose.local-test.yml up -dMake Your Changes
- Follow the Contributing guidelines and full Contributing doc
- Write tests for new features
- Update documentation as needed
Submit a Pull Request
- Create a clear description of your changes
- Reference any related issues
- Ensure all tests pass
π CONTRIBUTING.md β Quick contributing overview
π Full Contributing Guidelines β Setup, standards, PR process
π DEVELOPMENT.md β Run locally, tests, releases
π Local Testing with SQLite β Docker SQLite setup
π License
TimeTracker is licensed under the GNU General Public License v3.0.
This means you can:
- β Use it commercially
- β Modify and adapt it
- β Distribute it
- β Use it privately
See LICENSE for full details
Support
If TimeTracker saves you money, a star on GitHub helps others find it.
- Support the project / hide donate prompts: Support & Purchase Key β donate or buy a one-time key to remove donate prompts in your instance
- Documentation:
docs/ - Bug reports: Open an issue
- Discussions: GitHub Discussions
Built with care for the time-tracking community
Requirements
Categories
Download Statistics
Total Downloads Over Time
Related apps
Explore more like this
Explore allDetails
postgres:16-alpineRuntime arguments
- Network
timetracker- Shell
sh- Privileged
- false
Template configuration
PostgreSQL data directory
- Target
- /var/lib/postgresql/data
- Default
- /mnt/user/appdata/timetracker/db
- Value
- /mnt/user/appdata/timetracker/db
PostgreSQL port (internal only)
- Target
- 5432
- Default
- 5432
- Value
- 5432