Skip to content

Upgrading on Linux

jozef2svrcek edited this page Jul 1, 2026 · 2 revisions

Upgrading on Linux

How to upgrade an existing LPDO install on Linux to a newer build while keeping your database.

Newer builds run 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

Older builds kept the database in your home profile at:

~/.chess-db/chess.db

So if you are upgrading from a build that stored the database in your home directory, you need to move that file into the server's location once, after installing the new packages. (If your database is already under /var/lib/lpdo, there is nothing to migrate — just install the new packages.)

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

1. Install the new build

Install the .deb packages from the 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).

Clone this wiki locally