Skip to content

Self-hosted Leantime deployment with Docker Compose, MariaDB, Traefik for HTTPS, and optional MCP server integration.

Notifications You must be signed in to change notification settings

eulicesl/MindTime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Leantime Self‑Hosted Deployment

This repository contains a production‑ready docker‑compose setup for running Leantime, the open‑source project management platform designed for neurodiverse teams, on your own infrastructure. It includes:

  • A MariaDB database (MySQL 5.7+ compatible) for storing your data.
  • The official Leantime Docker image.
  • A Traefik reverse proxy with automatic HTTPS via Let’s Encrypt.
  • Environment variables for flexible configuration.
  • Optional settings to enable the Model Context Protocol (MCP) server for AI assistants like Claude or ChatGPT.

🚀 Quick start

  1. Clone or extract this repository to your server:

    git clone https://github.com/your‑username/leantime-selfhost.git
    cd leantime-selfhost
  2. Copy the environment example and adjust values to match your domain, email, and credentials:

    cp .env.example .env
    # then edit .env in your editor of choice
    • LEANTIME_DOMAIN should point to a DNS record resolving to your server (e.g. projects.yourcompany.com).
    • ACME_EMAIL is used by Let’s Encrypt to send certificate expiry notices.
    • Set secure values for DB_PASSWORD and DB_ROOT_PASSWORD.
    • Configure SMTP settings so Leantime can send invites and notifications.
  3. Start the stack using Docker Compose:

    docker compose pull
    docker compose up -d
    • On first run, Traefik will request TLS certificates for your domain. Ensure ports 80 and 443 are open and that your DNS points to this server.
    • The MariaDB container will initialise the database using the credentials in .env.
  4. Complete the web installer:

    • Visit https://<your-domain> in your browser. You should see the Leantime setup wizard.
    • Create your admin account (email, password, name) and company name.
    • The installer will connect to the database using the environment variables and create the required tables.
  5. Log in and start managing projects. You now have a fully‑functional, self‑hosted Leantime instance with HTTPS and persistent storage.

🧐 Enabling AI via the MCP server

Leantime offers an optional Model Context Protocol (MCP) server which allows AI assistants (e.g. Claude Desktop) to query and update your tasks directly. According to Leantime’s support documentation, the MCP plugin is still in beta and must be purchased from the Leantime Marketplace【115316079784291†L18-L45】. Once installed, you can enable it by setting MCP_SERVER_ENABLED=true in your .env file and adjusting the other MCP_* settings. The MCP server exposes your project data over HTTP or STDIO with API key and IP whitelist options【115316079784291†L49-L83】.

Usage steps:

  1. Purchase and install the MCP Server plugin from the marketplace in your Leantime UI【115316079784291†L38-L44】.
  2. Generate a Personal Access Token via the Advanced Auth plugin (recommended)【115316079784291†L73-L85】.
  3. Set MCP_SERVER_ENABLED=true in your .env and restart the containers.
  4. Configure your AI client to connect to https://<your-domain>/mcp using the token【115316079784291†L105-L107】.

The MCP server allows AI to understand context and prioritise tasks, answering natural language questions like “What should I focus on today?”【817016008500829†L158-L167】. It supports both HTTP and STDIO transports and includes built‑in authentication, IP whitelisting and rate limiting【115316079784291†L49-L83】.

⚙️ Local vs hosted deployment

  • Local / private network: If you prefer not to expose Leantime publicly, omit the traefik service and access Leantime directly via http://localhost:80. You can use Tailscale to create a private mesh network and reach the app securely from your devices.
  • VPS or public server: Keep Traefik enabled to obtain automatic Let’s Encrypt certificates. Ensure DNS points to your server and ports 80/443 are open.

Leantime requires a traditional server environment with PHP 8.x, a webserver and a SQL database【138531887845746†L14-L21】. Serverless platforms like Vercel do not support persistent PHP processes or stateful databases; thus self‑hosting via Docker is the recommended approach.

✅ Features of Leantime

Leantime provides a comprehensive set of features out of the box, including Kanban boards, Gantt charts, idea boards, timesheet management, multiple user roles, two‑factor authentication and integrations with Slack/Mattermost【276935885598103†L79-L100】. Self‑hosting ensures you retain full control over your data and can extend the system via plugins or custom code.

For more information on system requirements, please see the official documentation, which notes the need for PHP 8.0+, Apache or Nginx, and a MySQL/MariaDB database【138531887845746†L14-L21】.

📦 Backups and updates

  • Backups: Regularly back up the db_data and uploads volumes. Use docker exec leantime-db /usr/bin/mysqldump -u root -p to dump your database, and copy the userfiles folder from the uploads volume.
  • Updates: To update Leantime or Traefik, run docker compose pull followed by docker compose up -d. The database will remain intact.

Enjoy your self‑hosted Leantime instance!

About

Self-hosted Leantime deployment with Docker Compose, MariaDB, Traefik for HTTPS, and optional MCP server integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors