wiki:how-to/servers/support/gnusocial

Version 11 (modified by Steve Revilak, 23 months ago) (diff)

Removed old section

Background

https://social.mayfirst.org is MF/PL's GnuSocial instance.

ticket:12504 contains information about upgrading gnusocial from 1.1.x to 1.2.x.

ticket:10723 is contains a (somewhat disorganized) hodgepodge of information about gnusocial administrivia

Administration

The administrative credentials are stored in keyringer. Look for social.mayfirst.org.

Setting up Meteor real-time updates over https

In order to have real-time updates in the web interface of GNU Social one needs to enable the Meteor plugin (part of GNU Social) and set up a Meteor server. We want to serve Meteor over https, and opt to use Apache for proxying the URLs for this. In this way the traffic will be encrypted, and also Meteor won't be directly available externally, which always feels safer :-)

The Meteor server can be downloaded from http://meteorserver.org/#download - I used the latest stable source package. Unpack the source code in some suitable directory, then copy the sample config to its place:

cp meteord.conf.dist /etc/meteord.conf

At the beginning of this file you need to add these configuration options. It means that the Meteor server will be listening to localhost for both controller (sending messages) and subscriber (client waiting for messages). The subscriber is the web browser, but this will be proxied via apache, which is why we can bind to localhost.

ControllerIP 127.0.0.1
ControllerPort 4671
SubscriberIP 127.0.0.1
SubscriberPort 8085
SubscriberDocumentRoot /path/to/your/meteor/public_html/

Set the SubscriberDocumentRoot to where you unpacked the meteor source and append /public_html/. If you are serving over https (which you should) you need to edit public_html/meteor.js and change the scheme: setting from http to https.

Next set up Apache proxying in the place for your GNU Social virtual host:

  # Proxy for Meteor server
  <IfModule mod_proxy.c>
    ProxyPass /poll.html http://127.0.0.1:8085/poll.html
    ProxyPassReverse /poll.html http://127.0.0.1:8085/poll.html
    ProxyPass /stream.html http://127.0.0.1:8085/stream.html
    ProxyPassReverse /stream.html http://127.0.0.1:8085/stream.html
    ProxyPass /meteor.js http://127.0.0.1:8085/meteor.js
    ProxyPassReverse /meteor.js http://127.0.0.1:8085/meteor.js
    ProxyPass /push/ http://127.0.0.1:8085/push/
    ProxyPassReverse /push/ http://127.0.0.1:8085/push/
  </IfModule>

You also need to add the proper modules to apache and restart:

a2enmod proxy
a2enmod proxy_http
service apache2 restart

Finally enable the plugins in the GNU Social config.php file:

addPlugin('Realtime');
addPlugin('Meteor', array('webserver' => 'your.gnu-social.site.com',
    'webport' => '443',
    'controlserver' => '127.0.0.1',
    'controlport' => '4671',
    'protocol' => 'https'
    ));