- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.5k
Lichess Development Onboarding (Windows)
The following instructions explain how to set up your development environment for Lichess on Windows.
GNU/Linux instructions: https://github.com/ornicar/lila/wiki/Lichess-Development-Onboarding
Note that Windows is not officially supported for lila builds. It works now, but there is no guarantee that it stays like that.
- Git
- 
sbt If 13.6 then open bin/sbt.batand changeset INIT_SBT_VERSION=_TO_BE_REPLACEDtoset INIT_SBT_VERSION=0.13.16(around line 50)
- MongoDB
- 
npmfrom Node.js.
- nginx
- yarn
- 
gulp-cli(yarn global add gulp-cli)
- Powershell (likely already on your machine) - required version >= 4.0 (in order to have CopyTo method)
- 
Turn off line feed conversion in windows (all checkins are made from linux): git config --global core.autocrlf false
- 
Fork the lila project from github on your computer (including submodules): git clone --recursive https://github.com/ornicar/lila.git
- 
Change your current directory to the top level of the checked out repository. This is important for the successful execution of the Lichess build scripts. cd lila.
- 
copy bin\dev.default.bat bin\dev.bat
- 
Edit dev.bat so java uses UTF8 file encoding and increased memory. Add the following parameters to JAVA_OPTSfor that:-Xms2048M -Xmx3072M -Dfile.encoding=UTF-8
- 
Create conf/application.confwith the following content:include "base" geoip { file = "data/GeoLite2-City.mmdb" } http { port = 9663 }
- 
Run powershell -executionpolicy bypass -File bin\gen\geoip.ps1to download the GeoIP database.
- 
Run yarn install
- 
Run .\ui\build.bat
- 
Compile the Scala application with .\bin\dev.bat compile
- 
Add the following line to your hosts file ( C:\Windows\System32\drivers\etc\hosts):127.0.0.1 lichess-assets.local
- 
Open your nginx.conffile, and add this 'Server' block to thehttpblock:server { server_name lichess-assets.local; listen 80; charset utf-8; location /assets { add_header "Access-Control-Allow-Origin" "*"; rewrite "^/assets/_\w{6}/(.*)$" /assets/$1; alias "C:/projects/lila/public/"; break; } }
Don't forget to change C:/projects/lila into the actual path where lila is cloned to. Convert backward slashes to forward slashes (or escape them)
- Restart (or start) nginx.
- Make sure nginx is running.
- Make sure a MongoDB server instance is running.
- From the top level of the lichess project, execute .\bin\dev.bat
- When sbt is finished retrieving dependencies, type run 9663and press enter.
- In your browser, navigate to localhost:9663