This guide demonstrates installation of the chess server using a virtual machine on Microsoft Azure running Ubuntu, but the steps can be adapted to other cloud providers or local installations.
On Microsoft's Azure Portal, click on "Create a resource" and select "Virtual machine":

Then configure the VM according to the following steps:
Then "Review + create". Follow the prompts to create the VM. After that's done, go to the VM's network settings and add an inbound port rule to allow destination port 3010, which is required for the websocket connection to the chess server.
After finishing setting the virtual computer up, connect to the VM by using SSH in a terminal: ssh -i ChessServerVM_key.pem azureuser@<IP>. You can find the IP address in the Azure portal under "Virtual machines" -> "Your VM" -> "Overview".
sudo apt update && sudo apt upgrade
sudo apt install nginx
sudo apt install openjdk-21-jdk-headless
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bashRestart your shell session, then run:
nvm install 22
npm install pm2 -g
# Optional for SSL certificate obtaining:
sudo snap install lego- Transfer the files under
server-fsto their respective locations on the VM. git clone https://github.com/software-schreiber/chesscd ./chess/chess-gui-nuxt/ && npm install && cd ~- Copy your SSL certificate files to
/home/azureuser/certificates/and adjust the file names in both the Nginx configuration and the Node server start scripts. If you don't yet have a certificate, we provide a template script that useslegoto obtain a certificate for your domain. - The Java server requires the certificates in a specific format. Run
copy-and-convert-certs.shto copy the lego-obtained certificates to the correct location and convert them to a Java keystore. Make sure to adjust this and the Java server start script to your certificate file names. cd ./start-scripts/chmod +x ./java-server.sh && chmod +x ./node-server.shpm2 start ./java-server.shpm2 start ./node-server.shpm2 save
- When updates are available:
cd ~/chess/git pullcd ./chess-gui-nuxt/ && npm installpm2 restart node-serverpm2 restart java-server
- For the production Node server, user the corresponding start script instead and run
cd ./chess-gui-nuxt/ && npm run buildonce before first starting the server, or after updates.
For automatic pulling of updates from the Git repository, you can check out our work in progress newest-git script.




