Running Prosody on LuaJIT

LuaJIT is an alternate implementation of a Lua interpreter that does tracing Just-In-Time compilation. Running Prosody on LuaJIT can be an attractive option in order to squeeze some extra performance out of your server.

On Debian/Ubuntu

If you installed Prosody from our package repository, you can switch to LuaJIT by editing /etc/default/prosody and adding a line like this:


Built from source

When building from source, you can specify a runtime as an argument to configure.

For example:

./configure --runwith=/usr/local/bin/luajit

The scary way

As a last resort, you can edit the prosody executable and replace the shebang, by changing

#!/usr/bin/env lua


#!/usr/bin/env luajit