Table of Contents

Data storage

Prosody needs to store a certain amount of data, primarily about users. For example account names/passwords, contact lists, profiles. Starting with Prosody 0.8.0 the storage system became extensible via plugins. We have two plugins that come with Prosody, "internal" and "sql".

Selecting a storage backend

Select the storage backend to load with the 'storage' configuration option. It is not necessary to add storage plugins to modules_enabled - they are loaded automatically on-demand.

Example to use the "internal" storage backend for all stores:

    storage = "internal"

Example to store rosters using "sql", and everything else using the default "internal" backend:

    storage = {
         roster = "sql";
    }

Example to store everything using "sql", except accounts:

    default_storage = "sql"
    storage = {
        accounts = "internal";
    }

Backends

Name Description Archive support
internal Default file-based storage, as in 0.7 and previous. Prosody 0.10 and later
sql SQL database support. Prosody 0.10 and later
null Built-in backend that always fails to load/save data. No
none Backend where all stores are always empty and saving data always fails. No

Additional storage backends are available in from the Community modules project.

Common stores

These are the stores used by core modules. Usually stores will have the same name as the module using it. Community modules may use additional stores.

Store Description Modules
accounts Account details, such as (hashed) password mod_auth_internal_plain, mod_auth_internal_hashed
account_details Extra account details mod_register
roster User contact lists mod_roster, rostermanager
vcard Profile details and avatar mod_vcard
private Private XML storage data mod_private
blocklist Blocked JIDs mod_blocklist
privacy Privacy lists mod_privacy
archive Message archives (0.10+) mod_mam
persistent Set of persistent MUC rooms mod_muc
config Room configuration mod_muc
offline Offline messages (0.10+) mod_offline