Interim blog setup, rough notes being dumped here at the moment - I'll tidy once I get to a milestone. And sorry about the layout, that'll probably take even longer to get around to... #TODO

ejabberd Notes

Published on 2023-08-30 by @danja

danbri mentioned XMPP (for ChatGPT) yesterday, it appears I have ejabberd installed. Is it running?

Browser-based client :

https://conversejs.org/docs/html/quickstart.html

Pro-tip, if you just want to quickly test things locally, you can run make serve inside a checkout of the Converse repo. Converse is then hosted at http://localhost:8000

} from '../../../node_modules/lit/html.js'; // } from './html.js'; danny

cp node_modules/lit/html.js src/headless/utils/

grr, hateful thing, given up.

Installed gajim (via synaptic) instead

no immediate joy (where to cofig servers?)

Installed pidgin

isn't connecting - the Enabled box for the account unchecks itself

Active: activating (start) since Wed 2023-08-30 11:13:37 UTC; 3min 22s ago
...
Aug 30 11:15:27 localhost sh[443214]: 2023-08-30 11:15:27.334892+00:00 [error] Cannot ping watchdog: {badmatch,{error,eacces}}

looks like the install is old, I think done from .deb So,

Unpacking ejabberd (23.04-1) over (21.12-1) ...
...
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.

Oops!

Grrr, Cannot ping watchdog again.

Google...

https://askubuntu.com/questions/1411679/ubuntu-22-04-ejabberd-apparmour-profile-broken

Description=A distributed, fault-tolerant Jabber/XMPP server
Documentation=https://www.process-one.net/en/ejabberd/docs/
After=epmd.service network.target
Requires=epmd.service

[Service]
Type=forking
User=ejabberd
Group=ejabberd
LimitNOFILE=65536
Restart=on-failure
RestartSec=5
ExecStart=/bin/sh -c '/usr/sbin/ejabberdctl start && /usr/sbin/ejabberdctl started'
ExecStop=/bin/sh -c '/usr/sbin/ejabberdctl stop && /usr/sbin/ejabberdctl stopped'
ExecReload=/bin/sh -c '/usr/sbin/ejabberdctl reload_config'
PrivateTmp=true
ProtectHome=true
ProtectSystem=full
TimeoutSec=300

[Install]
WantedBy=multi-user.target

Active: active (running) since Wed 2023-08-30 11:47:14 UTC; 33s ago

Yay!

From pidgin :

danja@hyperdata.it/ disconnected
Host Unknown

Port problem? Whatever, enough of that for now.


Hah! The second I returned to Lemmy setup, I saw mynotes from when I installed ejabberd last time :

2022-10-27

installed ejabberd

Creating config file /etc/default/ejabberd with new version

Creating config file /etc/ejabberd/ejabberd.yml with new version
Created symlink /etc/systemd/system/multi-user.target.wants/ejabberd.service → /
lib/systemd/system/ejabberd.service.

admin@hyperdata.it

/etc/ejabberd/ejabberd.yml

ejabberdctl reload_config

ejabberdctl register admin hyperdata.it [password]

https://hyperdata.it:5280/admin/

ejabberdctl register danny hyperdata.it [password]
ejabberdctl register device hyperdata.it [password]
ejabberdctl register marinella hyperdata.it [password]

locally
mosquitto_sub -u danny@hyperdata.it -P  [password] -t "test/1" -d -v
new terminal
mosquitto_pub -u device@hyperdata.it -P  [password] -t "test/1" -d -m "ABC"

...Whatever, enough of that for now.