Migrate from the reference PDS
LinkJar PDS can serve a data directory the reference server wrote, with
the existing pds.env. Check a restored copy before switching the running
server. Database compatibility alone does not make an older image a safe
rollback target.
This page assumes the reference server’s installer: the data at /pds,
the settings in /pds/pds.env, and a systemd unit named pds that runs
its Compose file.
Before the switch
Section titled “Before the switch”-
Take a cold backup of
/pds. -
Get the Compose files onto the host, as in the install, and write
.envwith the image andPDS_DATA_PATH=/pds. -
Make
pds.envfrom the reference server’s:Terminal window sudo cp /pds/pds.env pds.env && sudo chown $USER pds.env && chmod 600 pds.envChange the two paths to where the Compose file mounts the directory:
PDS_DATA_DIRECTORY=/app/dataPDS_BLOBSTORE_DISK_LOCATION=/app/data/blocksLeave every other line as it is. The JWT secret, the rotation key, the admin password and the SMTP settings must stay: sessions and the DIDs of the accounts depend on them.
-
Check the configuration:
Terminal window docker compose run --rm pds linkjar-pds check-config
The switch
Section titled “The switch”-
Stop the reference server. Two servers must never serve one data directory.
Terminal window sudo systemctl disable --now pds -
Check the data directory.
verifyreads every account and prints a summary that ends withdifferences 0:Terminal window docker compose run --rm pds linkjar-pds verifyA difference is a fact about the data, not about the switch. Stop here and start the reference server again until you understand it.
-
Seal the history for the audit log, if you have set its key:
Terminal window docker compose run --rm pds linkjar-pds audit seal -
Start.
Terminal window docker compose up -dCaddy starts with an empty certificate store and fetches a certificate for the server’s name at once, and for each handle at its first request.
-
Check it from outside. The relay resumes at its cursor; its status for the host goes back to
activewith the first write.
Plan for rollback
Section titled “Plan for rollback”Prefer a forward fix or a validated build that retains LinkJar’s recovery
checks. This release adds a credential_epoch table to the shared account
database and a blob-reference index to actor databases. The reference
migration ledger stays unchanged, and older servers can read the layout.
The reference server and older LinkJar images do not enforce credential epochs or the member host’s live session check. They can accept revoked, unexpired legacy tokens after password recovery. Read the update and rollback guidance before choosing an older image.
Keep the current account database and credential_epoch in backups and
copies. Do not restore a pre-recovery account database to undo the switch:
that can restore old passwords, credentials, and access. Preserve
audit.sqlite and ops.sqlite as well.
