Lichess is a free and open-source online chess server that allows users to play chess games, participate in tournaments or solve puzzles. Lila is its chess variant engine that implements variants of chess like Crazyhouse or Antichess. In this tutorial, you will learn how to install Lila on OpenSUSE Latest.
Before we begin, ensure that you have the following requirements:
A user account on the OpenSUSE Latest operating system with sudo privileges.
A stable internet connection.
Java Development Kit (JDK) installed on your server. To install, run:
sudo zypper install java-devel
We'll start by installing some dependencies:
sudo zypper install git-core gcc make sbt
Next, we'll clone Lila's git repository:
git clone git://github.com/ornicar/lila.git
Move into the lila directory and create a new file lila.conf
:
cd lila/
cp conf/lila.prod.conf conf/lila.conf
nano conf/lila.conf
The conf file is important. We'll edit it to reflect your domain and other settings.
In the conf file, change the following as needed:
domain = "your-domain.com"
mongodb-uri = "mongodb://localhost:27017/lila"
Make sure to replace your-domain.com
with your actual domain name.
Configure Lila. You can use the provided conf/lila.prod.conf
file as a reference but some adjustments will have to be made to suit your needs. Open the file in your preferred text editor:
nano conf/lila.prod.conf
In the file, modify the following lines:
play.crypto.secret = "abcdefghijk9908409285"
lila.host = "your_domain_name:8080" # Replace "your_domain_name" with the actual domain name
lila.port = play.http.port = 8080
Build Lila with:
sbt build
This may take some time.
Once the build is complete, start Lila with:
target/universal/stage/bin/lila
This will web-serve Lila at 127.0.0.1:8080
. We'll set Lila up to be accessible via its domain/UI web interface instead of the local IP. To do so, use a reverse proxy like nginx
.
Install nginx
and configure it to point to Lila:
sudo zypper install nginx
sudo nano /etc/nginx/nginx.conf
Add the following inside the server
block:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Real-IP $remote_addr;
add_header P3P 'CP="IDC CSS ADM DEVi TAIi PSAi \
IVAi IVDi CONi HISi TELi OUR \
SAMi IND ONL PUR COM NAV \
INT DEM CNT STA PRE LOC"';
add_header Access-Control-Allow-Origin *;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
}
Save changes and restart nginx
:
sudo systemctl enable nginx
sudo systemctl start nginx
You should now be able to access Lila via http://your-domain.com
in your web browser.
In this tutorial, we installed and configured Lila on OpenSUSE Latest. You can now play chess, participate in tournaments and solve puzzles from your server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!