plate website

Installing Prosody in Termux

I wanted to try out Slidge on my phone, and that would need an XMPP server, so I chose Prosody.

Termux doesn’t have packages for Slidge or Prosody, they need to be installed by hand. These are notes and they don’t cover conrig.

Prosody

  1. Update and install the dependencies:
pkg install lua54 libicu openssl luarocks libunbound wget build-essential openssl-tool
echo lua{unbound,sec,filesystem,socket,expat} | xargs -n1 luarocks install --lua-version=5.4

Note: openssl-tool is for Prosody’s Makefile to generate example certs.
wget is just handy for downloading Prosody.

  1. Get a source tarball and extract it.
wget https://prosody.im/downloads/source/prosody-0.12.4.tar.gz
tar xf prosody-0.12.4.tar.gz
cd prosody-0.12.4/
  1. Build!
./configure --with-lua-lib=$HOME/.luarocks/lib/lua/5.4/ --prefix=$PREFIX 
make
make install

For Lua 5.4, luarocks installs to ~/.luarocks. This may mean the package didn’t create the usual directory for libraries, so point configure to them.

If you prefer to run Prosody from the build directory, you can leave out --prefix=$PREFIX and make install.

  1. Configure Prosody. You can copy prosody.cfg.lua.dist to prosody.cfg.lua and go from there.

I would explain how I used Slidge, however I still need to figure out clear steps. The hardest part is getting cryptography and c-ares to install when using pipx, but I forgot what I did :(