From Goffiwiki
(Redirected from Libervia)
Jump to: navigation, search

Libervia is the web frontend of SàT.


Manual Libervia's installation is a bit long as you need to install a couple of dependencies and transpile Python code to JavaScript... If you can, use your distribution package or do a request for a package. An other option is the Docker image.

Note: Libervia installation via Docker is really easy, and its usage is then simple (running, backup, etc), you'll find instructions here: Docker/en. If you want to quickly try it, that's the recommended way.

If you want to go with manual installation anyway, here are the instructions, and don't forget that we can help you on the SàT XMPP room:


Salut à Toi backend

  • make sure to have SàT and its media installed and properly configured

XMPP server

We recommend Prosody. It is by now the sole server which implements all the XMPP extensions supported by SàT.



Libervia needs a patch which is posterior to Prosody 0.9. Until the release of Prosody 0.10, it is recommended to use a very fresh version:

  • If your distribution is using "apt", please follow the instructions to install the daily built package. With this solution your Prosody will also be kept up to date whenever you update your distribution.
  • Otherwise you can install it directly from the source code repository. If you choose this solution and that you are in a hurry, here the instructions to be commands to be entered on a Debian based distribution (use the root account or precede with "sudo" when necessary):
 apt-get install lua5.1 liblua5.1-dev luarocks libidn11-dev libssl-dev
 luarocks install luasec luaexpat luafilesystem
 hg clone prosody-trunk
 cd prosody-trunk
 ./configure --ostype=debian
 make install

You may need to adapt these lines to your OS. If you encounter any error, check the INSTALL file to complete the dependencies.


You can use the prosody.cfg.lua.dist template to create your own configuration:

 cp prosody.cfg.lua.dist prosody.cfg.lua

Here is a recommended configuration, considering you are running Prosody locally to host the XMPP domain "", and directly from the working directory (not using the system installation that has been done with "make install", otherwise you need to change the pidfile's path):

 modules_enabled = {
               "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
 allow_registration = true
 pidfile = ""
 VirtualHost ""

Remark: to declare an additional VirtualHost "localhost" is up to you, but to avoid any problem SàT should use a proper domain name like "". If you don't have a real DNS and to assign yourself the domain just for local use, you may need to modify your system configuration for /etc/hostname to contain a single line:

and /etc/hosts to contain the following (and more):    localhost

Set the XMPP domain to be used by Libervia in your SàT config file (e.g. in ~/.config/sat/sat.config). Here we give a sample configuration for the whole "account" plugin section using the "" domain:

 [plugin account]
 email_from =
 email_server = localhost
 #email_sender_domain =
 #email_port = 25
 #email_username =
 #email_password =
 #email_starttls = 0
 #email_auth = 0
 email_admins_list =,
 new_account_server = localhost
 new_account_domain =
 prosody_path = /home/<user>/workspace/prosody-hg
 prosodyctl = prosodyctl
 reserved_list = libervia

Running a mail server is not mandatory, it is only needed to send the account creation confirmation. Also keep in mind that the configuration examples that we gave here are not sufficient to run a fully functional Libervia. But the goal of this article is not to describe in detail how to configure your XMPP server. For more information, please check:

SàT PubSub

SàT PubSub is a XMPP PubSub service component (XEP-0060). It's based on Ralph Meijer's Idavoll, but provide special features necessary for the "Salut à Toi" project. One of the main addition is fine access tuning for PubSub, which allow the publication of items for only some groups.


 hg clone

Follow the procedure as described in INSTALL, paying attention to the dependencies and the database creation. The commands you need to type look like that:

 sudo apt-get install python-twisted-core python-twisted-words postgresql python-psycopg2
 sudo pip install uuid wokkel
 cd sat_pubsub
 sudo pip install .
 sudo -u postgres createuser -d -P `whoami`
 createdb pubsub
 psql pubsub < sat_pubsub/db/pubsub.sql

Configuration with Prosody

  • add these two lines at the end of your prosody.cfg.lua file, adapting them to your XMPP server domain (virtual host) and selecting a password of your choice:
 Component "sat-pubsub.<xmpp_domain>"
         component_secret = "<password>"
  • there are extra steps to enable the micro-blogging feature with Prosody. Please follow the installation and configuration instructions that are given on these pages:

To keep your modules up to date, we recommend to clone the full modules repository and then to symlink them like that:

 cd /path/to
 hg clone
 cd prosody-trunk/plugins
 ln -sf /path/to/prosody-modules/mod_delegation ./
 ln -sf /path/to/prosody-modules/mod_privilege ./

Or course, you have to adapt /path/to to the good directory where you cloned the repositories. If you installed Prosody not from the source but with the apt package, replace prosody-trunk/plugins/ with something like /usr/local/lib/prosody/modules/ (in that case the ln command should be run with the root account or preceded by sudo). Once your symlinks are set, to update the modules we just need to type this:

 cd /path/to/prosody-modules
 hg pull -u

As we gave before a configuration example for your prosody.cfg.lua file, if you are using the delegation and privilege modules it should look a bit like that:

modules_enabled = {
VirtualHost "<xmpp_domain>"
  privileged_entities = {
    ["sat-pubsub.<xmpp_domain>"] = {
      roster = "get";
      message = "outgoing";
      presence = "roster"; 
  delegations = {
    ["urn:xmpp:mam:1"] = {
      filtering = {"node"};
      jid = "sat-pubsub.<xmpp_domain>";
    [""] = {
      jid = "sat-pubsub.<xmpp_domain>";

Component "sat-pubsub.<xmpp_domain>"
   component_secret = "<password>"
   modules_enabled = {"delegation", "privilege"}

Of course, you still have to replace <xmpp_domain> and <password> with the good values.


Salut is a (early-stage) XMPP directory, build for the Salut à Toi project, or any other XMPP related stuff.


There is no installer yet, so you just need to retrieve the source:

 hg clone

Configuration with Prosody

  • add these two lines at the end of your prosody.cfg.lua file, adapting them to your XMPP server domain (virtual host) and selecting a password of your choice:
 Component "salut.<xmpp_domain>"
         component_secret = "<password>"

Since Salut is not yet a Twisted plugin and doesn't accept command line parameters, you need to edit salut.tac to set the good host, port, JID and password:

 xmppcomponent = Component("", 5347, "salut.<xmpp_domain>", "<password>")


  • you need to install the txJSON-RPC dependency (as root):
 pip install txJSON-RPC

For a full featured Libervia, it is recommended to also install these modules:

 pip install dokuwiki miniupnpc netifaces
  • install python-gobject-2 from your distribution repositories. For example:
 apt-get install python-gobject-2
 tar xvjf pyjamas.tar.bz2
 cd pyjamas

Note that we force the python version to 2.7. Salut à Toi and Libervia will be ported to Python 3 after the Twisted framework which is our main dependency. You can check that it works by compiling the helloworld example:

 cd examples/helloworld

if you have no error message, it should be all right


  • to install Libervia using setuptools, the pyjsbuild executable should be accessible from your environment variable "PATH". The easiest would be:
 cd pyjamas
 sudo ln -sf `pwd`/bin/pyjsbuild /usr/bin/pyjsbuild 
  • clone libervia repository:
 hg clone
  • install Libervia and configure Libervia:
 cd libervia
 sudo pip install .

For the configuration, please check the parameters' explanations here: Configuration/en

  • create an account "" (replace "" by your domain or virtual host) on your XMPP server, create a profile on SàT named "libervia", and plug the SàT profile to this account with jp or primitivus.
 cd <prosody_directory>
 ./prosodyctl adduser  # you will be prompted for a password
 jp profile create libervia -j -p <libervia_password>


The four components must be launched in the following order:

  • prosody
 cd prosody && prosodyctl start
  • sat_pubsub (xmpp domain and password as declared in prosody.cfg.lua)
 twistd sat_pubsub --jid=sat-pubsub.<xmpp_domain> --secret=<password>
  • salut (not mandatory)
 cd salut && twistd -y salut.tac
  • sat
  • libervia's web server

Here a bash script to help you with stopping and restarting the services during development (sat will be reinstalled and libervia will be re-built before each start): Helping_script_to_launch_a_Libervia_server/en

If you have any issue, you can ask for help on MUC room , or use the dev mailing list at