Overview
Lichess (lila) is built with Scala 3, Play Framework 2.8, and TypeScript. This guide will help you set up a complete development environment.Prerequisites
Before you begin, ensure you have the following installed:Required
- Java Development Kit (JDK) 21+: Required for running Scala and sbt
- Node.js v24.11.1+: Required for UI development
- pnpm: Package manager for the UI monorepo
- MongoDB: Database for storing games and user data
- Redis: Used for WebSocket communication and caching
Optional
- git: For version control
- nginx: For proxying HTTP requests (production-like setup)
Installation Steps
The
lila.sh script will warn you if JAVA_HOME is not set or if your Java installation is incomplete (JRE instead of JDK).The
.sbtopts file configures JVM memory settings (2GB min, 8GB max by default). Adjust these values based on your system resources.Running Lichess Locally
Start the Server
|\_ _ _ _
/o \ | (_) ___| |__ ___ ___ ___ ___ _ __ __ _
(_. || | | |/ __| '_ \ / _ \/ __/ __| / _ \| '__/ _` |
/__\ | | | (__| | | | __/\__ \__ \| (_) | | | (_| |
)___( |_|_|\___|_| |_|\___||___/___(_)___/|_| \__, |
|___/
sbt:lila>
Development Workflow
In the sbt console, you have access to various commands:UI Development
For frontend development, build the UI assets in watch mode:Troubleshooting
JVM Memory Issues
If you encounter out-of-memory errors, adjust the settings in.sbtopts:
Port Already in Use
If port 9663 is already in use, you can change it inconf/application.conf:
MongoDB Connection Failed
Verify MongoDB is running:Node.js Version Mismatch
Theui/build script checks for the minimum required Node.js version. If you see an error, upgrade Node.js:
Next Steps
- Learn about the module structure
- Set up UI development workflow
- Read about building the project
- Explore testing strategies

