Archive storage
Keep the archive in the bundled SQLite file, or move it to PostgreSQL, MySQL, MariaDB or SQL Server.
SQLite is built in and needs no setup. To use a database server instead, open Settings → Archive storage, choose an engine and enter the path to a private file containing the connection details. Use a separate empty database for each person's archive.
Move with the CLI
psms storage check postgres --connection-file /private/psms-connection.txt
psms storage activate postgres --connection-file /private/psms-connection.txt
psms storage statusEngines are postgres, mysql, mariadb and sqlserver. The connection file holds a PostgreSQL or MySQL URL (MariaDB uses the MySQL format), or a SQL Server ADO connection string. Use a dedicated database account, restrict access to the file and use verified TLS over a network. Keep the file at the same path afterwards.
For a service run by systemd, stop it, run psms storage switch ENGINE --connection-file PATH with the same archive path and user, start it again and check /readyz. The switch verifies the copied rows before using the new database. If it's interrupted, run it again with the same destination.
After moving
The old SQLite file is kept. Send yourself a test text and open an older message to confirm everything works. Back up the SQL database together with the settings files next to the archive (.settings.sqlite3 and .storage.json) and the connection file. Keep PSMS_DB_PATH the same even if you move the old SQLite file away.
Connect a self-hosted archive to papamo.dev
Keep your archive at home and add papamo.dev on top: phones that need no tunnel, an encrypted off-site backup, and the web inbox. Included in Plus and Enterprise.
Sync between archives
Copy a self-hosted archive's encrypted messages to a second computer, or into your own database through a sync webhook.