- Honor AI_ENABLED across session AI, REST v1, LLM service, templates, and context; add regression tests for the AI helper gate. - Docker Compose: optional Ollama behind the ai profile; align env.example and example compose with safe defaults. - Add UNINSTALL.md with a dedicated AI teardown section; cross-link from README, INSTALLATION, Getting Started, docs index, and Docker setup guide. - Record 5.5.6 in CHANGELOG and sync version examples in BUILD_CONFIGURATION; bump setup.py to 5.5.6.
4.6 KiB
TimeTracker Installation
This guide walks you through installing and running TimeTracker. For a quick overview, see the README Quick Start.
Prerequisites
- Docker 20.10+ and Docker Compose 2.0+
- Git
- 2GB+ RAM for Docker containers
- Ports: 80/443 (HTTPS) or 8080 (HTTP)
Install Docker for your platform: Docker Installation Guide.
Quick Install (Docker with HTTPS)
-
Clone the repository:
git clone https://github.com/drytrix/TimeTracker.git cd TimeTracker -
Create your environment file from the template:
cp env.example .env -
Edit
.envand set at least:- SECRET_KEY — Required for sessions and CSRF. Generate one:
python -c "import secrets; print(secrets.token_hex(32))" - SETTINGS_ENCRYPTION_KEY — Recommended to encrypt stored secrets (SMTP password, OAuth client secrets, Peppol token, AI key, and 2FA secrets). Generate one:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" - TZ — Your timezone (e.g.
America/New_York,Europe/Brussels). - CURRENCY — Default currency (e.g.
USD,EUR).
- SECRET_KEY — Required for sessions and CSRF. Generate one:
-
Start the stack:
docker compose up -dThis starts the app, PostgreSQL, and HTTPS reverse proxy without the optional bundled Ollama LLM (smaller footprint). See With AI helper (optional) below to add Ollama.
-
Open https://localhost in your browser. The first run may show a self-signed certificate warning; proceed to continue.
The first user who logs in is created as an admin (or use ADMIN_USERNAMES in .env to predefine admin usernames).
With AI helper (optional)
To run the bundled Ollama service and enable the in-app AI helper:
-
In
.env, setAI_ENABLED=trueand ensureAI_BASE_URL=http://ollama:11434(andAI_MODELas desired; defaultllama3.1is large on first pull). -
Start Compose with the
aiprofile:docker compose --profile ai up -d
For a hosted OpenAI-compatible API only (no Ollama containers), set AI_ENABLED=true, AI_PROVIDER=openai_compatible, AI_BASE_URL, and AI_API_KEY in .env, then use plain docker compose up -d.
Details: README.md (AI Helper section) and docs/admin/configuration/DOCKER_COMPOSE_SETUP.md.
To turn off or remove the AI helper (including bundled Ollama and API tokens), see UNINSTALL.md.
First Login and Minimal Config
- Log in with the username you configured (e.g. from
ADMIN_USERNAMES) or the first account you create. - In Admin → Settings you can adjust timezone, currency, and other options.
- See Getting Started for initial setup and core workflows.
Alternative: SQLite Quick Test
To try TimeTracker without PostgreSQL:
git clone https://github.com/drytrix/TimeTracker.git
cd TimeTracker
docker-compose -f docker/docker-compose.local-test.yml up --build
Then open http://localhost:8080. No .env is required for this compose file. SQLite is for evaluation only; use PostgreSQL for production.
Production Deployment
For production:
- Use a strong SECRET_KEY and keep
.envout of version control. - Prefer PostgreSQL (included in the default Docker Compose setup).
- Put the app behind HTTPS (reverse proxy or Docker with HTTPS compose).
Note: The default
docker-compose.ymlrequiresSECRET_KEYto be set (32+ chars). If it is missing,docker composewill error during interpolation.
Detailed steps and options:
- Docker Compose Setup — Full configuration and env reference
- Docker Public Setup — Production deployment with published images
Troubleshooting
| Problem | Documentation |
|---|---|
| Docker won’t start | Docker Startup Troubleshooting |
| Database connection errors | Database Connection Troubleshooting |
| CSRF or session errors | CSRF Troubleshooting |
| Port already in use | Change ports in your docker-compose file or stop the conflicting service |
| Remove / uninstall | UNINSTALL.md |
For more help, see the Documentation Index and Support.