Prosody depends on other applications or libraries to allow certain functionality.
This page describes the different runtime dependencies we have, what they are for, and how to get hold of them if you don't have them.
Note: If you are trying to build Prosody from source then you will need additional dependencies, please see Installing from source for a short how-to.
Used for: SSL/TLS support
Required version: 0.3.3+ (0.4.1+ strongly recommended) (0.5 needed for some features)
LuaSec is technically an optional dependency, but is strongly recommended in order to ensure secure communications.
Our Windows packages include LuaSec: Windows packages.
Check your Linux distribution for packages for LuaSec. Alternatively we have packages for:
On Mac OS X you can use Homebrew to install LuaSec:
brew install http://prosody.im/files/homebrew/luasec.rb
You can also download the source from the LuaSec link above, it is not hard to build, and requires just liblua5.1 and libssl to compile. Have a look at the known to work Makefile configurations.
Some features in Prosody 0.9 and later require features that are in LuaSec 0.5, which might not be in your distribution yet. See luasec-prosody below for an alternative.
The newly released LuaSec 0.6 does not work with Prosody 0.9.x, and has issues with Prosody 0.10. Stay on LuaSec 0.5 or use 0.7
For certificate authentication (supported in Prosody 0.9+) and some other features to work, you need LuaSec 0.5. We had made these changes available in a separate package, luasec-prosody which can be used in the meantime until your distribution ships LuaSec 0.5.
Optional (Prosody 0.7+ only)
Used for: Efficiently scaling above hundreds of concurrent connections in Prosody 0.7 and above
Required version: luaevent 0.3.2+ (0.4.3+ recommended) with libevent 2.0+
LuaEvent is an optional dependency you should install if you intend your server to be handling large numbers of concurrent connections. Information on how to configure Prosody in this instance can be found here.
Users on Debian/Ubuntu with our Prosody package repository added can install luaevent or luaevent-prosody like so:
sudo apt-get install lua-event
This will automatically install libevent if you don't have it. It is not recommended to use libevent versions before 2.0.
Users on Mac OS X can use homebrew to install LuaEvent:
brew install http://prosody.im/files/homebrew/luaevent.rb
Optional (Prosody 0.6+)
Used for: Compressing XMPP streams when mod_compression is enabled
Required version: brimworks version 0
This module is used only by mod_compression. It is important to note that there are currently two zlib libraries for Lua. Prosody supports only the 'brimworks' module from github (as it presents an interface better suited to our use).
sudo apt-get install lua-zlib
You should have lua-zlib already, and don't need to do anything.
If you use another platform that doesn't have packages for lua-zlib yet then you will need to compile from source, which can be found at http://github.com/brimworks/lua-zlib.
Optional (Prosody 0.8+)
Used for: SQL database support (SQLite3, MySQL, PostgreSQL)
Required version: 0.5+
This module is used by mod_storage_sql for connecting to SQL databases.
Simply install the package 'lua-dbi-DATABASE', where DATABASE is one of:
If the package isn't found in your distribution, you may need to add our package repository to your system.
If you use another platform that doesn't have packages for LuaDBI yet then you will need to compile from source, which can be found at http://code.google.com/p/luadbi/downloads/list.
Used for: Efficient bit-level manipulation.
Used by mod_websocket
There two alternative bit-op modules.
bitbuilt in, which is available for Lua 5.1 as
lua-bitopin Debian / Ubuntu.
bit32for Lua 5.1 is available in LuaRocks
Used for: Accepting and making network connections
Required version: 2.0.x
Debian and Ubuntu users can easily install LuaSocket with apt-get, simply run:
sudo apt-get install lua-socket
BSD and users of other Linux distributions have reported success using luarocks to install the 'luasocket' rock.
Used for: Parsing XML/XMPP streams
Required version: 1.2.x+, 1.3.x+ recommended
LuaExpat is bundled with our Windows packages, but you may also find it on the LuaExpat homepage.
Debian and Ubuntu users can easily install LuaExpat with apt-get, simply run:
sudo apt-get install liblua5.1-expat0
BSD and users of other Linux distributions have reported success using luarocks to install the 'luaexpat' rock.
Although Prosody works with versions of LuaExpat prior to 1.3, they leave Prosody open to denial-of-service (DoS) attacks. Prosody will warn if this is the case and it is strongly recommended you upgrade, or disable mod_compression (note: it is disabled by default). If you do not see the warning in your log file, you are not vulnerable (e.g. Debian stable has 1.2.0 but with patches to resolve the issue).
Used for: Managing Prosody's data store and permissions
Required version: 1.6.2 or higher, or Debian's
LuaFileSystem is automatically installed by our packages, but if you find yourself without it for some reason it is easy to obtain. Debian/Ubuntu users can run the following command to install it:
sudo apt-get install lua-filesystem