Connecting Chess for Android to a Remote Server

I have received several questions on how to connect Chess for Android running on an Android device (e.g. a phone) as client to a remote chess server (e.g. a powerful desktop), so I decided to write a small document with detailed instructions.

What you will need:
  • The server software from Bernhard Wallner's chess utilities, suited for your server's operating system (if, say, your desktop runs Windows, you will need to download the Windows version). You do not need to download the client software in this case.
  • The network enabled version of Chess for Android.
On the server, start the engine server software, and construct a new row for every engine you want to run remotely. Assign a name, port number, and select the full path to each engine binary (an executable that runs on the server). You can also supply command line options for starting the engine. Check the active checkboxes and click start when done. This yields something similar to the screenshots below. Here, I have started BikJump on port 1048 and Stockfish on port 1049.

Next, you will have to find the IP address of your server. You can find this, for example, using the ipconfig utility. On a local network, you can also query the router for the IP addresses assigned to different computers. Note that running a globally accessible server behind a firewall requires a setup that is a bit outside the scope of this posting (for example, you may need DDNS if your IP address is assigned dynamically, and you may need to forward ports to your chess server in a router).

On the Android device, which will be your client, start Chess for Android, long press the notation window and then select "UCI and XBoard", followed by "Import Engine", followed by "Network Socket". In the pop-up window, enter the IP address or domain name in Hostname box, and the appropriate port in the Port box. Make sure you also make the correct UCI or XBoard selection. In the example below, my server was running on IP address and I want to connect to stockfish on port 1049. If all has been done well, this pops up the engine setup window. Select the desired parameters (note that the endgame tablebases path name applies to your server, not the Android device) and press done.

That's it! In the screenshots below, you see stockfish running remotely at about 867 KNs. In contrast, a screenshot with stockfish running as native ARM binary on the device is shown as well, running at about 67 KNs.


Semeah said…
I was wondering if there is a way to get houdini to use a particular opening's book when using it via the remote server.
Aart Bik said…
I have no experience with Houdini, but since the chess engine is running on the remote server, you could pass the proper command line parameters in the server setup, or perhaps put an .ini file in the right path for the engine.

This would work for most engines I am familiar with.
Vaz said…
Hello Aart

I am making a Chess site for Kids. I saw this post. I tried all the steps correctly, but after I import the chess engine, it says "unstarted". Where am I getting this wrong

Steps followed as per your instructions

a) downloaded "engineServer"
b) downloaded fruit chess engine
c) downloaded network Android apk on to my mobile

a) started "engineserver". Loaded the fruit.exe, port 5050, arguements blank. Started the Engine server. It does show that the chess engine is loaded
b) installed a tiny webserver on my desktop.
e) installed bluestacks Android OS. It works fine with your Chess Program.
f) Import Engine - selected UCI, t host name = localhost, p[ost = 5050
And after I "connect" it says "unstarted"

Where am I going wrong.

a) I am certain, somehere in the port or host, there should be a missing step
b) Or maybe I should give something in arguements ?

I even tried from my android phone, after making my desktop into a DDNs using tzo

Please help

Just a matter of chess rules.: Whenever I check the other party's King, rules establish it is invalid to rotate. Nevertheless this program allows it as a deffensive move performed by the computer.
Aart Bik said…
Of course the program does not castle when in check. However, once out of check it may castle again. Some of the users that contacted me were not familiar with that rule?
Unknown said…
How the hell do I castle?
Aart Bik said…
To castle, simply touch the king and move it two squares to the left or right (if you have move coach on, you will see this "extra" field in green).

Also see
GuidoL said…
"Chess for Android" does also connect to a Pi-like computer running armbian (debian/ubuntu-flavour):
Aart Bik said…
Thanks for the link, Guido!
Anonymous said…
The server software link is not giving me a download.
Can you please update it. Thank you in advance.
ajcbik said…
Webarchive may help here:
Anonymous said…
Does anyone know what would cause the chess engine server to essentially time out on a windows machine? I find myself having to stop and restart the chess server after about 15 minutes of idle. Thanks in advance for any possible answers.

Popular posts from this blog

Checkers Move Generation

Status Bar Back!