Mercurial > libervia-pubsub
annotate doc/installation.rst @ 494:468b7cd6c344 default tip
bookmark compat: handle mapped errors:
This convert error on request (e.g. missing node) to appropriate stanza error.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 13 Dec 2024 12:23:47 +0100 |
parents | 0296a2121504 |
children |
rev | line source |
---|---|
404 | 1 ============ |
2 Installation | |
3 ============ | |
4 | |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
5 This are the instructions to install Libervia Pubsub. |
404 | 6 |
7 .. note:: | |
8 | |
473 | 9 This documentation is work in progress |
404 | 10 |
436
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
11 .. note:: |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
12 |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
13 /!\\ Beware, if you're installing Libervia Pubsub on a server already running in production, |
436
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
14 it will replace your legacy Pubsub service, meaning that everything stored there won't |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
15 be available anymore (this includes, and is not limited to, bookmarks, encryption |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
16 keys, blogs, etc.). |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
17 |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
18 Be sure to save everything from your legacy Pubsub service before switching to Libervia |
436
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
19 Pubsub. |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
20 |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
21 Migration scripts are not yet available, help is welcome to write them. |
80aca1cf1543
doc: added a warning for people using SàT Pubsub on a server already used in production
Goffi <goffi@goffi.org>
parents:
427
diff
changeset
|
22 |
404 | 23 |
24 Requirements | |
25 ------------ | |
26 | |
421
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
27 - Python 3.7+ |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
28 - Python 3 "venv", which may be installed with Python 3 |
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
29 - Mercurial |
404 | 30 - A XMPP server that supports the component protocol (XEP-0114), |
31 and, to enable the micro-blogging feature, Namespace Delegation (XEP-0355) | |
32 and privileged entity (XEP-0356) are needed. | |
33 We recommend using Prosody with mod_privilege and mod_delegation modules (those modules | |
34 are maintained by us). | |
35 | |
36 For the PostgreSQL backend, the following is also required: | |
37 | |
38 - PostgreSQL >= 9.5 (including development files for psycopg2) | |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
39 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
40 Installation of dev version |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
41 --------------------------- |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
42 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
43 First install system requirements. On a Debian system or derivative, you can use following |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
44 instructions:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
45 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
46 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
47 |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
48 Now go in a location where you can install Libervia Pubsub, for instance your home directory:: |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
49 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
50 $ cd |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
51 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
52 You'll need to create and activate a Python virtual environment:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
53 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
54 $ python3 -m venv pubsub-venv |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
55 $ source pubsub-venv/bin/activate |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
56 $ pip install -U pip wheel |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
57 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
58 Then you need to clone the repository:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
59 |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
60 $ hg clone https://repos.goffi.org/libervia-pubsub && cd libervia-pubsub |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
61 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
62 Now you can install requirements:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
63 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
64 $ pip install -r requirements.txt |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
65 |
443
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
66 And that's it! Please refer to `Post Installation`_ to initialize database. |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
67 |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
68 Next time you can update with:: |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
69 |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
70 $ hg pull -u |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
71 |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
72 .. note:: |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
73 |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
74 if requirements change, you may have to enter ``pip install -r requirements.txt`` |
6cef8aa1c991
doc: add missing `pip install -e .`
Goffi <goffi@goffi.org>
parents:
442
diff
changeset
|
75 again, check also `Update`_ below) |
404 | 76 |
77 Installation From Sources | |
78 ------------------------- | |
79 | |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
80 To install Libervia PubSub we'll work in a virtual environment. On Debian and derivatives you |
404 | 81 should easily install dependencies with this:: |
82 | |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
83 sudo apt-get install postgresql python3-dev python3-venv python3-wheel mercurial |
404 | 84 |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
85 Now go in a location where you can install Libervia Pubsub, for instance your home directory:: |
404 | 86 |
87 $ cd | |
88 | |
421
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
89 And enter the following commands:: |
404 | 90 |
421
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
91 $ python3 -m venv env |
404 | 92 $ source env/bin/activate |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
93 $ pip install -U pip wheel |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
94 $ pip install sat-pubsub |
404 | 95 |
421
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
96 .. note:: |
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
97 |
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
98 If your are installing from a local clone of the repository, it has been reported that |
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
99 installation with ``python setup.py install`` is not working properly. Please use ``pip |
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
100 install .`` instead. |
f124ed5ea78b
doc: remove python2 references + added a warning for `python setup.py install`
Goffi <goffi@goffi.org>
parents:
409
diff
changeset
|
101 |
404 | 102 Post Installation |
103 ----------------- | |
104 | |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
105 Once Libervia Pubsub is installed, you'll need to create a PostgreSQL user, and create the |
404 | 106 database:: |
107 | |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
108 % sudo -u postgres createuser -d -P $(whoami) |
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
109 % createdb pubsub |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
110 % cd /tmp && wget https://repos.goffi.org/libervia-pubsub/raw-file/tip/db/pubsub.sql |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
111 % psql pubsub < pubsub.sql |
404 | 112 |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
113 Update |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
114 ------ |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
115 |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
116 If you have updated Libervia Pubsub and the database schema has been changed, you may have a |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
117 message indicating that your are using an outdated version. |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
118 |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
119 To update schema, just apply ``libervia_pubsub_update_x_y.sql`` files where ``x`` is your |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
120 current version, and ``y`` is the one to update. If you are several versions late, just |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
121 apply updates one by one. |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
122 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
123 For instance, if you have the following message:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
124 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
125 ERROR:root:Bad database schema version (7), please upgrade to 8 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
126 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
127 Go to ``db`` directory and enter update instruction:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
128 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
129 $ cd db |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
130 $ psql pubsub < libervia_pubsub_update_7_8.sql |
442
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
131 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
132 .. note:: |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
133 |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
134 Before any update and specially if there is a schema change, you should backup your |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
135 database. If anything goes wrong, it will be your best chance to avoid any data loss. |
b38b8beac609
doc: better dev version instructions + update
Goffi <goffi@goffi.org>
parents:
436
diff
changeset
|
136 |
404 | 137 |
138 .. _prosody_configuration: | |
139 | |
140 Prosody Configuration | |
141 --------------------- | |
142 | |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
143 Libervia PubSub can work with any XMPP server (which supports components), but if you want to |
404 | 144 use it as your PEP service, you need a server which supports `XEP-0355`_ and `XEP-0356`_. |
145 | |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
146 Below you'll find the instruction to use Libervia PubSub as a PEP service with Prosody: |
404 | 147 |
148 - add these two lines at the end of your ``prosody.cfg.lua`` file, adapting them to your XMPP | |
149 server domain (virtual host) and selecting a password of your choice: | |
150 | |
151 .. sourcecode:: lua | |
152 | |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
153 Component "pubsub.<xmpp_domain>" |
404 | 154 component_secret = "<password>" |
155 | |
156 - there are extra steps to enable the micro-blogging feature with Prosody. Please follow | |
157 the installation and configuration instructions that are given on these pages: | |
158 | |
159 - https://modules.prosody.im/mod_delegation.html | |
160 - https://modules.prosody.im/mod_privilege.html | |
161 | |
162 To keep your modules up to date, we recommend to clone the full modules | |
163 repository and then to symlink them like that: | |
164 | |
165 .. sourcecode:: shell | |
166 | |
167 % cd /path/to/install_dir | |
168 % hg clone https://hg.prosody.im/prosody-modules | |
169 % cd /path/to/prosody_plugins | |
170 % ln -sf /path/to/install_dir/prosody-modules/mod_delegation ./ | |
171 % ln -sf /path/to/install_dir/prosody-modules/mod_privilege ./ | |
172 | |
173 Or course, you have to adapt ``/path/to/install_dir`` to the directory where you want to | |
174 install the modules, and ``/path/to/prosody_plugins`` to the directory where prosody | |
175 modules are installed (hint: check ``prosodyctl about`` to find the latter). The ``ln`` | |
176 commands may have to be run as root depending on your installation. | |
177 | |
178 Once your symlinks are set, to update the modules we just need to type this: | |
179 | |
180 .. sourcecode:: shell | |
181 | |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
182 % cd /path/to/install_dir/prosody-modules |
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
183 % hg pull -u |
404 | 184 |
185 Here is an example of how your ``prosody.cfg.lua`` should look like with | |
186 ``mod_delegation`` and ``mod_privilege`` activated: | |
187 | |
188 .. sourcecode:: lua | |
189 | |
190 [...] | |
191 modules_enabled = { | |
192 [...] | |
193 "delegation"; | |
194 "privilege"; | |
195 } | |
196 [...] | |
197 VirtualHost "<xmpp_domain>" | |
198 privileged_entities = { | |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
199 ["pubsub.<xmpp_domain>"] = { |
404 | 200 roster = "get"; |
201 message = "outgoing"; | |
202 presence = "roster"; | |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
203 iq = { |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
204 ["http://jabber.org/protocol/pubsub"] = "set"; |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
205 }; |
404 | 206 }, |
207 } | |
208 delegations = { | |
209 ["urn:xmpp:mam:2"] = { | |
210 filtering = {"node"}; | |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
211 jid = "pubsub.<xmpp_domain>"; |
404 | 212 }, |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
213 ["http://jabber.org/protocol/pubsub"] = { |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
214 jid = "pubsub.<xmpp_domain>"; |
404 | 215 }, |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
216 ["http://jabber.org/protocol/pubsub#owner"] = { |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
217 jid = "pubsub.<xmpp_domain>"; |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
218 }, |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
219 ["https://salut-a-toi/protocol/schema:0"] = { |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
220 jid = "pubsub.<xmpp_domain>"; |
404 | 221 }, |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
222 ["https://salut-a-toi.org/spec/pubsub_admin:0"] = { |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
223 jid = "pubsub.<xmpp_domain>"; |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
224 }, |
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
225 ["urn:xmpp:pam:0"] = { |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
226 jid = "pubsub.<xmpp_domain>"; |
404 | 227 }, |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
228 ["urn:xmpp:delegation:2:bare:disco#info:*"] = { |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
229 jid = "pubsub.<xmpp_domain>"; |
404 | 230 }, |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
231 ["urn:xmpp:delegation:2:bare:disco#items:*"] = { |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
232 jid = "pubsub.<xmpp_domain>"; |
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
233 }, |
492
0296a2121504
doc (installation): update Prosody config to handle PAM and bookmark compatibility layer.
Goffi <goffi@goffi.org>
parents:
476
diff
changeset
|
234 ["jabber:iq:private"] = { |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
235 jid = "pubsub.<xmpp_domain>"; |
404 | 236 }, |
237 } | |
238 | |
427
f6f4f99f1a1b
doc: explicite "wheel" installation + renamed "sat-pubsub.*" jids to simpler "pubsub.*"
Goffi <goffi@goffi.org>
parents:
425
diff
changeset
|
239 Component "pubsub.<xmpp_domain>" |
404 | 240 component_secret = "<password>" |
241 modules_enabled = {"delegation", "privilege"} | |
242 | |
243 Of course, you still have to replace and adapt to your own settings. | |
244 | |
245 .. _XEP-0355: https://xmpp.org/extensions/xep-0355.html | |
246 .. _XEP-0356: https://xmpp.org/extensions/xep-0356.html | |
247 | |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
248 Running Libervia PubSub |
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
249 ----------------------- |
404 | 250 |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
251 The minimal example for running libervia-pubsub is: |
404 | 252 |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
253 % twistd libervia-pubsub |
404 | 254 |
255 This will start the service and run it in the background. It generates a | |
256 file twistd.pid that holds the PID of the service and a log file twistd.log. | |
257 The twistd utility has a fair number of options that might be useful, and | |
258 can be viewed with: | |
259 | |
260 % twistd --help | |
261 | |
262 When the service starts, it will connect to the XMPP server at the local machine using the | |
263 component protocol, and assumes the JID ``pubsub``. This assumes a couple of defaults | |
264 which can be overridden by passing parameters to the twistd plugin. You can get an | |
265 overview of the parameters and their defaults using: | |
266 | |
425
968091cea547
doc: installation instructions corrections
Goffi <goffi@goffi.org>
parents:
421
diff
changeset
|
267 % twistd sat-pubsub --help |
404 | 268 |
269 In particular, the following parameters will be of interest: | |
270 | |
271 ``--jid`` | |
272 The Jabber ID the component will assume. | |
273 | |
274 ``--rport`` | |
275 the port number of the XMPP server to connect to | |
276 | |
277 ``--xmpp_pwd`` | |
278 the secret used to authenticate with the XMPP server. | |
279 | |
280 For example:: | |
281 | |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
282 twistd libervia-pubsub --jid=pubsub.<your_xmpp_domain> --xmpp_pwd=<password> |
404 | 283 |
476
1092bab8b3f3
doc: update names following global renaming
Goffi <goffi@goffi.org>
parents:
473
diff
changeset
|
284 You can set your options in ``libervia.conf`` which is the same file used as for Salut à Toi |
468
445a2f67be4a
doc: update following renaming and delegation changes
Goffi <goffi@goffi.org>
parents:
446
diff
changeset
|
285 ecosystem. Please check backend ``configuration`` section for details. The Libervia PubSub |
404 | 286 options must be in ``[pubsub]`` section. |