Libervia progress note 2026-W16
23/04/2026, 15:40 jabber-xmpp-en Libervia project libre Libervia progress progress XMPP
Long time no see!
Wow, I can't believe that the last progress note was 3 years ago, that's crazy! As you can imagine, a lot of things have changed with Libervia since then.
The Audio/Video implementation work has been completed, with direct calls, group calls for small numbers of participants with MUJI (a MESH call, i.e. all participants call each other in P2P), group calls/conferences with SFU (using a component to distribute the audio/video streams selectively, usable for larger numbers of participants) based on the excellent Galène, and even remote desktop control! The last 2 are really experimental at this stage.
The Email Gateway has also been completed, so you can have your email directly in your XMPP client, and mailing lists are converted to XMPP forums. This was also the occasion to work on several nice features such as thread support in Libervia, and "Data Policy", which is a way to indicate how your data are handled by a service.
I've also worked on several specifications, and I'm a member of XMPP Council for the second term.
I'll try to blog in more detail about all that, but for this note, let's focus on more recent work.
There are 3 main things I'm currently focusing on:
- Simplifying Libervia installation and settings
- Focusing on Web frontend to make it fully usable
- working on Serverless and Metadata Reduction for XMPP grant
Simplifying Libervia installation and settings
I believe that one of, if not the main, pain point with Libervia is the difficulty of installing and configuring it. It's a big project, and it has some technical debt due to its age (Libervia, formerly "Salut à Toi", was started before asyncio, the Python standard async platform, existed, before type hints in Python were a thing, and before many other things).
I've made several efforts in the past to improve that, and fortunately there have been nice people to make and maintain packages for Debian (thanks Debacle and other people before him), Arch Linux (thanks to jnanar and others), and NixOS (thanks To NLnet/NGI packaging team).
However those packages have to be maintained, and it should be possible to install the upstream version easily.
In recent years, a new tool, uv, caused quite a stir in the Python community. Packaging has for long been a notorious issue with Python, and even if some great improvements happened over time (such as Poetry or Hatch), uv was a major leap: it's an external tool written in Rust with good engineering, making it really fast; being an external tool, it can install a Python version by itself if it's missing; it follows standards that have been improved a lot in the last few years regarding Python packaging; it's relatively complete, replacing several tools; and it has a handy workflow and virtual environment management.
uv can install and manage python executables (with uv tool commands), or run them for a one-off try with uvx (a command similar to pipx). If you like and want to install it, everything will be in cache, so uv tool install will be instantaneous.
So with that in mind, the goal was to make Libervia installable with a uv one-liner (which should work too with other tools thanks to Python standards).
From Mercurial to Git
The major problem was that uv doesn't support Mercurial as opposed to pip. When Libervia was started, the Git vs Mercurial debate was all the rage, and Libervia ("SàT" at the time) being in Python, Mercurial was chosen. It's a good DVCS, very comparable to Git, but the issue is that more and more tool only support Git nowadays (tools such as ripgrep handle .gitignore but not .hgignore), and people are used to it, even if Mercurial is simpler. I was thinking about moving for quite some time, uv was the last nail in the coffin.
So I had to replace the legacy Mercurial repository, but I want to keep my repositories on my own server, and I don't want to manage yet another external tool. Well, that's a thing that was on the TODO list of Libervia for a very long time: there is already an XMPP decentralised bug tracker, a merge request mechanism; to have a complete forge, we were mostly missing a repository browsing implementation.
So I've implemented it, and now a new "Forge" feature is available in Libervia; you can see my repositories at https://www.goffi.org/forge. The existing ticket management has been integrated there, and you can browse code and individual commits. The merge request system has not been integrated yet as I want to refactor it to a better system. Everything is decentralised, and tickets are XMPP based (the code is decentralised by Git itself, the forge is mostly about rendering it, and serving for git clone).
That's one thing less to maintain (well, for now I keep the legacy Mercurial repository for archive), and if I miss a feature, I can easily add it myself.
Settings
When Libervia started to have settings, at the time, the obvious thing to do was to use the standard lib tools, so ConfigParser, an implementation similar to INI files by Microsoft, was used. While the format is simple, it doesn't support typing, and it's difficult to write complex data such as mappings or multi-line lists. The data were parsed and validated by Libervia, and suffixes such as _path, _port, _dict or _list were used. Also, there is nothing to facilitate documentation.
I've decided to move to TOML as it is the configuration format chosen by Python itself, so there is support in standard lib, and I can be sure that it will be maintained.
My goal was to have settings easy to use, easy to work with as a developer, with validation, type hints, etc.
I've quickly come to Pydantic Settings. Pydantic is a library to handle models with efficient and automatic validation. It's extremely popular in the Python world. The settings package integrates, as its name implies, configuration with Pydantic, and it handles TOML. Furthermore, with Autodoc Pydantic, we have auto documentation from sources.
Thanks to that, Libervia has moved to libervia.toml configuration files, with automatic validation, easy syntax to write complex structures, good typing, support for environment variables and other goodies. It was the occasion to also refactor plugin, component and frontend specific documentation.
This took me a lot of time, as configuration is used in many places, and I had to reorganise things well to have a future-proof design, but I'm very happy with the result.
Dependencies
Another problem, for making installation easier and also compatible with the latest version of Python (3.14), was with some dependencies.
Wokkel ➡ Tx-XMPP
Libervia was heavily based on Wokkel, a library bringing many improvements on top of Twisted's XMPP implementation. It's a great library and a ton of useful work has been done there. Unfortunately, it has been unmaintained for a very long time (last commit in December 2018), and some pull requests we needed were not merged. We were dealing with that with a "temporary" package which was doing some monkey patching in the hope of seeing Wokkel come back to life, but at this point it was clear that we had to move.
So I've made a (friendly) fork of Wokkel called Tx-XMPP with the needed patches and all the changes we did in sat_tmp (the temporary package) integrated. I've dropped Python 2 support which was making the package incompatible with Python 3.14 and latest Twisted, and I'm progressively adding modern type hints and fixing things or adding some features here and there.
That was another weight off my mind, as I don't have to maintain sat_tmp anymore nor do fragile monkey patching.
python-gnupg
Some other dependencies are causing trouble. The official GPGME Python binding, used for "ox" (OpenPGP for XMPP), needs to use the same version as GPG, so they are installed system-wide, which means that we can't totally isolate Libervia in a virtual environment, which is a show-stopper for the uv one-liner that I was targeting (and can bring other conflict troubles). So I've implemented an alternative backend to use python-gnupg instead, which doesn't have the same problem, and I plan to move to PySequoia at some point.
GLib and GStreamer
Another big issue with dependencies were GLib-based ones. Those need to bind to system libraries, and may need to be built. Two major components were using them in Libervia: the D-Bus implementation, and GStreamer.
For D-Bus, Libervia was using dbus-python for legacy reasons. This package doesn't have great design, according to its authors themselves. In the backend, TxDBus, a D-Bus implementation on top of Twisted, was used for quite some time. But for the frontend, it was more difficult because frontends can use various async backends with their own loops (Twisted, Asyncio, GLib, Qt), and dbus-python was used in "blocking" mode in a few places (long story short: that was technical debt, dbus-python could be used to block until a response is received, which is wrong in async code, but was handy before modern coroutines were available).
Tx-DBus is now used in backend and frontend, and dbus-python dependency has been removed.
For GStreamer, it's used for WebRTC implementation (necessary for audio/video calls, and also used for direct streams, notably with file transfer). This one is part of an extra (optional feature), so it's not installed by default (it's needed only for local frontends, the web one uses Web APIs instead). I have learned that they are working on a bundle with a complete GStreamer "distribution". That's great news that will solve the problem, but for now it's not available for GNU/Linux. I'm looking forward to it.
Term-Image
The last package to cause trouble was term-image, which, due to dependencies bounding and not being maintained for a year, is not compatible with Python 3.14. It's used to display audio/video directly in the terminal.
I've disabled it for now, and will probably move to textual-image which is integrated with Rich that I'm using in the CLI.
Bridge
One other big issue with installation was the bridge: by default Libervia uses D-Bus, which is installed and automatically launched in desktop environments. The problem is that it's not the case for most servers, or if you want to run Libervia as a SystemD service. Here, we had to run the D-Bus daemon manually, and run a script to configure it.
I've changed that to add an auto mode which first tries D-Bus, and falls back to Perspective Broker, a Twisted native IPC which can run on Unix sockets.
So in short, no more configuration or issue with Bridge, it's all automatic now!
Components
Another improvement is component configuration: before, you had to use the CLI frontend to set a profile and mark it as a component, and add a flag to make it start automatically with the backend. Now, thanks to the work done on settings mentioned above, it's all automatic and you just have to set jid and secret options in your component settings.
You can check the documentation for details.
Result
With all that in place, installation is now a matter of a one-liner:
uv tool install 'libervia-backend[main] @ git+https://www.goffi.org/forge/goffi/libervia-backend/'
And that's it! You then you can run libervia-backend and use li the short name of libervia-cli.
I'm finishing redesign/refactoring work, and it will soon be possible to run the web frontend in a similar way.
Focusing on Web frontend to make it fully usable
I'll stay short for following section, as the previous one was really long.
So, with the lack of resources (Libervia is a solo-dev project at this point), I've decided to focus on the web frontend for now until it's fully usable, and then take care of the other ones.
I started an architectural redesign of the web frontend several years ago, which is now based on Brython and Jinja templates. After making everything work, I'm on the final step of working on the UI and UX to make it really usable. Most pages are now based on a 3-panel view, with the left one to discover/change chat/blog/etc., the middle one being the main feature view, and the right one usually used for extra information. The goal is to make a feature immediately usable when you click on it.
It's mostly done for chat, blog, and forge. Calls are partially done. Other features should be easier, and will be finished hopefully soon.
The goal is to have a usable web frontend in a matter of weeks, with an alpha release, then beta once all features have been redesigned.
working on Serverless and Metadata Reduction for XMPP
In parallel of the work above, I'm working on my current NLnet/NGI0 grant. It is about reducing metadata in XMPP, and working on a serverless implementation in Libervia, and authoring new specifications when necessary. You can follow the progress on the forge.
Tor
The first step was about integrating Tor to be able to access .onion server, or normal server while hiding IP. This was made possible thanks to txtorcon, a package integrating Tor with Twisted projects. The Tor daemon must be running and configured appropriately.
Tor is automatically activated (if possible, i.e. dependency and daemon available) when a .onion domain is used. Otherwise, it can be activated from settings, as explained in doc.
With the CLI, you can see the circuit used by Tor:
Pubsub Contacts
One of the obvious ways a server can have metadata on somebody is by analyzing their contacts. Currently XMPP uses a "Roster", which is stored in the clear by the server, because it needs it to know who has presence access to whom, and this may be used for things like filtering incoming messages.
Those contacts can have a name, and one or more "groups" (basically a tag to indicate that the contact is "work", "family", "friend", etc.). While handy, those data have obvious privacy implications.
As a step to avoid that, I've authored "End-to-End Encrypted Contacts Metadata" (which will be renamed soon to "Pubsub Contact" following feedback and discussions) which has the official number XEP-0510. With this, a user can (optionally) encrypt their contacts end-to-end, with the trade-off that the server can't access them anymore and then loses presence-related features.
It will also be useful to handle contacts for serverless use cases.
The CLI can retrieve and manipulate those contacts:
Pubsub (re)implementation
Libervia is heavily using Pubsub (Publish Subscribe, a way to store data with permissions management, and subscriptions with notifications). Usually, the Pubsub service is on the XMPP server, so in serverless use-case, it's necessary to have an alternative. That's the first reason to implement a pubsub component in Libervia.
The other one is that there is already a "Libervia Pubsub": many years ago the pubsub implementations in most XMPP servers were really basic. Most XMPP clients are focusing essentially on chat use-cases, so pubsub was not the first place where server teams were putting resources. However, it's necessary to have a good implementation for a client like Libervia, and in addition many features have been added along the way to add features to pubsub which are not yet available in server implementations.
So basically you had either to be blocked by server implementation, maybe choose one and contribute to it (but what about the others?), or to work around missing features by using inefficient or convoluted designs.
So, many years ago, I decided to make my own full-featured pubsub implementation to have everything that Libervia needed. Fortunately there was Idavoll, another project by Ralph Meijer, the author of Wokkel mentioned above (and one of the authors of XEP-0060, the core pubsub specification; many thanks to him and other people who worked on those specs and code).
One of the problems is that there is a special implementation of pubsub, Personal Eventing Protocol, which is a sort of "Pubsub per account", and could only be done by the server itself. So I've authored XEP-0355 (Namespace Delegation) and XEP-0356 (Privileged Entity) to make it possible. Those specifications tell a server "if you see this feature (namespace), just let me handle it", and give permission to do things normally only allowed to the server (like retrieving roster, necessary for presence permissions). I've also done the implementations for Prosody: mod_delegation and mod_privilege. EJabberd did its own implementations, I'm not sure about other servers.
OK now, Libervia Pubsub is working, and is the reference Pubsub/PEP implementation for Libervia. Why reimplementing it?
Well, first, it's a separate project to maintain. And second, it has a lot of technical debt, starting with the database handling which is done directly with PostgreSQL queries, and is difficult to update in case of schema changes.
With Libervia Backend, there was already everything needed to implement a pubsub component, as pubsub is already used by the pubsub cache, and by several components (the ActivityPub gateway and the Email gateway). It uses SQLAlchemy with Alembic, meaning that several database engines can be used (for now SQLite only, but PostgreSQL will be added at some point), and schema updates are easy to do.
Even if large parts were already implemented, it was a massive piece of work, but now there is a full-featured pubsub implementation in Libervia Backend, easy to maintain and update, and it's easy to update the schema.
It's, to my knowledge, the first pubsub service to implement XEP-0496 (Pubsub Node Relationships) and XEP-0499 (Pubsub Extended Discovery). In short, those features let you use tree-like pubsub nodes, which is better for organisation and really useful for forums.
To give you a concrete use case: for the blogging feature (XEP-0472 and XEP-0277), you have one node with the main blog posts, and one extra node per blog post for the comments. If you delete the main blog posts node, you'll have all the comment nodes staying with no purpose on your pubsub service.
With Pubsub Node Relationships, the main blog posts are in parent node, and all comment nodes are children. When you delete the parent, all children are automatically deleted too. It's also easier to explore the service, as you don't have a myriad of flat nodes.
The new pubsub component does not yet have feature parity with the old implementation, but the most difficult part is done, and other features should now be easy to add.
I'm really happy to have it finally integrated to the core Libervia architecture.
Once again, the CLI has a tool to explore a pubsub with node relationships, here shown with the email gateway:
Conclusion
Well, after all this time, this was quite a long blog post, and I've only mentioned some of the recent work.
As you can see, I was really busy, and that explains why I couldn't find the time to blog (it's time consuming: this post took me more than half a day to write). Hopefully, future notes should be shorter.
There is a lot coming, I'm finally seeing the light at the end of the tunnel. Stay tuned, and follow me on ActivityPub at @Goffi@mastodon.social.
Arne 23/04/2026, 16:39
♥
edhelas 24/04/2026, 12:59
♥
SouL 24/04/2026, 20:45
♥
matlag 22/10/2026, 15:21
♥