GNU social

From Organic Design wiki
Revision as of 12:50, 13 November 2016 by Nad (talk | contribs) (Installation)

Installation

I found installation to be fairly straight forward, it's a basic LAMP system that requires a database to be created prior that can be referred to in the installation procedure. Simple clone the repo of their source code in your web space and then browser to the install.php script.

For friendly URLs use a rule such as the following:

rewrite ^(.*)$ /social/index.php?p=$1 last;

For some reason after the installation procedure had finished, the link it gave me to the site included a /social at the start of the path which shouldn't have been there. I noticed that it had given the values "social" to $config['site']['path'] so I set it to an empty string and then things mostly worked. But still many things such as avatars and email confirmation still included this incorrect prefix. I was able to fix some instances of the problem by editing some paths in the admin/paths screen, but still some instances of this problem persisted, so in the end I had to add a rewrite rule in the web-server configuration:

rewrite ^/social(.*)$ $1;

I raise an issue about this problem, but I don't have much hope for this being dealt with any time soon, because a couple of other minor issues I had had already been raised - over a year ago!

Some other recommended settings in config.php to make things more responsive are as follows:

$config['site']['theme'] = 'neo-rudism';
$config['queue']['enabled'] = true;
$config['queue']['subsystem'] = 'db';
$config['queue']['daemon'] = true;

Remote connections

For some reason remote follows don't work when I use the email form of my ID, but if I use the URL form it works fine.

Connecting to Twitter

There are many plugins available for GNU social, most are shipped with the system but are not enabled by default. The TwitterBridge allows you to sign in with Twitter and to have your GNU social posts go onto your Twitter stream and your Twitter contact's posts show in your GNU social stream.

First enable the application in your config.php as follows:

addPlugin(
    'TwitterBridge',
    array(
        'consumer_key'    => 'YOUR_CONSUMER_KEY',
        'consumer_secret' => 'YOUR_CONSUMER_SECRET'
    )
);

To get your consumer key and secret, you need to add GNU social as a new app in Twitter from https://apps.twitter.com/app/new. The name for your app needs to be globally unique, e.g. "OrganicDesign GNU social connection". Set the URL to the base URL of your site and the callback to URL/twitter/authorization. You'll need to have your Twitter account connected to your mobile to add an app - just one more reason for leaving! You then go to the Twitter menu item in your GNU social settings and click on the "connect my twitter account" link.

You then need to start the daemons:

sh scripts/startdaemons.sh

You may want to also have this run on reboot by adding the following to you crontab:

@reboot /bin/sh /var/www/domains/social/scripts/startdaemonts.sh >/dev/null

See also