jsxc / xmpp-cloud-auth

:key: Authentication hub for Nextcloud+JSXC→Prosody, ejabberd, saslauthd, Postfix
https://www.jsxc.org
MIT License
60 stars 18 forks source link

Arch install instructions #44

Closed kousu closed 5 years ago

kousu commented 6 years ago

Here's what I had to do to get this running on a current Arch, with prosody for the server:

(nb #43 = #43)

mkdir /opt
cd /opt/
git clone --depth 1 https://github.com/jsxc/xmpp-cloud-auth
vim xmpp-cloud-auth/xcauth.py # -> change shebang to say "python2" as noted in #43
cat xmpp-cloud-auth/install.sh 
useradd -c "XMPP Cloud Authentication" -d /var/cache/xcauth -m -r -s /usr/bin/nologin xcauth
mkdir -p /var/{log,lib,cache}/xcauth
chmod 770 /var/{log,lib,cache}/xcauth
chown xcauth:xcauth /var/{log,lib,cache}/xcauth
usermod -a -G xcauth prosody 

cd /usr/lib/prosody
hg clone https://hg.prosody.im/prosody-modules/ community-modules
vi /etc/prosody/prosody.cfg.lua # -> set plugin_paths = {"/usr/lib/prosody/community-modules"} and add "auth_external" to modules {}
sudo pacman -S luarocks5.1
luarocks-5.1 install lpty

vi /etc/prosody/prosody.cfg.lua # -> add authentication = "external"; external_auth_command = "/opt/xmpp-cloud-auth/xcauth.py"

You can test if things are working with

sudo -u prosody /opt/xmpp-cloud-auth/xcauth.py