chesssnake docs

A chess server you host yourself

chesssnake is a self-hosted chess server for bots and small communities, and a Python chess library. Rules, board images, accounts, a REST API, live updates and a web UI come in one container or one pip install, with no third-party chess accounts needed.

A game in the web UI: drawing arrows on the board, making a move, and the opponent's reply arriving live

Start here

Four ways to use it

  How Needs
Browser Open the server’s address and log in. See In the browser. a server
Terminal chesssnake play. See In the terminal. nothing for an offline game; a server to play others
Python Game.local(...) in your own process, or Game.remote(...) on a server. See Python library. pip install chesssnake
REST Plain HTTP from any language. See REST API. a server

All four share the same rules and the same games, so a game started in the terminal can be continued in the browser, or by a bot.

What it does

  • Full rules: castling, en passant, promotion, checkmate, stalemate, and draws by threefold repetition, the fifty-move rule and insufficient material.
  • The server owns the rules, so a client cannot cheat and a frontend in any language needs no chess logic of its own.
  • Board images of any position, from one side or both, with the last move highlighted.
  • Standard formats in and out: FEN, PGN, SAN and UCI moves.
  • Live updates: every board shows a move the moment it is made.
  • Accounts with passwords and api tokens, and an admin panel to manage them.
  • SQLite or PostgreSQL. SQLite needs no database server at all.

Pronounced “chess-snake”, after Python being a kind of snake. Not cheesecake.

chesssnake is in alpha. Until 1.0.0 a new version may change settings or need the database recreated; the changelog says when. See Upgrading and backups.

Getting help