https://wiki.diasporafoundation.org/api.php?action=feedcontributions&user=Zauberstuhl&feedformat=atomdiaspora* project wiki - User contributions [en]2024-03-29T15:31:56ZUser contributionsMediaWiki 1.39.3https://wiki.diasporafoundation.org/wiki/index.php?title=Talk:Integration/Chat&diff=5543Talk:Integration/Chat2016-09-14T11:21:33Z<p>Zauberstuhl: Will be tracked via git</p>
<hr />
<div><br />
<nowiki><br />
18:31 < zauberstuhl> flaburgan: yes it stopss and no I think the debian/ubuntu repos have no bcrypt<br />
18:31 < flaburgan> Lua or Prosody don't ship with the bcrypt library. **If it isn't in your repositories**, you can install it with the following command: <br />
18:32 < flaburgan> bcrypt_1.1-6_amd64.deb is available in Ubuntu<br />
18:32 < flaburgan> 12.04<br />
18:32 < DenSchub> there is no lua-bcrypt in the ubuntu reps<br />
18:33 < zauberstuhl> yes its bcrypt but you require the bcrypt library for lua<br />
18:33 < flaburgan> hm, and no luarocks too :p<br />
18:33 < flaburgan> lua lua5.1 luac luac5.1<br />
18:33 < zauberstuhl> I will add a note for future podmins<br />
<br />
</nowiki><br />
<br />
<br />
---</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Talk:Integration/Chat&diff=5542Talk:Integration/Chat2016-09-14T11:20:47Z<p>Zauberstuhl: This was correctly linked to the installation wiki</p>
<hr />
<div><br />
<nowiki><br />
18:31 < zauberstuhl> flaburgan: yes it stopss and no I think the debian/ubuntu repos have no bcrypt<br />
18:31 < flaburgan> Lua or Prosody don't ship with the bcrypt library. **If it isn't in your repositories**, you can install it with the following command: <br />
18:32 < flaburgan> bcrypt_1.1-6_amd64.deb is available in Ubuntu<br />
18:32 < flaburgan> 12.04<br />
18:32 < DenSchub> there is no lua-bcrypt in the ubuntu reps<br />
18:33 < zauberstuhl> yes its bcrypt but you require the bcrypt library for lua<br />
18:33 < flaburgan> hm, and no luarocks too :p<br />
18:33 < flaburgan> lua lua5.1 luac luac5.1<br />
18:33 < zauberstuhl> I will add a note for future podmins<br />
<br />
</nowiki><br />
<br />
<br />
---<br />
<br />
<br />
<nowiki><br />
<br />
<br />
Credentials are OK but it’s missing the port, I’m running on 5433 not the default 5432 ;)<br />
about 3 hours ago<br />
So you also need to get the port from database.yml.<br />
<br />
</nowiki></div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Talk:Integration/Chat&diff=4844Talk:Integration/Chat2016-06-07T11:38:26Z<p>Zauberstuhl: </p>
<hr />
<div> <nowiki>18:20 < flaburgan> so zauberstuhl : "you haven't installe dprosody with bcyrpt dependencies right?"<br />
18:20 < flaburgan> I just noticed that https://wiki.diasporafoundation.org/Integration/XMPP/Prosody#Install_bcrypt_Lua_library talks about bcrypt<br />
18:20 < flaburgan> but https://wiki.diasporafoundation.org/Integration/Chat#Installation.2FUpdate doesn't<br />
18:21 < zauberstuhl> well cause jhass more accurate then me.. I will update this or link to his article <br />
18:21 < zauberstuhl> is+<br />
18:21 < zauberstuhl> noted*<br />
18:21 < DenSchub> we shouldn't have two articles about installing and setting up prosody..<br />
18:22 < zauberstuhl> then I will merge it<br />
</nowiki><br />
<br />
<br />
---<br />
<br />
<nowiki><br />
18:31 < zauberstuhl> flaburgan: yes it stopss and no I think the debian/ubuntu repos have no bcrypt<br />
18:31 < flaburgan> Lua or Prosody don't ship with the bcrypt library. **If it isn't in your repositories**, you can install it with the following command: <br />
18:32 < flaburgan> bcrypt_1.1-6_amd64.deb is available in Ubuntu<br />
18:32 < flaburgan> 12.04<br />
18:32 < DenSchub> there is no lua-bcrypt in the ubuntu reps<br />
18:33 < zauberstuhl> yes its bcrypt but you require the bcrypt library for lua<br />
18:33 < flaburgan> hm, and no luarocks too :p<br />
18:33 < flaburgan> lua lua5.1 luac luac5.1<br />
18:33 < zauberstuhl> I will add a note for future podmins<br />
<br />
</nowiki><br />
<br />
<br />
---<br />
<br />
<br />
<nowiki><br />
<br />
<br />
Credentials are OK but it’s missing the port, I’m running on 5433 not the default 5432 ;)<br />
about 3 hours ago<br />
So you also need to get the port from database.yml.<br />
<br />
</nowiki></div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Talk:Integration/Chat&diff=4841Talk:Integration/Chat2016-06-06T16:25:33Z<p>Zauberstuhl: </p>
<hr />
<div> <nowiki>18:20 < flaburgan> so zauberstuhl : "you haven't installe dprosody with bcyrpt dependencies right?"<br />
18:20 < flaburgan> I just noticed that https://wiki.diasporafoundation.org/Integration/XMPP/Prosody#Install_bcrypt_Lua_library talks about bcrypt<br />
18:20 < flaburgan> but https://wiki.diasporafoundation.org/Integration/Chat#Installation.2FUpdate doesn't<br />
18:21 < zauberstuhl> well cause jhass more accurate then me.. I will update this or link to his article <br />
18:21 < zauberstuhl> is+<br />
18:21 < zauberstuhl> noted*<br />
18:21 < DenSchub> we shouldn't have two articles about installing and setting up prosody..<br />
18:22 < zauberstuhl> then I will merge it<br />
</nowiki><br />
<br />
<br />
---<br />
<br />
<nowiki><br />
18:31 < zauberstuhl> flaburgan: yes it stopss and no I think the debian/ubuntu repos have no bcrypt<br />
18:31 < flaburgan> Lua or Prosody don't ship with the bcrypt library. **If it isn't in your repositories**, you can install it with the following command: <br />
18:32 < flaburgan> bcrypt_1.1-6_amd64.deb is available in Ubuntu<br />
18:32 < flaburgan> 12.04<br />
18:32 < DenSchub> there is no lua-bcrypt in the ubuntu reps<br />
18:33 < zauberstuhl> yes its bcrypt but you require the bcrypt library for lua<br />
18:33 < flaburgan> hm, and no luarocks too :p<br />
18:33 < flaburgan> lua lua5.1 luac luac5.1<br />
18:33 < zauberstuhl> I will add a note for future podmins<br />
<br />
</nowiki></div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Talk:Integration/Chat&diff=4840Talk:Integration/Chat2016-06-06T16:15:19Z<p>Zauberstuhl: Created page with " <nowiki>18:20 < flaburgan> so zauberstuhl : "you haven't installe dprosody with bcyrpt dependencies right?" 18:20 < flaburgan> I just noticed that https://wiki.diasporafound..."</p>
<hr />
<div> <nowiki>18:20 < flaburgan> so zauberstuhl : "you haven't installe dprosody with bcyrpt dependencies right?"<br />
18:20 < flaburgan> I just noticed that https://wiki.diasporafoundation.org/Integration/XMPP/Prosody#Install_bcrypt_Lua_library talks about bcrypt<br />
18:20 < flaburgan> but https://wiki.diasporafoundation.org/Integration/Chat#Installation.2FUpdate doesn't<br />
18:21 < zauberstuhl> well cause jhass more accurate then me.. I will update this or link to his article <br />
18:21 < zauberstuhl> is+<br />
18:21 < zauberstuhl> noted*<br />
18:21 < DenSchub> we shouldn't have two articles about installing and setting up prosody..<br />
18:22 < zauberstuhl> then I will merge it<br />
</nowiki></div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4821Integration/Chat2016-04-25T13:29:55Z<p>Zauberstuhl: /* Installation/Update */</p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
1. Install Prosody like described [http://prosody.im/download/start here..]<br><br />
2. Follow the configuration guide [[Integration/Chat#Configuration]]<br><br />
3. Do a regular [[Updating|update]]<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
== Prosody ==<br />
<br />
If you are using the prosody configuration wrapper you still can change parameters which are not covered by the wrapper.<br><br />
A requirement is that you ran the server with the enabled chat service once.<br><br />
After that the wrapper will generate a prosody configuration file in<br />
<syntaxhighlight lang="bash"><br />
/your_diaspora_installation_path/config/prosody.cfg.lua<br />
</syntaxhighlight><br />
<br />
If you adjust it, the new configuration will be available after a restart of your diaspora server. If you don't want to restart the whole instance<br><br />
you can flush the new configuration by restarting the xmpp server only:<br />
<syntaxhighlight lang="bash"><br />
# this will update the gem config<br />
rails runner config/initializers/prosody.rb<br />
# finally restart the xmpp server<br />
eye restart xmpp<br />
</syntaxhighlight><br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= Migration =<br />
<br />
== Vines to Prosody ==<br />
<br />
Since diaspora* 0.5.9.0 we moved from Vines to Prosody.<br />
<br />
=== 1. Configuration ===<br />
<br />
To make this work you have to remove in your diaspora.yml every '''chat related''' configuration option '''except for''':<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: false<br />
server:<br />
enabled: true<br />
certs: "config/certs"<br />
bosh:<br />
proxy: false<br />
address: '0.0.0.0'<br />
port: 5280<br />
bind: '/http-bind'<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
=== 2. Certificates ===<br />
<br />
Copy your certificates in <code>/your_diaspora_installation_path/config/vines/</code> to the new directory <code>/your_diaspora_installation_path/config/certs/</code><br />
<br />
=== 3. Installation ===<br />
<br />
Proceed with the official integration guide: [[Integration/Chat#Installation.2FUpdate]]<br />
<br />
= Development =<br />
<br />
== JSXC ==<br />
<br />
Have look at [[JSXC_Development]] to how to setup a development environment!<br />
<br />
== Prosody Configuration Wrapper ==<br />
<br />
Source: https://github.com/zauberstuhl/gem_diaspora-prosody-config<br />
<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4820Integration/Chat2016-04-25T13:17:16Z<p>Zauberstuhl: /* Migration */</p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]]<br />
and the installation of the prosody XMPP Server like described [http://prosody.im/download/start here..]<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
== Prosody ==<br />
<br />
If you are using the prosody configuration wrapper you still can change parameters which are not covered by the wrapper.<br><br />
A requirement is that you ran the server with the enabled chat service once.<br><br />
After that the wrapper will generate a prosody configuration file in<br />
<syntaxhighlight lang="bash"><br />
/your_diaspora_installation_path/config/prosody.cfg.lua<br />
</syntaxhighlight><br />
<br />
If you adjust it, the new configuration will be available after a restart of your diaspora server. If you don't want to restart the whole instance<br><br />
you can flush the new configuration by restarting the xmpp server only:<br />
<syntaxhighlight lang="bash"><br />
# this will update the gem config<br />
rails runner config/initializers/prosody.rb<br />
# finally restart the xmpp server<br />
eye restart xmpp<br />
</syntaxhighlight><br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= Migration =<br />
<br />
== Vines to Prosody ==<br />
<br />
Since diaspora* 0.5.9.0 we moved from Vines to Prosody.<br />
<br />
=== 1. Configuration ===<br />
<br />
To make this work you have to remove in your diaspora.yml every '''chat related''' configuration option '''except for''':<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: false<br />
server:<br />
enabled: true<br />
certs: "config/certs"<br />
bosh:<br />
proxy: false<br />
address: '0.0.0.0'<br />
port: 5280<br />
bind: '/http-bind'<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
=== 2. Certificates ===<br />
<br />
Copy your certificates in <code>/your_diaspora_installation_path/config/vines/</code> to the new directory <code>/your_diaspora_installation_path/config/certs/</code><br />
<br />
=== 3. Installation ===<br />
<br />
Proceed with the official integration guide: [[Integration/Chat#Installation.2FUpdate]]<br />
<br />
= Development =<br />
<br />
== JSXC ==<br />
<br />
Have look at [[JSXC_Development]] to how to setup a development environment!<br />
<br />
== Prosody Configuration Wrapper ==<br />
<br />
Source: https://github.com/zauberstuhl/gem_diaspora-prosody-config<br />
<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4819Integration/Chat2016-04-25T13:00:33Z<p>Zauberstuhl: </p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]]<br />
and the installation of the prosody XMPP Server like described [http://prosody.im/download/start here..]<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
== Prosody ==<br />
<br />
If you are using the prosody configuration wrapper you still can change parameters which are not covered by the wrapper.<br><br />
A requirement is that you ran the server with the enabled chat service once.<br><br />
After that the wrapper will generate a prosody configuration file in<br />
<syntaxhighlight lang="bash"><br />
/your_diaspora_installation_path/config/prosody.cfg.lua<br />
</syntaxhighlight><br />
<br />
If you adjust it, the new configuration will be available after a restart of your diaspora server. If you don't want to restart the whole instance<br><br />
you can flush the new configuration by restarting the xmpp server only:<br />
<syntaxhighlight lang="bash"><br />
# this will update the gem config<br />
rails runner config/initializers/prosody.rb<br />
# finally restart the xmpp server<br />
eye restart xmpp<br />
</syntaxhighlight><br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= Migration =<br />
<br />
= Development =<br />
<br />
== JSXC ==<br />
<br />
Have look at [[JSXC_Development]] to how to setup a development environment!<br />
<br />
== Prosody Configuration Wrapper ==<br />
<br />
Source: https://github.com/zauberstuhl/gem_diaspora-prosody-config<br />
<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4818Integration/Chat2016-04-25T12:56:30Z<p>Zauberstuhl: /* Prosody */</p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]]<br />
and the installation of the prosody XMPP Server like described [http://prosody.im/download/start here..]<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
== Prosody ==<br />
<br />
If you are using the prosody configuration wrapper you still can change parameters which are not covered by the wrapper.<br><br />
A requirement is that you ran the server with the enabled chat service once.<br><br />
After that the wrapper will generate a prosody configuration file in<br />
<syntaxhighlight lang="bash"><br />
/your_diaspora_installation_path/config/prosody.cfg.lua<br />
</syntaxhighlight><br />
<br />
If you adjust it, the new configuration will be available after a restart of your diaspora server. If you don't want to restart the whole instance<br><br />
you can flush the new configuration by restarting the xmpp server only:<br />
<syntaxhighlight lang="bash"><br />
# this will update the gem config<br />
rails runner config/initializers/prosody.rb<br />
# finally restart the xmpp server<br />
eye restart xmpp<br />
</syntaxhighlight><br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= Development =<br />
<br />
== JSXC ==<br />
<br />
Have look at [[JSXC_Development]] to how to setup a development environment!<br />
<br />
== Prosody Configuration Wrapper ==<br />
<br />
Source: https://github.com/zauberstuhl/gem_diaspora-prosody-config<br />
<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4817Integration/Chat2016-04-25T12:46:42Z<p>Zauberstuhl: /* Configuration */</p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]]<br />
and the installation of the prosody XMPP Server like described [http://prosody.im/download/start here..]<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
== Prosody ==<br />
<br />
If you are using the prosody configuration wrapper you still can change parameters which are not covered by the wrapper.<br><br />
A requirement is that you ran the server with the enabled chat service once.<br><br />
After that the wrapper will generate a prosody configuration file in<br />
<syntaxhighlight lang="bash">/your_diaspora_installation_path/config/prosody.cfg.lua</syntaxhighlight><br />
<br />
If you adjust it the new configuration will be available after a restart for your diaspora server.<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= Development =<br />
<br />
== JSXC ==<br />
<br />
Have look at [[JSXC_Development]] to how to setup a development environment!<br />
<br />
== Prosody Configuration Wrapper ==<br />
<br />
Source: https://github.com/zauberstuhl/gem_diaspora-prosody-config<br />
<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4816Vines2016-04-25T12:35:39Z<p>Zauberstuhl: </p>
<hr />
<div>{{Serious|This page moved to [[Integration/Chat]]}}</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4815Vines2016-04-25T12:35:25Z<p>Zauberstuhl: Replaced content with "{{Serious|This page moved to Integration/Chat}} Category:Podmin Category:Installation"</p>
<hr />
<div>{{Serious|This page moved to [[Integration/Chat]]}}<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4814Integration/Chat2016-04-25T12:30:36Z<p>Zauberstuhl: </p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]]<br />
and the installation of the prosody XMPP Server like described [http://prosody.im/download/start here..]<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= Development =<br />
<br />
== JSXC ==<br />
<br />
Have look at [[JSXC_Development]] to how to setup a development environment!<br />
<br />
== Prosody Configuration Wrapper ==<br />
<br />
Source: https://github.com/zauberstuhl/gem_diaspora-prosody-config<br />
<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Integration/Chat&diff=4813Integration/Chat2016-04-25T12:23:50Z<p>Zauberstuhl: Created page with "{{Work_in_progress}} This wiki-page is about setting up the chat application on your Diaspora installation. = Installation/Update = If you're running the development versio..."</p>
<hr />
<div>{{Work_in_progress}}<br />
<br />
This wiki-page is about setting up the chat application on your Diaspora installation.<br />
<br />
= Installation/Update =<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== FirewallD ===<br />
<br />
FirewallD is used by RedHat/CentOS/Fedora based distributions. Open up the required ports permanently and add them to the public zone.<br />
<br />
firewall-cmd --add-port=5222 --zone=public --permanent<br />
firewall-cmd --add-port=5269 --zone=public --permanent<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the certificate-folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/certs/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/prosody.log</tt> and has a log level of <tt>info</tt> set.<br />
Un-comment in your diapsora.yml <tt>error: 'log/prosody.err</tt> to set the log level to debug-mode. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
info: 'log/prosody.log'<br />
error: 'log/prosody.err'<br />
debug: false<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4377Vines2015-12-03T10:57:34Z<p>Zauberstuhl: /* FAQ */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== JSXC is hidden, even after activating it ==<br />
<br />
=== Firefox ===<br />
Go to your http://about:config and check whether you set<br />
<syntaxhighlight lang="bash">media.peerconnection.enabled</syntaxhighlight><br />
to<br />
<syntaxhighlight lang="bash">false</syntaxhighlight><br />
Reverse it and JSXC should be displayed, again!<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Archive:Hackathon_Paris_Oct_2015&diff=4317Archive:Hackathon Paris Oct 20152015-10-05T05:10:32Z<p>Zauberstuhl: /* Contact details */</p>
<hr />
<div>== What ==<br />
<br />
A meetup to hack on diaspora* and discuss about the project and its community.<br />
<br />
== Why ==<br />
<br />
Because to meet and work IRL is so much fun.<br />
<br />
== When ==<br />
<br />
From '''Thursday, the 8th of October 2015, to Sunday, the 11th of October'''.<br />
<br />
Friday and Saturday are looking to be the most active days, these are the best days to come over.<br />
<br />
== Location ==<br />
<br />
The Mozilla Paris office<br />
16 Bis Boulevard Montmartre<br />
75009 Paris, France<br />
[http://osm.org/go/0BPIiU9nt--?layers=N&m= "map"]<br />
<br />
== Project board ==<br />
<br />
We have a [https://tree.taiga.io/project/jaywink-diaspora-paris-hackathon/ project board] to map out issues we would like to tackle. Please contact any of the participants for access to this board.<br />
<br />
If you are interested on working on a specific issue during the hackathon, please add it to the backlog.<br />
<br />
== Attendees ==<br />
<br />
* Fla (Thu 8th evening - Sunday 11th evening)<br />
* Augier (Thu 8th evening - Sunday 11th evening)<br />
* Lukas Zauberstuhl (Thu 8th evening - Sat 10th evening)<br />
* Dada (? - ?)<br />
* Jason Robinson (Thu 8th morning - Sun 11th evening)<br />
* Thomas Citharel (Sat 10th)<br />
<br />
=== Interested, unconfirmed ===<br />
<br />
* brevium@framasphere.org<br />
* Aurélie GINIOUX<br />
* Marien Fressinaud<br />
<br />
=== Contact details ===<br />
<br />
* Fla - d*: fla@diaspora-fr.org<br />
* Augier - d*: augierle42e@diaspora-fr.org, email: christophe@c-henry.fr<br />
* Lukas Zauberstuhl - d*: lukas@sechat.org, email: lukas@zauberstuhl.de, phone: +491743440555<br />
* Dada - d*: dadall@diaspote.org<br />
* Jason Robinson - d*: jaywink@iliketoast.net, email: mail@jasonrobinson.me, xmpp: jaywink@dukgo.com, phone: +358451259376<br />
* Thomas Citharel - d*: tcit@diaspora-fr.org, email: tcit@tcit.fr, phone: +33612435034<br />
<br />
== Mozilla contacts ==<br />
<br />
Hosts:<br />
<br />
* Thu-Fri: areinald@mozilla.com<br />
* Sat-Sun: ?<br />
<br />
== Evening activities ==<br />
<br />
Food, beer, wine, Paris :)</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4289Vines2015-09-06T09:52:47Z<p>Zauberstuhl: /* UFW - Uncomplicated Firewall */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Will be shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4288Vines2015-09-06T09:52:22Z<p>Zauberstuhl: /* UFW -Uncomplicated Firewall */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW - Uncomplicated Firewall ===<br />
(Is shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4287Vines2015-09-06T09:52:09Z<p>Zauberstuhl: /* Firewall Ports */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a few ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== UFW -Uncomplicated Firewall ===<br />
(Is shipped in the newer Ubuntu versions.)<br />
<br />
sudo ufw allow 5269/tcp<br />
sudo ufw allow 5222/tcp<br />
<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4275Vines2015-09-03T19:24:37Z<p>Zauberstuhl: /* You enabled the chat feature but haven't configured BOSH */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a view ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== Browser blocks mixed-content ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=User:Zauberstuhl&diff=4274User:Zauberstuhl2015-09-03T19:14:50Z<p>Zauberstuhl: /* XMPP Chat Feature */</p>
<hr />
<div>Contact Me:<br />
* [mailto:lukas@zauberstuhl.de E-Mail]<br />
* [https://github.com/Zauberstuhl GitHub]<br />
* [https://sechat.org/u/lukas Diaspora*]<br />
<br />
= Summary =<br />
<br />
== [Merged] Report Feature ==<br />
<br />
Since Diaspora v0.4.0.0 it is possible to report posts and comments (see [https://github.com/diaspora/diaspora/pull/4517 #4517] and [https://github.com/diaspora/diaspora/pull/4781 #4781]).<br />
<br />
== [Merged] XMPP Chat Feature ==<br />
<br />
With the upcoming feature you'll be able to chat with your Diaspora friends via XMPP protocol (see [https://github.com/diaspora/diaspora/pull/5073 #5073]).<br><br />
<br />
[https://wiki.diasporafoundation.org/Vines Documentation: Vines]<br />
<br />
== Vertica DB support ==<br />
<br />
{{Serious|This is a research project! Do not use it unless you really know what you are doing!}}<br />
<br />
<br />
[http://www.sophos.com/en-us/medialibrary/PDFs/technical%20papers/sophos-database-performance-comparison-tpna.pdf Database performance comparison]<br />
<br />
Dependencies:<br />
aptitude install postgresql libpq-dev<br />
<br />
Gemfile:<br />
gem 'activerecord-vertica-adapter', :git => 'https://github.com/evrone/activerecord-vertica-adapter.git'<br />
<br />
Git-Branch:<br />
git clone https://github.com/Zauberstuhl/diaspora.git -b vertica</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4273Vines2015-09-03T18:57:28Z<p>Zauberstuhl: /* Firewall Ports */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a view ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== OpenWRT===<br />
<br />
Check the [http://wiki.openwrt.org/doc/howto/port.forwarding OpenWRT documentation here..]<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4272Vines2015-09-03T18:55:00Z<p>Zauberstuhl: /* KVM/QEMU */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a view ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag <code></domain></code><br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4271Vines2015-09-03T18:54:20Z<p>Zauberstuhl: /* Certificates */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a view ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag "</domain>"<br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a certificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4270Vines2015-09-03T18:53:56Z<p>Zauberstuhl: /* KVM/QEMU */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a view ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending-tag "</domain>"<br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=4269Vines2015-09-03T18:49:00Z<p>Zauberstuhl: /* Configuration */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Firewall Ports ==<br />
<br />
If your server is behind a firewall or in a virtual environment without direct internet access (e.g. kvm/qemu).<br />
You have to open a view ports on your router (redirect ports in kvm):<br />
<br />
* port 5269 if you want that your xmpp server can communicate with other xmpp server (this is necessary if you want to communicate with other users on different pods)<br />
* port 5222 if you want that your user can login with different clients (e.g. #Pidgin)<br />
<br />
=== Iptables ===<br />
<br />
Enable IP forwarding on your router:<br />
echo "1" > /proc/sys/net/ipv4/ip_forward<br />
or<br />
sysctl net.ipv4.ip_forward=1<br />
<br />
Redirect all traffic on the specified ports to xxx.xxx.xxx.xxx:<br />
iptables -t nat -A PREROUTING -p tcp --dport 5269 -j DNAT --to-destination xxx.xxx.xxx.xxx:5269<br />
iptables -t nat -A PREROUTING -p tcp --dport 5222 -j DNAT --to-destination xxx.xxx.xxx.xxx:5222<br />
iptables -t nat -A POSTROUTING -j MASQUERADE<br />
<br />
=== KVM/QEMU ===<br />
<br />
Edit your configuration file:<br />
virsh -c qemu:/system edit <DOMAIN><br />
<br />
And add at the end before the ending tag `</domain>`<br />
<qemu:commandline><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5269::5269'/><br />
<qemu:arg value='-redir'/><br />
<qemu:arg value='tcp:5222::5222'/><br />
</qemu:commandline><br />
<br />
Finally reboot:<br />
virsh -c qemu:/system reboot <DOMAIN><br />
<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3829Vines2015-01-13T14:04:45Z<p>Zauberstuhl: /* Nginx */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3828Vines2015-01-13T13:21:36Z<p>Zauberstuhl: /* Nginx */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
<br />
proxy_redirect off;<br />
proxy_connect_timeout 5;<br />
proxy_buffering off;<br />
<br />
proxy_read_timeout 70;<br />
keepalive_timeout 70;<br />
send_timeout 70;<br />
<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3779Vines2014-12-29T00:44:08Z<p>Zauberstuhl: /* I have no contacts in my roster */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png|caption]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png|caption]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=File:Chat_privilege_popup.png&diff=3778File:Chat privilege popup.png2014-12-29T00:39:30Z<p>Zauberstuhl: </p>
<hr />
<div></div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=File:Chat_privilege_bar.png&diff=3777File:Chat privilege bar.png2014-12-29T00:39:08Z<p>Zauberstuhl: </p>
<hr />
<div></div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3776Vines2014-12-29T00:37:57Z<p>Zauberstuhl: /* FAQ */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation/Update =<br />
<br />
This feature is merged into the current development version of Diaspora. We do not recommend to try it out yet if you're running on the stable release version.<br />
<br />
If you're running the development version of Diaspora and want to try out this feature, all you have to do is a regular [[Updating|update]].<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I have no contacts in my roster ==<br />
<br />
<br />
Please consider that you have to add chat privilege to your aspects!<br />
<br />
You can toggle that privilege for every existing aspect:<br><br />
[[File:chat_privilege_bar.png]]<br />
<br />
Or you can do that while creating a new aspect:<br><br />
[[File:chat_privilege_popup.png]]<br />
<br />
<br />
(original post https://sechat.org/posts/359056)<br />
<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3394Vines2014-10-20T11:21:26Z<p>Zauberstuhl: /* Invalid byte sequence in UTF-8 */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Vines is not able to read the file due encoding problems. You can easily check your file encoding with:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8, Vines will skip the file. You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3393Vines2014-10-20T11:12:37Z<p>Zauberstuhl: /* Invalid byte sequence in UTF-8 */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Your certificates are not readable by vines!<br />
<br />
You can check easily your encoding under linux with the file-command, e.g:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8. Vines will skip the file!<br />
<br />
You can try converting it ([http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets source]):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3392Vines2014-10-20T11:05:21Z<p>Zauberstuhl: /* Invalid byte sequence in UTF-8 */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Your certificates are not readable by vines!<br />
<br />
You can check easily your encoding under linux with the file-command, e.g:<br />
<syntaxhighlight lang="bash"><br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
</syntaxhighlight><br />
<br />
If it is not ascii or utf-8. Vines will skip the file!<br />
<br />
You can try converting it (<s href="http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets">source</a>):<br />
<syntaxhighlight lang="yaml"><br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
</syntaxhighlight><br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3391Vines2014-10-20T11:03:59Z<p>Zauberstuhl: /* Invalid byte sequence in UTF-8 */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
Your certificates are not readable by vines!<br />
<br />
You can check easily your encoding under linux with the file-command, e.g:<br />
$ file --mime-encoding /etc/ssl/certs/ca-certificates.crt<br />
/etc/ssl/certs/ca-certificates.crt: us-ascii<br />
<br />
If it is not ascii or utf-8. Vines will skip the file!<br />
<br />
You can try converting it (<s href="http://stackoverflow.com/questions/64860/best-way-to-convert-text-files-between-character-sets">source</a>):<br />
$ iconv -f <YOUR_ENCODING> -t ascii /etc/ssl/certs/ca-certificates.crt > /etc/ssl/certs/ca-certificates.ascii.crt<br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3332Vines2014-10-08T13:09:56Z<p>Zauberstuhl: Undo revision 3331 by Zauberstuhl (talk)</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
coming soon<br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3331Vines2014-10-08T13:09:16Z<p>Zauberstuhl: /* FAQ */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= F.A.Q. =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
coming soon<br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3330Vines2014-10-08T12:16:40Z<p>Zauberstuhl: /* Invalid byte sequence in UTF-8 */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
coming soon<br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3329Vines2014-10-08T12:15:18Z<p>Zauberstuhl: /* invalid byte sequence in UTF-8 */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== Invalid byte sequence in UTF-8 ==<br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3328Vines2014-10-08T12:15:08Z<p>Zauberstuhl: /* FAQ */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== invalid byte sequence in UTF-8 ==<br />
<br />
== You enabled the chat feature but haven't configured BOSH ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3251Vines2014-09-30T12:53:12Z<p>Zauberstuhl: /* Run it */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password.<br />
<br />
= FAQ =<br />
<br />
== I received a warning on startup!? ==<br />
<br />
<syntaxhighlight lang="bash"><br />
*****************************************************************<br />
You enabled the chat feature but haven't configured BOSH! That<br />
could lead to mixed-content problems with the http clients. Please<br />
think about editing your proxy configuration as described in:<br />
<br />
diaspora.yml.example<br />
*****************************************************************<br />
</syntaxhighlight><br />
<br />
The internal xmpp server does not support https and<br /><br />
even if we implement it, we would ran into certificate issues.<br /><br />
The problem with mixed-content is described here: https://github.com/Zauberstuhl/diaspora/issues/6<br />
<br />
The easiest way of avoiding certificate and mixed-content issues is to use a proxy (see apache and nginx section below)!<br />
<br />
If you finished configuring your proxy settings you also have to adjust diaspora.yml!<br /><br />
For my examples below, it would look like this:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
bosh:<br />
proxy: true<br />
bind: '/http-bind'<br />
</syntaxhighlight><br />
<br />
=== Apache2 ===<br />
<br />
<syntaxhighlight lang="apache"><br />
RewriteEngine On<br />
<br />
RewriteCond %{REQUEST_URI} ^/http-bind<br />
RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]<br />
<br />
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f<br />
RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]<br />
<br />
<Proxy balancer://diaspora><br />
BalancerMember http://127.0.0.1:3000<br />
</Proxy><br />
<br />
<Proxy balancer://chat><br />
BalancerMember http://0.0.0.0:5280<br />
</Proxy><br />
</syntaxhighlight><br />
<br />
=== Nginx ===<br />
<br />
This is <b>NOT</b> tested. Please let me know if there are any problems with the configuration settings!<br />
<syntaxhighlight lang="bash"><br />
upstream chat_cluster {<br />
server localhost:5280;<br />
}<br />
<br />
location /http-bind {<br />
proxy_set_header X-Real-IP $remote_addr;<br />
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
proxy_set_header Host $http_host;<br />
proxy_set_header X-Forwarded-Proto https;<br />
proxy_redirect off;<br />
client_max_body_size 4M;<br />
client_body_buffer_size 128K;<br />
<br />
proxy_pass http://chat_cluster;<br />
}<br />
</syntaxhighlight><br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3249Vines2014-09-30T12:22:48Z<p>Zauberstuhl: /* Update */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password. <br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3217Vines2014-09-26T11:25:17Z<p>Zauberstuhl: /* Certificates */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake assets:precompile<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
{{Serious|For encrypted communication we need a cerificate and the related key.<br>}}<br />
Put your files in the vines-cert folder, you can configure the path in diaspora.yml under the chat section.<br />
<br />
The default path is <code>/path_to_diaspora_installation/config/vines/</code>.<br><br />
Also the domain name should be included in the file name e.g.:<br />
<br />
* example.com.crt<br />
* example.com.key<br />
<br />
<br />
If you have no certificate and want to generate a self-signed you can do that with vines, too.<br />
Just execute in you diaspora environment <code>bundle exec vines cert example.com</code> and you should be good to go ..<br />
<br />
{{Note|If you use your server in a development mode, think about enabling acceptance of self-signed certificates in your diaspora.yml!}}<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password. <br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3177Vines2014-09-16T11:58:22Z<p>Zauberstuhl: /* Configuration */</p>
<hr />
<div>{{Work_in_progress}}<br />
{{Note|Report issues and suggestions to the Vines server at https://github.com/diaspora/vines/issues}}<br />
{{Note|The pull request integrating this with Diaspora is at https://github.com/diaspora/diaspora/pull/5073}}<br />
<br />
This wiki-page is about setting up [http://getvines.org Vines] on your Diaspora installation.<br />
<br />
{{Quote|Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.| http://www.getvines.org/}}<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge XMPP chat feature branch from zauberstuhl/diaspora.git:<br />
<br />
<syntaxhighlight lang="bash"><br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
</syntaxhighlight><br />
<br />
{{Serious|xmpp_chat_feature-branch is based upon Diaspora develop-branch!}}<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your <tt>Gemfile</tt>. The only thing you have to do now is follow the [[Updating|Update guide]]!<br />
In short, execute following:<br />
<br />
<syntaxhighlight lang="bash"><br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake assets:precompile<br />
bundle exec rake db:migrate<br />
</syntaxhighlight><br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in <tt>diaspora.yml.example</tt>. If you'd like to activate the chat feature<br />
you have to copy paste the chat section from <tt>diaspora.yml.example</tt> to your actual <tt>diaspora.yml</tt> configuration file and<br />
activate the chat globally:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
</syntaxhighlight><br />
<br />
If you have already a working XMPP server and need only the front-end:<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</syntaxhighlight><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br />
You'll also find the required parameters in <tt>diaspora.yml.example</tt> with a small description.<br />
<br />
== Certificates ==<br />
<br />
...<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
<br />
<syntaxhighlight lang="bash"><br />
./script/server<br />
</syntaxhighlight><br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your Diaspora ID and your Diaspora password. <br />
<br />
= Debugging =<br />
<br />
On default Vines will log to <tt>log/vines.log</tt> and has a log level of <tt>info</tt> set.<br />
Set the logging level to <tt>debug</tt>, <tt>info</tt>, <tt>warn</tt>, <tt>error</tt>, or <tt>fatal</tt>. The <tt>debug</tt> level logs all XML sent and received by the server.<br />
<br />
<syntaxhighlight lang="yaml"><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</syntaxhighlight><br />
<br />
<br />
[[Category:Podmin]] [[Category:Installation]]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=User:Zauberstuhl&diff=3172User:Zauberstuhl2014-09-15T14:15:28Z<p>Zauberstuhl: /* Vertica DB support */</p>
<hr />
<div>Contact Me:<br />
* [mailto:lukas@zauberstuhl.de E-Mail]<br />
* [https://github.com/Zauberstuhl GitHub]<br />
* [https://sechat.org/u/lukas Diaspora*]<br />
<br />
= Summary =<br />
<br />
== [Merged] Report Feature ==<br />
<br />
Since Diaspora v0.4.0.0 it is possible to report posts and comments (see [https://github.com/diaspora/diaspora/pull/4517 #4517] and [https://github.com/diaspora/diaspora/pull/4781 #4781]).<br />
<br />
== XMPP Chat Feature ==<br />
<br />
With the upcoming feature you'll be able to chat with your Diaspora friends via XMPP protocol (see [https://github.com/diaspora/diaspora/pull/5073 #5073]).<br><br />
<br />
[https://wiki.diasporafoundation.org/Vines Documentation: Vines]<br />
<br />
== Vertica DB support ==<br />
<br />
{{Serious|This is a research project! Do not use it unless you really know what you are doing!}}<br />
<br />
<br />
[http://www.sophos.com/en-us/medialibrary/PDFs/technical%20papers/sophos-database-performance-comparison-tpna.pdf Database performance comparison]<br />
<br />
Dependencies:<br />
aptitude install postgresql libpq-dev<br />
<br />
Gemfile:<br />
gem 'activerecord-vertica-adapter', :git => 'https://github.com/evrone/activerecord-vertica-adapter.git'<br />
<br />
Git-Branch:<br />
git clone https://github.com/Zauberstuhl/diaspora.git -b vertica</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=User:Zauberstuhl&diff=3171User:Zauberstuhl2014-09-15T13:34:21Z<p>Zauberstuhl: </p>
<hr />
<div>Contact Me:<br />
* [mailto:lukas@zauberstuhl.de E-Mail]<br />
* [https://github.com/Zauberstuhl GitHub]<br />
* [https://sechat.org/u/lukas Diaspora*]<br />
<br />
= Summary =<br />
<br />
== [Merged] Report Feature ==<br />
<br />
Since Diaspora v0.4.0.0 it is possible to report posts and comments (see [https://github.com/diaspora/diaspora/pull/4517 #4517] and [https://github.com/diaspora/diaspora/pull/4781 #4781]).<br />
<br />
== XMPP Chat Feature ==<br />
<br />
With the upcoming feature you'll be able to chat with your Diaspora friends via XMPP protocol (see [https://github.com/diaspora/diaspora/pull/5073 #5073]).<br><br />
<br />
[https://wiki.diasporafoundation.org/Vines Documentation: Vines]<br />
<br />
== Vertica DB support ==<br />
<br />
{{Serious|This is a research project! Do not use it unless you really know what you are doing!}}<br />
<br />
<br />
[http://www.sophos.com/en-us/medialibrary/PDFs/technical%20papers/sophos-database-performance-comparison-tpna.pdf Database performance comparison]<br />
<br />
Dependencies:<br />
aptitude install postgresql libpq-dev<br />
<br />
Gemfile:<br />
gem 'activerecord-vertica-adapter', :git => 'https://github.com/evrone/activerecord-vertica-adapter.git'</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=User:Zauberstuhl&diff=3167User:Zauberstuhl2014-09-14T23:02:28Z<p>Zauberstuhl: </p>
<hr />
<div>Contact Me:<br />
* [mailto:lukas@zauberstuhl.de E-Mail]<br />
* [https://github.com/Zauberstuhl GitHub]<br />
* [https://sechat.org/u/lukas Diaspora*]<br />
<br />
= Summary =<br />
<br />
== [Merged] Report Feature ==<br />
<br />
Since Diaspora v0.4.0.0 it is possible to report posts and comments (see [https://github.com/diaspora/diaspora/pull/4517 #4517] and [https://github.com/diaspora/diaspora/pull/4781 #4781]).<br />
<br />
== XMPP Chat Feature ==<br />
<br />
With the upcoming feature you'll be able to chat with your Diaspora friends via XMPP protocol (see [https://github.com/diaspora/diaspora/pull/5073 #5073]).<br><br />
<br />
[https://wiki.diasporafoundation.org/Vines Documentation: Vines]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=User:Zauberstuhl&diff=3166User:Zauberstuhl2014-09-14T22:57:32Z<p>Zauberstuhl: Created page with "This user page contains my contribution to Diaspora* Lukas Matt <[mailto:lukas@zauberstuhl.de lukas@zauberstuhl.de]> = Implementation = == [Merged] Report Feature == Since..."</p>
<hr />
<div>This user page contains my contribution to Diaspora*<br />
<br />
Lukas Matt <[mailto:lukas@zauberstuhl.de lukas@zauberstuhl.de]><br />
<br />
= Implementation =<br />
<br />
== [Merged] Report Feature ==<br />
<br />
Since Diaspora v0.4.0.0 it is possible to report posts and comments (see [https://github.com/diaspora/diaspora/pull/4517 #4517] and [https://github.com/diaspora/diaspora/pull/4781 #4781]).<br />
<br />
== XMPP Chat Feature ==<br />
<br />
With the upcoming feature you'll be able to chat with your Diaspora friends via XMPP protocol (see [https://github.com/diaspora/diaspora/pull/5073 #5073]).<br><br />
<br />
[https://wiki.diasporafoundation.org/Vines Documentation: Vines]</div>Zauberstuhlhttps://wiki.diasporafoundation.org/wiki/index.php?title=Vines&diff=3158Vines2014-09-14T19:34:05Z<p>Zauberstuhl: </p>
<hr />
<div>This wiki-page is about setting up vines on your Diaspora installation.<br />
<br />
'''Bugs''': Any bugs or suggestions related to the Vines server goes [https://github.com/diaspora/vines/issues here...]!<br />
<br />
Related Diaspora pull-request [https://github.com/diaspora/diaspora/pull/5073 diaspora/diaspora#5073]<br />
Vines is an XMPP chat server that connects you with large clusters of machines as easily as chatting with a friend.<br><br />
It's a new, simpler way to manage your servers in the cloud or the data center.<br />
<br />
= Installation =<br />
<br />
== Set up branch ==<br />
<br />
Checkout or merge xmpp chat feature branch from zauberstuhl/diaspora.git:<br />
git remote add zauberstuhl https://github.com/Zauberstuhl/diaspora.git<br />
git fetch zauberstuhl && git checkout -b xmpp_chat_feature zauberstuhl/xmpp_chat_feature<br />
<br />
'''Warning''': xmpp_chat_feature-branch is based upon Diaspora develop-branch!<br />
<br />
<br />
== Update ==<br />
<br />
All required dependencies are included in your Gemfile. The only thing you have to do now is follow the [https://wiki.diasporafoundation.org/Updating Updating-article]!<br />
In short, execute follwing:<br />
<br />
export RAILS_ENV=development<br />
bundle install<br />
bundle exec rake assets:precompile<br />
bundle exec rake db:migrate<br />
<br />
= Configuration =<br />
<br />
You'll find all required configuration parameters in diaspora.yml.example. If you'd like to activate the chat feature<br><br />
you have to copy paste the chat section from diaspora.yml.example to your actual diaspora.yml configuration file and<br><br />
activate the chat globally:<br />
<nowiki><br />
chat:<br />
enabled: true<br />
</nowiki><br />
<br />
If you have already a working xmpp server and need only the front-end:<br />
<nowiki><br />
chat:<br />
enabled: true<br />
server:<br />
enabled: false<br />
</nowiki><br />
<br />
It is also possible to configure the port and address of the client-to-server, server-to-server and the BOSH service.<br><br />
You'll also find the required parameters in diaspora.yml.example with a small description.<br />
<br />
= Run it =<br />
<br />
If you are finished configuring the chat server you can start Diaspora as normal:<br />
./script/server<br />
<br />
Log into Diaspora and you should see the web client in the right corner.<br><br />
You can also log into it with your favorite desktop client like Pidgin.<br />
<br />
For that use your diaspora handle and your diaspora password. <br />
<br />
= Debugging =<br />
<br />
On default vines will log to log/vines.log and has a info-log-level set.<br><br />
Set the logging level to debug, info, warn, error, or fatal. The debug level logs all XML sent and received by the server.<br />
<nowiki><br />
chat:<br />
server:<br />
log:<br />
file: 'log/vines.log'<br />
level: 'debug'<br />
</nowiki></div>Zauberstuhl