Skip to content

Recovery key

A backup holds your API keys, tokens and the SMTP password — but only in encrypted form. The key that decrypts them is not in the backup. That is deliberate: an archive that carried its own key would hand every credential to whoever holds a copy.

The price: if the server is lost together with its key, the restored data has credentials nobody can read. The recovery key is that key, kept by you somewhere else.

Only administrators, and only when the instance has an off-site backup target (a WebDAV copy). Until the key is saved and confirmed, an administrator sees a dialog after sign-in and on every page load: Ohne gesicherten Schlüssel geht es hier nicht weiter. Other accounts never see it. Backups keep running meanwhile; nothing else is paused.

If the key changes later, the old confirmation no longer counts and the dialog returns.

  1. The dialog (or Einstellungen → Server → Sicherungen → Wiederherstellungsschlüssel) first asks you to prove it is you: password, plus the code from your authenticator app if you use two-factor, or a passkey.
  2. TravStats shows the key once, in groups of four characters. Kopieren or Als Datei herunterladen. Store it outside this server — a password manager is best.
  3. To confirm, type the last four characters. TravStats never takes the whole key back.

A backup kept on the same machine does not survive losing that machine. The key is the half that lets an off-site backup be read again.

Restoring an archive written by another instance key normally asks you to accept that stored credentials stay unreadable. With the key, choose Mit Schlüssel zurückspielen and paste it (spaces do not matter, 64 characters from 0–9 and A–F).

TravStats checks the key against the archive before it writes anything, asks for your password again, and installs the key just before the database is replayed. If it does not fit, nothing is restored and the message says so. If the server’s key is pinned by the ENCRYPTION_KEY environment variable, set the recovery key there, restart, and restore afterwards.

If the key swap is interrupted, the Einrichtung & Zustand page says so; the server log names the previous key file.