Linux

Where Does Prosody Store Config and User Data?

Prosody keeps server config in prosody.cfg.lua with user data in a data path. Package, source and log locations.

Last updated

Prosody keeps its entire server configuration in one Lua file: /etc/prosody/prosody.cfg.lua on package installs, /usr/local/etc on Homebrew Macs, beside the executable for source runs. User accounts, rosters and message archives live separately in the data path, usually /var/lib/prosody. Logs default to /var/log/prosody.

The config is Lua code with a .dist example template, so syntax errors fail the whole server; prosodyctl check config exists for exactly this. Certificates sit in a certs directory relative to the config. Storage defaults to flat files in the data directory with SQL backends optional. This covers the server; client apps keep their own separate homes. Linux-first post.

Where Prosody stores this, by platform

Linux
/etc/prosody/prosody.cfg.lua

Single Lua config file; validate edits with prosodyctl check config. Data store defaults to /var/lib/prosody with accounts and archives; logs in /var/log/prosody; certs in certs beside the config. Source installs default data to ./data and Homebrew Macs use /usr/local/etc. Back up config plus data together.

Frequently asked questions

how do i move prosody to a new server

Copy /etc/prosody/prosody.cfg.lua plus the data directory (usually /var/lib/prosody) to the new machine, preserving ownership by the prosody user. Accounts, rosters and offline messages travel in the data store. Certificates in certs need moving too or TLS breaks. Validate with prosodyctl check config before starting.

why does prosody fail to start after editing config

Run prosodyctl check config. It reports syntax errors with locations instead of a silent failed start. The file is Lua, so a missing comma or end breaks everything after it. The example config with .dist extension shows correct structure for comparison.

where are prosody user accounts stored

Create accounts with prosodyctl adduser; the config file holds no passwords. Admins list in the config names which accounts administrate, but credentials live in the data store. Registration modules can optionally let users self-register; otherwise the command line is the only route.

Notice an outdated path? Let us know.