prosodyctl commands and examples
Written by Simone
prosodyctl shell
Launch the shell:
# prosodyctl shell
Delete pubsub node (the ">" sign at the beginning is important and also dangerous, as it lets you do anything!):
>prosody.hosts["pubsub.example.tld"].modules.pubsub.service:delete("blog", true)
Delete ALL pubsub nodes
>local service = prosody.hosts["pubsub.example.tld"].modules.pubsub.service; for node in pairs(select(2, assert(service:get_nodes(true)))) do service:delete(node, true); end
Check subscription by user:
>prosody.hosts["pubsub.example.tld"].modules.pubsub.service.subscriptions["user@example.tld"]
Change affiliation on pubsub nodes (make user owner):
>prosody.hosts["pubsub.example.tld"].modules.pubsub.service:set_affiliation("blog",true,"user@example.tld","owner")
Unsubscribe from node
>prosody.hosts["pubsub.example.tld"].modules.pubsub.service:remove_subscription("blog",true,"user@example.tld")
Subscribe to node
>prosody.hosts["pubsub.example.tld"].modules.pubsub.service:add_subscription("blog",true,"user@example.tld")
prosodyctl commands
Asking for help:
# prosodyctl shell help
# prosodyctl shell 'help SECTION'
Show all listening ports:
# prosodyctl shell port list
Show all http endpoints:
# prosodyctl shell http list
List registered users:
# prosodyctl shell user list example.tld
List existing MUCs:
# prosodyctl shell muc list [component name]
List connected clients:
# prosodyctl shell c2s show
Activate a component:
# prosodyctl shell host activate some.component.example.tld
Generate Invites: create a new invite using an ad-hoc command in an XMPP client connected to your admin account, or use the command line:
# prosodyctl mod_invites generate example.tld
Reset forgot passsword: "doesn't seem to work - see below"
# prosodyctl mod_invites generate example.tld --reset <USERNAME>
Automatic Certificates Import: prosodyctl has the ability to import and activate certificates in one command:
# prosodyctl --root cert import HOSTNAME /path/to/certificates
Certificates and their keys are copied to /etc/prosody/certs (can be changed with the certificates option) and then it signals Prosody to reload itself. –root lets prosodyctl write to paths that may not be writable by the prosody user, as is common with /etc/prosody. Multiple hostnames and paths can be given, as long as the hostnames are given before the paths.
This command can be put in cron or passed as a callback to automated certificate renewal programs such as certbot or other Let's Encrypt clients.
Import All:
# prosodyctl --root cert import /etc/letsencrypt/live
Reset forgot password
# prosodyctl install --server=https://modules.prosody.im/rocks/ mod_password_reset
Reload prosody configuration then use ad-hoc commands to generate a reset link for given JID
Some news for XMPP: support MUC and anonymous login
Written by Simone
Night tinkering..
Written by Simone
I am most productive at night, when there is finally silence - apart from background music. The last couple hours of this Wednesday brought some nice additions to the @wpn support MUC:
- chat is not XMPP only anymore, but it got bridged to Matrix, via "matterbridge".
- a bot is now sending "BOFH excuses" to the chat, once a day.
XMPP MUC can be reached from: https://invite.woodpeckersnest.space/#status@chat.woodpeckersnest.space?join
Matrix room can be reached from: https://matrix.to/#/#wpn:matrix.org
Bridged chat means that everything being written in any of those rooms, gets relayed to the other by bots: there are in fact 2 bots connected to the 2 rooms, one is an XMPP bot and the other is a Matrix one, operated by "matterbridge", as I said earlier.
About "BOFH excuses", they are some fortune cookies from the relative Linux package, which are all about "Bastard Operators From Hell" excuses.. They are some short funny sentences about IT which an imaginary Operator (sysop, sysadmin, you name it) could say as excuse to justify issues.
Example?
BOFH excuse #266:
All of the packets are empty.
I have the same script running on gemini, at gemini://woodpeckersnest.space/cgi-bin/bofh
Basically it's some python spaghetti which runs the fortune
command, does some formatting to the resulting text and sends it over gemini, or in the case of @wpn chat, over webhook to one other bot, which then posts its content to XMPP. It's more complicated to explain than do it 😀
P.S. @wpn support MUC is not publicly listed, so even if I'm posting links which may be used to join it, it should be treated as limited to @wpn users only.
It was about time!
Written by Simone
@wpn onboarding: updates
Written by Simone
I was running 2 separate apps for shell/XMPP account registration at @wpn, so far..
This night I made some changes to the original code (provided by Schimon) and I got just one app with account choice - meaning that you must choose what account type you want in the form. Shell accounts are for friends only, as it's always been.
As a consequence of that, I shut down the old address for XMPP account onboarding and left only the main one, which is:
Summer Recap at WPN
Written by Simone
I'm always a bit busy when it comes to pandora
(the VPS running WPN: woodpeckersnest.space/eu
). I like experimenting new things, fixing/improving existing things.. I cannot stay still 😀
After migrating the homepage to homarr
- which took really no time for the initial setup, but a lot of work afterward to fix layouts for mobile devices and non-full-hd screens for desktop PCs - I started messing up with a brand new toy: gemini!!
Not even a week since I installed molly-brown
, the actual gemini server, to today, I can count lots of improvements..
- Installed terminal gemini browser client
amfora
for wpn's shell users and alsogtl
, a tinylog reader, always for the shell. - Configured a local tinylog which groups together all wpn's capsuleer tinylogs, so it's easy to follow all of the local server users in one single place; the log is generated by
gtl
itself, refreshed and published every 5 minutes: can't miss a thing! - Initially configured
gemlog mentions
starting from a script by @bacardi55, who is the author of many gemini-related things, like the before mentionedgtl
software. When I realized it lacked multi-capsules support, I started modifying it and came up with some spaghetti code, which is working surprisingly well and it was deployed earlier today.
Onboarding on WPN didn't go as well as I thought, but at least the first user (hey, Mario, I'm looking at you! :) registered and, I believe, everything is working fine for them! On this topic, the onboarding page was migrated from PHP and Email to Python and XMPP, thanks to my friend Schimon! He also kept the UI pretty much intact, so I think most people who looked at it before and after, wouldn't even notice the changes under the hood.
https://hello.woodpeckersnest.space/
Something else I've been doing was setting up: https://invite.woodpeckersnest.space/
which is a landing page to allow people to join an XMPP MUC or add an XMPP contact from a web interface, which will also guide them in choosing a client for their platform. It's rather simple but very useful at the same time.
The chatmail
server was upgraded (more or less) at the beginning of August and running smoothly so far; it got some cool new improvements like automatic account deletion after #amount of days from last login and lots of fixes. Total number of registered accounts, so far, is 117.
https://chatmail.woodpeckersnest.space/
Services which I dismissed include:
Jitsi Meet
(wasn't really using it and it was wasting quite a lot of resources just to be running)Isso
comments service, which powered the old homepage contact section and also ashaarli
instance, which is still running but it's more a private thing, rather than a public one.
One more proposition: from now on, I will be publishing these (B)log posts in both protocols, HTTP here as you're reading and gemini on roughnecks' gemlog. I will be probably publishing less often than usual though, at least in this format, and send more status updates through the tinylog on WPN, the microlog at Station and my fediverse account.
In the next days I will be monitoring how everything goes and relax a bit, if I manage.. Today I didn't feel so good after a few stressful days, too much computing and too less sleep hours - it's 01:40 AM right now, so yeah, tomorrow will be another of “those” days, I guess.
Slixfeed News Bot Home
Written by Simone
Hello, do you remember about Slixfeed? Talked about that here a while ago.
Schimon, the bot's author, chose woodpeckersnest.space
to host a new home for it and I was am very happy about that 😀
More to that, he also decided to move Slixfeed's source repository from "gitgud.io" to the Italian XMPP-IT Community GIT server - even if we're not sure everything will be migrated (WIP). Oh, I also want to mention the other XMPP-related projects which Schimon also moved to our community server, which you should check out!
Thanks Schimon for trusting us with your work. Keep it up!
Now, links!
- Slixfeed Homepage - also linked in this post's title
- schimon's GIT profile
- Slixfeed repository
- XMPP support room for Slixfeed
- XMPP-IT main chat room
- XMPP-IT Homepage
Finally, I would like to remember you that the XMPP-IT Git server is not open to registrations, but if you want an account there to post your work (we only accept XMPP-related stuff!), you can request an account to one of the XMPP-IT admins or by sending an email to "admin [at] xmpp-it [dot] net" with desired username; we'll use that email address of yours to register the account and will set a password for you, to be changed at first login.
Thanks, bye 😀
XMPP Network Graph
Written by Simone
Slixfeed RSS XMPP BoT
Written by Simone
Interesting project, features' rich and almost complete. Thanks goes to its main developer Schimon AKA "sch".
Here is the support room