lila README

The project's README from github.com/lichess-org/lila. As one markdown file: README.md.

lichess.org

Crowdin Mastodon Bluesky Discord Ask DeepWiki

Lichess homepage

Lila (li[chess in sca]la) is a free online chess game server focused on realtime gameplay and ease of use.

It features a search engine, computer analysis distributed with fishnet, tournaments, simuls, forums, teams, tactic trainer, a mobile app, and a shared analysis board. The UI is available in more than 140 languages thanks to the community.

Lichess is written in Scala 3, and relies on a modified Play 2.8 framework. scalatags is used for templating. Pure chess logic is contained in the scalachess submodule. The server is fully asynchronous, making heavy use of Scala Futures and Pekko streams. WebSocket connections are handled by a separate server that communicates using redis. Lichess talks to Stockfish deployed in an AI cluster of donated servers. It uses MongoDB to store more than 12 billion games, which are indexed by elasticsearch. HTTP requests and WebSocket connections can be proxied by nginx. The web client is written in TypeScript and snabbdom, using Sass to generate CSS. All rated games are published in a free PGN database. Browser testing done with Browserstack. Proxy detection done with IP2Proxy database. Software builds and CI/CD done with Depot. Please help us translate Lichess with Crowdin.

See lichess.org/source for a list of repositories.

Join us on Discord for more info. Use GitHub issues for bug reports and feature requests.

Installation

./lila.sh # thin wrapper around sbt
run

The Wiki describes how to setup a development environment.

HTTP API

Feel free to use the Lichess API in your applications and websites.

Supported browsers

Name Version Notes
Firefox 115+ Full support (recommended)
Chromium / Chrome 112+ Full support
Edge 111+ Full support
Opera 97+ Reasonable support
Safari 16.2+ Reasonable support

Older browsers will not work. For your own sake, please upgrade. Security and performance, think about it!

License

Lila is licensed under the GNU Affero General Public License 3 or any later version at your choice. See copying for details.

Production architecture (as of July 2022)

Lichess production server architecture diagram

Credits

See lichess.org/thanks and the contributors here:

GitHub contributors

Competence development program

Lichess would like to support its contributors in their competence development by covering costs of relevant training materials and activities. This is a small way to further empower contributors who have given their time to Lichess and to enable or improve additional contributions to Lichess in the future. For more information, including how to apply, check Competence Development for Lichess contributors.

lila (lichess-org/lila)

Searching Database…

18.8K ·GitHub
What is this?Lichess (lila) is the free, adless and open source online chess server behind lichess.org, focused on realtime play and ease of use.
Is this the lichess.org website itself, or a library I plug into my own app?It is the actual server code that powers lichess.org — a complete realtime chess server, not a library. The pure chess rules it relies on live in a separate scalachess submodule.
Can I run my own copy of it?There is no quick install: the Wiki describes how to set up a full development environment, and the build toolchain expects Node 24+ and pnpm 12+.
Will it work in my browser?Only current browsers: Firefox 115+ (recommended), Chrome 112+, Edge 111+, Opera 97+ or Safari 16.2+. Anything older will not work.
Is the code really free to use, or is there a catch?GNU Affero GPL 3 or any later version, at your choice — a strong copyleft license that fits its forever-free, non-profit mission.
Why is everything free? Who pays for it?Lichess is run as a non-profit, and forever free, adless and open source is the whole point of the project. Even the analysis cluster runs on donated servers.
How many languages does the site come in?More than 140, thanks to the community translating Lichess through Crowdin.
How do live moves reach my opponent so fast?Realtime play runs over WebSockets, which are handled by a separate dedicated server that communicates with the main one through Redis.
Size
702 MB
Stars
18.8K
Age
14y
Commits · 90 Days