What a good news !
Prosody is basic but really easy to configure and set up.
For me, it's the simplest of all, its configuration takes only 2 minutes.
If someone manages to get ejabberd and jabberd working on pkgsrc, I'm interested!
I've spent a lot of time on both, but I've never managed to get them working
It seems to me that the packages are broken.
Prosody is working.
Just for the try :
We will set up a test XMPP server on OmniOS with 2 users (user1 and user2), the ability to create groups for users, and the ability for both users to exchange files.
For testing purposes, we will generate a self-signed SSL certificate (but it's easy to specify a real certificate and domain).
The server has the IP address 192.168.95.31 for our test.
Let's get started!
1) Installing the pkgsrc repository
(switch to root)
The commands block below is a summary of the guide available here :
[https://pkgsrc.joyent.com/install-on-illumos/]
Copy/paste the following commands block into a shell:
cd /tmp && BOOTSTRAP_TAR="bootstrap-trunk-x86_64-20240116.tar.gz" && BOOTSTRAP_SHA="4d92a333587d9dcc669ff64264451ca65da701b7" && curl -O https://pkgsrc.smartos.org/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR} && tar -zxpf ${BOOTSTRAP_TAR} -C / && sed -i 's/PATH=\(.*\)/PATH=\1:\/opt\/local\/sbin:\/opt\/local\/bin/' /etc/default/login && cd /tmp && UPGRADE_TAR="bootstrap-trunk-x86_64-20240116-upgrade.tar.gz" && UPGRADE_SHA="3099211460e84c34b9f558c8f7354a871187be41" && curl -O https://pkgsrc.smartos.org/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR} && tar -zxpf ${UPGRADE_TAR} -C / && echo 'PATH=/opt/local/sbin:/opt/local/bin:$PATH' >> /etc/profile && echo 'MANPATH=/opt/local/man:$MANPATH' >> /etc/profile
alias pkg_add=/opt/local/sbin/pkg_add ; alias pkgin=/opt/local/bin/pkgin
pkg_add -U pkg_install pkgin libarchive && pkgin clean && pkgin -y upgrade
Close your root session and reconnect as root to reload the PATH
2) Installing Prosody
pkgin -y in prosody
pkg install nano
3) Configuring Prosody
- Make a backup of the configuration file:
cp /opt/local/etc/prosody/prosody.cfg.lua /opt/local/etc/prosody/prosody.cfg.lua.BAK
- Now edit the prosody configuration file:
nano /opt/local/etc/prosody/prosody.cfg.lua
- Scroll to the end of the file and add the following block:
-- CONFIGURATION:
VirtualHost "192.168.95.31"
enabled = true
ssl = {
key = "/opt/local/etc/prosody/certs/192.168.95.31.key";
certificate = "/opt/local/etc/prosody/certs/192.168.95.31.crt";
}
Component "conference.192.168.95.31" "muc"
Component "share.192.168.95.31" "http_file_share"
- Generate the self-signed SSL certificate:
We've already specified it in the configuration but not created it yet!
prosodyctl cert generate 192.168.95.31
By default, the created certificates will be placed in /var/db/prosody/certs.
We need to move them:
mv /var/db/prosody/* /opt/local/etc/prosody/certs/
4) Create users
prosodyctl register "user1" "192.168.95.31" "password-user1"
prosodyctl register "user2" "192.168.95.31" "password-user2"
5) Start Prosody
svcadm enable svc:/pkgsrc/prosody:default
- Check if Prosody is running:
svcs prosody
For the XMPP client software Spark, modifications are needed to connect when using a self-signed certificate on the server (as in this tutorial). (But you can use Conversations (android), Psi, Psi+ (windows), Pidgin etc..)
Launch the software. An authentication prompt appears.
- Enter the username: user1
- Enter the domain: 192.168.95.31
- Enter the password "password-user1"
- Check "Save Password"
Do not click "Connect" now!
Click on Advanced:
- Security tab: check "Disable certificate hostname verification"
- Certificates tab: check "Accept self-signed"
Click OK at the bottom to return to the login page.
Click Connect and accept everything.
(off course, it's just for testing purposes)