Public
Authored by Clément

Installing Prosody

Official Prosody documentation:

Dependencies

To compile Prosody, you need some dependencies (they are mentioned in the Installing from source).

On Debian you can run the following to install dependencies:

sudo apt-get install lua5.1 liblua5.1-dev libidn11-dev libssl-dev luarocks libevent-dev zlib1g-dev

Luarocks

Some lua rocks (lua packages) also need to be installed. For my own Prosody instance I have the following ones installed:

  luabitop 1.0.2-3
  lua-cjson 2.1.0-1
  luadbi 0.5-1
  luafilesystem 1.6.2
  luajson 1.3.3-1
  luasocket 3.0rc1-2
  termfx 0.7-1
  luasec 0.7alpha-2
  lua-zlib 0.4-1
  luadbi-sqlite3 0.5-1
  luaevent 0.4.4
  luaexpat 1.3.0-1
  luaossl 20161214-0

Configuration

This snippet contains a sample configuration file for Prosody.

If does the following:

  • Adds the virtual host chat.example.org, so a user's JID will be for example jc@chat.example.org
  • Adds the groupchat host conference.chat.example.org, so a chatroom's JID will be for example room@conference.chat.example.org
  • Adds the pubsub host pubsub.chat.example.org
  • Adds a server component push.chat.example.org (which will be the appserver)

The following community-provided plugins are configured (and need to be available to Prosody):

Community Modules

The example configuration file uses various community modules. You'll need to clone the community-modules repo somewhere and make sure prosody can read it via the plugin_paths settings in the configuration file.

Currently I use revision 1a1affd22f74 and which works well.

Custom Modules

I've created a repo in which we keep Prosody modules which we've customized or for which we need the latest versions (which aren't available in version 0.10.2).

https://git.happy-dev.fr/startinblox/custom-prosody-modules

This repo needs to be specified first in the plugin_paths setting, then the community modules and then the built-in modules.

File sharing

To support sharing files via http upload (XEP-0363), you'll need to install and configure xmpp-http-upload which is a Python HTTP service for hosting the files.

Push notifications

For push notifications, you'll need to set up and configure the appserver.

Authentication

We're using OAuth (via mod_auth_oauthbearer) for authentication. The following configuration (with proper values) needs to be added to your VirtualHost section in your config file:

oauth_client_id = "13f8e9cc8928b3409822"
oauth_client_secret = "983161fd3ah608ea7ef35382668aad1927463978"
oauth_url = "https://api.github.com/applications/{{oauth_client_id}}/tokens/{{password}}";

authentication = "oauthbearer"
Edited
prosody.cfg.lua 9.94 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment