explaingit

lichess-org/lila

Analysis updated 2026-06-24

18,184ScalaAudience · developerComplexity · 5/5Setup · hard

TLDR

Lila is the open-source server powering lichess.org, a completely free, ad-free online chess platform with real-time games, tournaments, a tactics trainer, analysis boards, and a mobile app.

Mindmap

mindmap
  root((lila))
    What it does
      Real-time chess games
      Tournaments
      Tactics trainer
      Analysis board
    Tech stack
      Scala 3
      TypeScript
      MongoDB
      Redis
    Data
      12 billion games
      Free database
      Elasticsearch search
    Community
      Mobile app
      140 languages
      Open source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run your own free, ad-free online chess server with tournaments, simultaneous exhibitions, and a mobile app

USE CASE 2

Study how a high-traffic real-time multiplayer platform handles WebSocket connections and game state at scale

USE CASE 3

Access the freely downloadable database of over 12 billion games for chess research or analysis

USE CASE 4

Contribute features or localizations to one of the largest open-source game platforms in the world

What is it built with?

ScalaTypeScriptMongoDBRedisElasticsearchWebSocketPlay FrameworkStockfish

How does it compare?

lichess-org/lilaprisma/prisma1scala/scala
Stars18,18416,40014,450
LanguageScalaScalaScala
Setup difficultyhardhardhard
Complexity5/54/55/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires MongoDB, Redis, Elasticsearch, and a Scala build environment plus a companion WebSocket server, significant infrastructure to run locally.

In plain English

Lila (short for "lichess in scala") is the open-source codebase behind lichess.org, a free online chess server. Unlike most chess platforms, lichess is entirely free to use, has no advertisements, and is run as a non-profit. The platform supports real-time chess games, tournaments, simultaneous exhibitions (where one player faces many opponents at once), forums, teams, a tactics trainer, a shared analysis board for studying positions, and a mobile app. The server is written in Scala 3, a statically-typed programming language that runs on the Java Virtual Machine, built on a modified version of the Play web framework. It handles many tasks asynchronously, meaning it can process many requests at once without waiting, using Scala's concurrency tools. WebSocket connections (which keep a live two-way channel open between browser and server for real-time moves) are handled by a separate companion server communicating over Redis, a fast in-memory data store. Game data, over 12 billion games, is stored in MongoDB and indexed with Elasticsearch for search. Computer analysis is provided by Stockfish, a strong open-source chess engine, deployed across a cluster of donated servers. The web interface is written in TypeScript. All rated games are published in a freely downloadable database. The UI is translated into over 140 languages by community volunteers.

Copy-paste prompts

Prompt 1
How do I set up a local development environment for lila, the Scala chess server behind lichess.org?
Prompt 2
Explain how lila uses Redis and WebSockets to keep real-time chess moves in sync between two players
Prompt 3
How does lila integrate Stockfish across a cluster of donated servers to analyze chess positions on demand?
Prompt 4
Walk me through how lila stores and indexes over 12 billion chess games in MongoDB and Elasticsearch
Prompt 5
How does lila handle tournament pairings, scoring, and tiebreaks, explain the flow in plain English

Frequently asked questions

What is lila?

Lila is the open-source server powering lichess.org, a completely free, ad-free online chess platform with real-time games, tournaments, a tactics trainer, analysis boards, and a mobile app.

What language is lila written in?

Mainly Scala. The stack also includes Scala, TypeScript, MongoDB.

How hard is lila to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is lila for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub lichess-org on gitmyhub

Verify against the repo before relying on details.