Connect an external chess engine

The analysis panel can use a chess engine running on your own computer instead of the one built into the browser. A native engine is several times faster and can use more than one CPU core. A small program, websocketd, connects the engine to this site. Setup takes a few minutes and is done once. Keep this page open beside the app while you follow it.

Get instructions for my system

Prefer guided help, or want the engine to start automatically at login? Paste this into an AI assistant instead of following the steps below:

Help me connect a native chess engine on my Linux computer (4 CPU cores) to a chess web app. Follow this guide, which has the steps and start script for my setup: https://chessa.io/docs/external-engine?os=linux&port=8080 Walk me through it one step at a time, check each step works, and also show me how to start the engine automatically when I log in.

1. Download a chess engine

Get the official Stockfish release for Linux from stockfishchess.org/download and unpack it. Any other UCI engine works too. Official releases are recommended over package-manager builds, which can be several times slower.

2. Download websocketd

Get the Linux version from the websocketd site and unpack it into a folder you will keep. The next steps put more files in this folder.

3. Create a start script

Enter the full path of the engine program (the file, not its folder).

#!/bin/sh
# Starts the chess engine. Keep this window open while analysing.
cd "$(dirname "$0")"
export PATH="$PWD:$PATH"
websocketd --port=8080 --address=127.0.0.1 --origin=chessa.io "<full path to engine>"

Save it in the websocketd folder. Only this site, on this computer, can use the engine.

Make it executable once, then run it from a terminal and keep the terminal open while analysing:

chmod +x start-engine.sh
./start-engine.sh

To use another engine, enter its path and download the script again. Rename each script after its engine, such as start-stockfish.sh and start-lc0.sh. Run one at a time: they share the port, so the URL in the settings stays the same.

4. Connect

In the analysis panel, open the settings, choose External (on this computer) as the engine source, set the URL to ws://localhost:8080, and enable analysis. If the browser asks to allow access to apps on this device, allow it.

Troubleshooting

In the window running websocketd

MessageCause and fix
./websocketd: No such file or directory / '.\websocketd.exe' is not recognized…The script is not in websocketd's folder. Move it next to websocketd.
Unable to locate specified COMMAND … in OS path.The engine path in the script is wrong. Use the full path of the engine program, not its folder.
Can't start server: listen tcp 127.0.0.1:8080: bind: address already in useAnother program, often an earlier websocketd, is using the port. Close it, or change --port in the script and the URL in the settings to match.
Origin is not listed in allowed listThe --origin value does not match this site. Use --origin=chessa.io, as in the script above.
macOS: “cannot be opened because the developer cannot be verified”, or permission deniedThe downloaded files are quarantined or the script is not executable. Run the unblock command from step 3.
Nothing is logged when the app connectsThe request never reached websocketd. Check the app's message below. In Safari with a ws:// URL this is expected: turn on “I use Safari” above and follow the secure setup.
Can't start server: open localhost+2.pem: no such file or directoryThe certificate files are not in the script's folder. Run the mkcert commands from step 2 in the websocketd folder.

In the app

MessageCause and fix
Waiting for browser permissionAllow the browser's prompt to access apps on this device.
Local access is blockedRe-allow this site in the browser's site settings under Local network, then press Retry.
Can't reach the external enginewebsocketd is not running (the window was closed: start the script again), the port in the URL differs from --port, or the origin was rejected. The websocketd window shows which.
Connected, but not a UCI engine, or not respondingThe script points at the wrong program. Run the engine directly in a terminal and type uci: a UCI engine prints uciok.
Lost the connectionwebsocketd was stopped or the engine crashed. Start the script again and press Retry.
Can't reach the external engine, with a wss:// URLThe certificate is not trusted: run ./mkcert -install again, then quit and reopen Safari. Or the URL scheme does not match the script: --ssl needs wss://, and without it the URL must use ws://.

© 2026 Chessa.io. Your chess database, in the cloud.