Where Does privacyIDEA Store Tokens?
Where self hosted privacyIDEA keeps tokens in database on Linux servers. Full paths are listed below.
Last updated
privacyIDEA is MFA server with database storage. The database holds tokens, users, and policies. The encryption key file sits beside config. The release version matters for restores.
Same database plus key means same tokens. Exact paths vary by distro packages with pi.cfg deciding roots. Keep backups of both together. One without the other restores users without working tokens. For moves, stop services first to avoid partial dumps. When in doubt, verify paths inside the app before trusting a remembered folder.
Where privacyIDEA Auth stores this, by platform
/var/lib/privacyidea (database plus key file, paths vary)
Tokens live in the server database with the key file beside config. Back up both together stopped. Match releases before restore. Key file belongs offline too.
Frequently asked questions
How do I migrate privacyIDEA to a new server?
Back up the privacyIDEA database plus encryption key file with services stopped, then install the same release on the new server before restore. Tokens follow the database. Mixed releases can refuse old schemas, so match versions first. Keep the key file offline too.
Does privacyIDEA back up token history?
Yes, in the server database per token with event history attached. The host holds a working copy plus audit logs. Views rebuild after restore. Export CSVs from admin settings for records, since the data directory alone is working state.
Notice an outdated path? Let us know.