Skip to content

Upgrading on Linux

jozef2svrcek edited this page Jul 1, 2026 · 2 revisions

Upgrading on Linux

Applies to: upgrading to v0.5.0 or later from any earlier version, on Linux.

Starting with v0.5.0, LPDO runs the database as an always-on system service (lpdo-server) under a dedicated lpdo user. That service keeps the database at:

/var/lib/lpdo/.chess-db/chess.db

Versions before v0.5.0 kept the database in your home profile:

~/.chess-db/chess.db

Because the location changed, when you upgrade from a pre-v0.5.0 version you must copy your database across once. If you don't, v0.5.0 starts with a fresh, empty database at the new location and your existing games will not appear after the upgrade.

Your data is not lost

The upgrade never touches your old database — it stays exactly where it was, at ~/.chess-db/chess.db. So if you've already upgraded and your games are missing, nothing is gone: just run the steps below now to bring the old database over, and your games reappear. The steps work equally well before or after upgrading.

The database is a single file (chess.db). Copying it preserves all of your games, players and collections.

1. Install v0.5.0

Already upgraded and just recovering your games? Skip to step 2.

Install the .deb packages from the v0.5.0 release. Installing all of them in one command lets the dependencies resolve:

sudo apt install ./lpdo*_amd64.deb

This installs lpdo-cli (the chess-db binary), lpdo-server (the systemd service), and lpdo (the desktop app).

2. Stop the server

The database must not be open while you copy it:

sudo systemctl stop lpdo-server

Also close the LPDO desktop app if it is running.

3. Copy your database to the server's location

# Create the server's data directory.
sudo mkdir -p /var/lib/lpdo/.chess-db

# Copy your existing database across.
sudo cp ~/.chess-db/chess.db /var/lib/lpdo/.chess-db/chess.db

# If a write-ahead log is present, copy it too.
[ -f ~/.chess-db/chess.db.wal ] && sudo cp ~/.chess-db/chess.db.wal /var/lib/lpdo/.chess-db/

# Hand ownership to the lpdo service user — required, or the server can't read it.
sudo chown -R lpdo:lpdo /var/lib/lpdo/.chess-db

~/.chess-db expands to your home directory. If your database lived somewhere else, adjust the source path accordingly.

4. Start the server

sudo systemctl start lpdo-server

5. Verify

systemctl status lpdo-server           # should be "active (running)"
curl -s http://localhost:7777/status   # shows the game/player counts from your database

Or just open the LPDO app — your games should be there.


Notes

  • Bring cached downloads too (optional). Your games all live in chess.db, so copying that one file is enough. If you also want to carry over cached source downloads (TWIC zip archives, etc.), copy the whole directory instead of the single file:
    sudo cp -a ~/.chess-db/. /var/lib/lpdo/.chess-db/
    sudo chown -R lpdo:lpdo /var/lib/lpdo/.chess-db
  • Custom data location. If you run the server with LPDO_DATA_DIR set, its database is at $LPDO_DATA_DIR/.chess-db/chess.db instead — copy there, and match that directory's ownership.
  • Confirm the source path. Unsure where your old database is? The app's Maintenance panel shows it, or run chess-db serve builds report it via http://localhost:7777/status (the db_path field).