Self-Hosting Leantime: Open Source Project Management for Small Teams
Most project management tools fall into two camps: either dead simple (Trello — a board and not much else) or enterprise-grade sprawl (Jira — where tickets go to die in a hierarchy of epics, stories, and sub-tasks nobody reads). If you’re running a small team, freelancing, or managing personal projects, neither extreme fits well.
Leantime occupies the space between. It gives you kanban boards, Gantt charts, goal tracking, timesheets, wikis, and sprint management in a single self-hosted package. What makes it unusual is the design philosophy: built with ADHD, autism, and dyslexia in mind, it prioritizes reducing cognitive overload rather than adding more features behind more menus.
The open source version includes everything. No premium tier gatekeeping. Let’s set it up.
What You Get
Leantime packs a surprising amount into a PHP/MySQL stack:
- Task views — Kanban, list, table, Gantt chart, and calendar views for the same data
- Project dashboards — Status updates, reports, and progress tracking per project
- Goal and milestone tracking — OKR-style goals with metrics tied to actual tasks
- Timesheets — Built-in time tracking per task, with exportable reports
- Wikis and docs — Per-project knowledge bases with rich text editing
- Idea boards and canvases — Lean Canvas, Business Model Canvas, SWOT, and retrospective boards
- Sprint management — Scrum-style sprints with velocity tracking
- File storage — Local filesystem or S3-compatible backends
- LDAP/OIDC auth — Connect to your existing identity provider
- Integrations — Slack, Mattermost, Discord webhooks, plus a REST API
- Plugins — Extensible architecture for custom functionality
- 20+ languages — Internationalized out of the box
All of this runs comfortably on a Raspberry Pi 4 or any modest VPS.
Prerequisites
- A Linux server with Docker and Docker Compose installed
- At least 512 MB of free RAM (1 GB recommended)
- A domain name (optional, but needed for HTTPS)
- 10 minutes
Docker Compose Setup
Create a project directory:
mkdir -p ~/leantime && cd ~/leantime
Create the environment file first. This keeps credentials out of your compose file:
cat > .env << 'EOF'
# MySQL
MYSQL_ROOT_PASSWORD=change-this-root-password
MYSQL_DATABASE=leantime
MYSQL_USER=leantime
MYSQL_PASSWORD=change-this-db-password
# Leantime
LEAN_DB_HOST=leantime_db
LEAN_DB_USER=leantime
LEAN_DB_PASSWORD=change-this-db-password
LEAN_DB_DATABASE=leantime
# App Settings
LEAN_SITENAME="My Projects"
LEAN_LANGUAGE=en-US
LEAN_DEFAULT_TIMEZONE=America/New_York
LEAN_SESSION_PASSWORD=change-this-session-secret-min-32-chars
LEAN_PORT=8080
EOF
Change every password. Use openssl rand -base64 32 to generate strong ones. The LEAN_SESSION_PASSWORD should be at least 32 characters — it encrypts session data.
Now the compose file:
services:
leantime_db:
image: mysql:8.4
container_name: leantime_db
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
env_file: .env
networks:
- leantime-net
command: --character-set-server=UTF8MB4 --collation-server=UTF8MB4_unicode_ci
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
leantime:
image: leantime/leantime:latest
container_name: leantime
restart: unless-stopped
env_file: .env
ports:
- "${LEAN_PORT:-8080}:8080"
networks:
- leantime-net
volumes:
- public_userfiles:/var/www/html/public/userfiles
- userfiles:/var/www/html/userfiles
- plugins:/var/www/html/app/Plugins
- logs:/var/www/html/storage/logs
depends_on:
leantime_db:
condition: service_healthy
security_opt:
- no-new-privileges:true
volumes:
db_data:
userfiles:
public_userfiles:
plugins:
logs:
networks:
leantime-net:
Start it:
docker compose up -d
Wait about 30 seconds for MySQL to initialize, then open http://your-server-ip:8080. You’ll see the installation wizard.
Initial Setup
The web installer walks you through three steps:
- Company name and admin account — Pick your organization name and create the first admin user. This account can’t be deleted, so use a real email.
- Database check — Leantime verifies the MySQL connection using the environment variables you set. If this fails, double-check that
LEAN_DB_HOSTmatches your database container name. - Done — That’s it. No 47-step configuration wizard.
After installation, you land on the personal “My Work” dashboard — a unified view of your tasks across all projects.
Setting Up Your First Project
Click Projects → New Project in the sidebar. Leantime asks for:
- Project name and optional description
- Client (useful if you manage work for multiple clients)
- Start and end dates (optional — not everything needs a deadline)
- Project type — Strategy, program, or project. For most setups, just pick “project”
Once created, you can switch between views using the tabs: To-Do (kanban), Timeline (Gantt), Table, Calendar, and List. All views show the same underlying tasks — pick whichever matches how your brain works.
Creating Tasks
Tasks in Leantime are called “To-Dos.” Each one supports:
- Status workflow — New → In Progress → Done (customizable)
- Subtasks — Unlimited nesting for breaking work down
- Dependencies — Link tasks that block each other
- Time estimates and tracking — Estimate hours, then log actual time
- Tags, priorities, and due dates
- File attachments — Drag and drop onto any task
- Comments and discussions — Threaded conversations per task
The emoji task rating system is worth mentioning — you rate how you feel about each task. Leantime uses this to suggest better task ordering, pairing dreaded tasks with enjoyable ones. It sounds gimmicky, but it’s rooted in behavioral psychology research on motivation.
Reverse Proxy with HTTPS
For production use, put Leantime behind a reverse proxy. Here’s an Nginx Proxy Manager or Caddy approach:
Caddy (Caddyfile)
Nginx
server {
listen 443 ssl http2;
server_name projects.yourdomain.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
client_max_body_size 100M;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Set client_max_body_size high enough for file uploads. Then update your .env:
LEAN_APP_URL=https://projects.yourdomain.com
Restart the container after changing environment variables:
docker compose up -d --force-recreate
S3 File Storage
By default, Leantime stores uploaded files on the local filesystem. For reliability or if you’re running multiple instances, switch to S3-compatible storage (works with MinIO, Backblaze B2, Wasabi, or AWS S3):
# Add to .env
LEAN_USE_S3=true
LEAN_S3_KEY=your-access-key
LEAN_S3_SECRET=your-secret-key
LEAN_S3_BUCKET=leantime-files
LEAN_S3_REGION=us-east-1
LEAN_S3_END_POINT=https://s3.amazonaws.com # Or your MinIO URL
LDAP and OIDC Authentication
If you’re running Authentik, Authelia, or Keycloak, Leantime integrates with OIDC:
# Add to .env
LEAN_OIDC_ENABLE=true
LEAN_OIDC_PROVIDER_URL=https://auth.yourdomain.com
LEAN_OIDC_CLIENT_ID=leantime
LEAN_OIDC_CLIENT_SECRET=your-client-secret
LEAN_OIDC_CREATE_USER=true
When LEAN_OIDC_CREATE_USER is set to true, users who authenticate via your identity provider are automatically created in Leantime on first login. Set their default role with LEAN_OIDC_DEFAULT_ROLE.
For LDAP:
LEAN_LDAP_ENABLE=true
LEAN_LDAP_HOST=ldap://your-ldap-server
LEAN_LDAP_PORT=389
LEAN_LDAP_DN=ou=users,dc=yourdomain,dc=com
LEAN_LDAP_KEYS=uid,mail,displayname
Email Notifications
Leantime can send email notifications for task assignments, comments, and due dates:
# Add to .env
LEAN_EMAIL_RETURN=[email protected]
LEAN_EMAIL_USE_SMTP=true
LEAN_SMTP_HOSTS=smtp.yourdomain.com
LEAN_SMTP_PORT=587
LEAN_SMTP_USERNAME=[email protected]
LEAN_SMTP_PASSWORD=your-smtp-password
LEAN_SMTP_AUTO_TLS=true
LEAN_SMTP_SECURE=tls
Backups
Back up two things: the MySQL database and the uploaded files.
Database
docker exec leantime_db mysqldump -u leantime -p'your-password' leantime > backup_$(date +%Y%m%d).sql
Files
docker run --rm -v leantime_userfiles:/data -v $(pwd):/backup alpine \
tar czf /backup/leantime-files_$(date +%Y%m%d).tar.gz -C /data .
Automate both with a cron job. Test restores periodically — a backup you’ve never restored is just a hope.
Troubleshooting
Container won’t start / database connection errors:
MySQL needs time to initialize on first run. Check logs with docker compose logs leantime_db. Look for “ready for connections.” If the Leantime container started before MySQL was ready, restart it: docker compose restart leantime.
Installation page keeps appearing after setup:
This usually means the database tables weren’t created. Check that your LEAN_DB_* variables match exactly between the Leantime container and what MySQL expects. Case sensitivity matters.
File uploads failing:
Check that the userfiles and public_userfiles volumes are mounted correctly. If using a reverse proxy, ensure client_max_body_size (Nginx) or equivalent is set high enough.
Slow performance: Add PHP OPcache tuning if you’re running on a low-spec server. The Docker image includes it by default, but you can increase memory:
LEAN_PHP_OPCACHE_MEMORY=256
Can’t send emails:
Test SMTP separately first. Many hosting providers block port 25 and 587. Try port 465 with LEAN_SMTP_SECURE=ssl. If using Gmail, you’ll need an app password — regular passwords won’t work.
Leantime vs the Alternatives
| Feature | Leantime | Vikunja | Planka | Focalboard |
|---|---|---|---|---|
| Kanban boards | ✅ | ✅ | ✅ | ✅ |
| Gantt charts | ✅ | ✅ | ❌ | ❌ |
| Goal/OKR tracking | ✅ | ❌ | ❌ | ❌ |
| Time tracking | ✅ | ❌ | ❌ | ❌ |
| Wikis/Docs | ✅ | ❌ | ❌ | ❌ |
| Canvas tools | ✅ | ❌ | ❌ | ❌ |
| OIDC/LDAP | ✅ | ✅ | ❌ | ❌ |
| Mobile friendly | ✅ | ✅ | ⚠️ | ⚠️ |
| RAM usage | ~200MB | ~50MB | ~100MB | ~150MB |
Vikunja is lighter if you just need task lists. Planka is a Trello clone — great for boards, nothing else. Focalboard (Mattermost) is decent but development has slowed. Leantime is the pick when you need actual project management features without the Jira complexity tax.
Wrapping Up
Leantime fills a real gap in the self-hosted project management space. It’s opinionated about reducing friction — the ADHD-friendly design choices (emoji ratings, time boxing, reduced menu nesting) aren’t just marketing. They make a noticeable difference when you’re staring at a task list at 11 PM trying to figure out what to do next.
For a small team or solo operator, it replaces a paid ClickUp or Monday.com subscription with something you own. The Docker setup takes minutes, the resource footprint is small, and the feature set punches well above its weight class.
Pair it with a reverse proxy for HTTPS, connect your identity provider if you have one, and set up automated backups. That’s a production-ready project management system for the cost of whatever hardware you’re already running.