I am here to show you how to install whatever UCI compatible external engine you want and run it directly into the lichess.org web site. The feature is still in alpha state (that means they guarantee nothing and have a lot more work on it), but it works pretty well.
Long story short
Here are the steps you have to follow:
- Go to fitztrev's lichess-tauri (Lichess Local Engine) GitHub project, to Releases
- Download the newest version of the app (at the moment of writing version 0.0.5) for your operating system
- Run the installer and run the application
- Log in to Lichess
- DO NOT click on the Install Stockfish 16 button
- Download the version of Stockfish (or any other UCI-compatible engine) that works best on your machine
- Only then click on the Or add your own engine → button
- Choose a descriptive title for the engine
- Click on the Select button in the Binary section
- Select the binary file for your preferred engine
- Now you can go to lichess.org and select whatever engine you configured in the Analysis/Study hamburger menu on the right side (bottom)
Short story long
Here are the steps you have to follow, with pretty pictures and extra information. Also a video at the end.
Go to the Releases of the Lichess Local Engine GitHub project
Go to this link: Releases.
Click on the title of the latest version (which should be on top).
Download the newest version of the app (at the moment of writing version 0.0.5) for your operating system
For this example, if you are on Windows, you should select the Lichess.Local.Engine_0.0.5_x64-setup.exe.
Run the installer and run the application
Next, next, next:
Login to lichess
In order for this to work, the application needs access to the Lichess API, which functions with OAuth2 to authorize you. All you have to do is click on Log in with Lichess and follow the instructions.
DO NOT click on the Install Stockfish 16 button
Now you should be in the Add a chess engine section. While you can just click on Install Stockfish 16 and not care about things, choosing the engine that works best for your machine will save you a lot of time and resources. Besides, if you are reading this and installing Lichess External Engine, then you probably already have some chess GUI and some engines that you've installed before.
That is why I recommend you just add those or download them and then add them.
Download the version of Stockfish (or any other UCI-compatible engine) that works best on your machine
For example, the Stockfish engine download site shows this:
For me, the best verison is the AVX2 version while the one embedded with Lichess External Engine is probably the most compatible one. Note that there are specific binaries for particular CPU architectures. Just choose the best one for you.
Click on the Or add your own engine → button and set up your engine
The only important part for now is the title, so choose one that is telling you exactly what you've got. For example Stockfish 16 AVX2, because as new engine versions come up, you will perhaps have more versions of the same brand. The architecture is also relevant, as you may forget in a year or so which one was best for your machine.
Now click on Select and choose the binary file for your preferred engine.
Go to Lichess
You can use this external engine in the Analysis page or in a Study, where the same analysis control is being used, but I recommend you use it in Study because whenever you change the analysis engine the page refreshes, which in Analysis is deleting the moves you've made so far. BTW, shameless plug: if you had installed the LiChess Tools browser extension, then the PGN of the moves remains stored in the textarea under the board in the Analysis page and you can just reload it, no harm done.
The choice for engine is in the options menu of the Analysis, which can be opened with the hamburger menu button on the bottom of the move list.
So under the ENGINE MANAGER section you can select which engine you prefer.
You are now ready to do analysis with the new engines. However, since it is in alpha, there are some issues that have not been resolved and you might find them annoying.
- the engine doesn't know when to stop for some engines
- this works fine with Stockfish, but not with Rybka 4.1, for example.
- let say you open an analysis page, import a game, start analysing, then stop. You would expect the engine to stop, too, but it doesn't. Closing the window doesn't help, because it's the Lichess External Engine application that runs it and it doesn't yet have a Cancel Analysis button.
- the same applies to selecting other moves in the Lichess move list. The engine keeps analysing the previous move and it fails to connect to refresh the current move.
- the solution is to close and restart Lichess External Engine, then enable analysis.
- the page gets refreshed whenever you change the engine
- I am sure they are going to change this in the future, but at the moment this means it's better to use Studies, as they persist the moves in the list. Or LiChess Tools, of course.
- there are some people complaining that only the main moves (moves in the mainline) are getting analysed, otherwise the engine freezes
- this was not my experience. Yet, in some cases, when the position had a cloud cache, I had to press the + sign (that runs the local analysis anyway) twice. It may be my setup, since I am also running LiChess Tools, but it wasn't that annoying. Just press multiple times if you see it doesn't work.
- when going deeper on cloud evaluations, there is no visible feedback
- this affects me directly, because the engine is running, the page shows nothing and LiChess Tools is trying to go deeper all the time. But the engine is working in the background, doing who knows what.
- the server is sometimes unavailable
- 503 errors from the server. I am sure they are working on features and it will happen a lot. However the client code doesn't handle that very gracefully.
In order for the developers to solve these issues, feedback is VERY important, so don't be shy and leave comments of all the issues you encounter and all the features you want to see and all improvements you can think of.
I leave you with a video from US Chess: John's How-To's: Using Engines on Lichess