Decentralizing Twitter: status.net Installation Howto

Running an own microblogging server has several advantages over using Twitter directly. Many applications support Status.net as an open source implementation, and your tweets can conveniently be pushed to your Twitter account.


This is a condensed version of the official installation document at [url=http://gitorious.org/statusnet/mainline/blobs/master/README]http://gitorious.org/statusnet/mainline/blobs/master/README[/url]
# status.example.com maps to /var/www/status/
cd /var/www/status/
wget http://status.net/statusnet-0.9.6.tar.gz
tar -xzf statusnet-0.9.6.tar.gz --strip-components=1
rm statusnet-0.9.6.tar.gz
cd ..
chgrp www-data status/
chmod g+w status/
cd status/
chmod a+w avatar/ background/ file/
mysqladmin -u "root" create statusnet
mysql
GRANT ALL on statusnet.* TO 'statusnetuser'@'localhost' IDENTIFIED BY 'statusnetpassword';
-> http://status.example.com/install.php
# fancy urls
cp htaccess.sample .htaccess
- change RewriteBase to /
#edit config.php
$config['site']['fancy'] = true;
# register twitter dev acc http://dev.twitter.com/apps/
- Browser
- Callback address http://status.example.com/index.php/twitter/authorization
# edit config.php to support twitter push and pull
addPlugin('TwitterBridge');
$config['twitter']['enabled'] = true;
$config['twitterimport']['enabled'] = true;
$config['avatar']['path'] = '/avatar';
$config['twitter']['consumer_key'] = 'XXXXXXXX';
$config['twitter']['consumer_secret'] = 'XXXXXXXX';
# disable sharing location by default
$config['location']['sharedefault'] = 'false';
# todo: memcache
# how do i disable microID by default?

You should also set up HTTPS and configure Status.net to use it (admin panel). I use Tweetdeck, which supports status.net accounts (Add Twitter account, Advanced Options -> Twitter Base URL: https://status.example.com/api/).
My status.net instance can be found at [url=https://status.headstrong.de/]https://status.headstrong.de/[/url]. The web server is configured to not keep any IP logs. If you want an account, just ask.
It is also very easy to install and enable Memcache:
apt-get install memcached php5-memcache
# edit statusnet config.php
$config['memcached']['enabled'] = true;
$config['memcached']['server'] = 'localhost';
$config['memcached']['port'] = 11211;

That’s it. ([url=http://stackoverflow.com/questions/631903/how-do-you-know-if-memcached-is-doing-anything]StackOverflow: How do you know if memcached is doing anything?[/url])

Status.Net as Tor Hidden Service

Initially I planned to deploy my status.net installation at https://status.headstrong.de/ as a hidden service, too. The problem with StatusNet at this point is that it does not support any kind of aliases: The URLs are absolute, and devs told me I would be unable to rip out that part because the whole setup depends on a fixed hostname. That hostname is used to communicate with other servers and is part of your StatusNet address (user@hostname).
The only “out of the box” solution I see for now is to install a StatusNet instance as hidden service only, but it would be unable to communicate with other StatusNet servers. I asked devs about ways to synchronize two installations, but they told me not to even try it.
I cannot believe that StatusNet cannot be modified to use one hostname publicly, but still use relative URLs and be accessible through hidden service as well. Someone should really look into that.

9 Responses

  1. nblr says:

    Seriously? MySQL?? eww. 🙁
    Is there no sqlite-support?

  2. Moritz says:

    Not yet. Mysql and PostgreSQL is supported. It’s open source, feel free to add it. I’m not sure why you would want sqlite though.

  3. nblr says:

    why would i want to burden myself with mysql?
    sqlite is more than sufficient for this task and considerably slimmer.

  4. walery says:

    I think it’s good idea to delete install.php
    https://status.headstrong.de/install.php

  5. walery says:

    THX for this article, works well for me 🙂

  6. anil says:

    do you know how to edit html theme & layout design

  7. asfehani says:

    windows live messenger
    unique ID:00037ffeb31f5189

  8. I recently started wondering how to run my instance as a Tor hidden service as well as a publicly available instance. The biggest problem is of course as mentioned the permanent URIs for notices etc. that by design are uniquely mapped.
    Some sort of alias system could be technically feasible, but I think the current state of things would require too much rewriting for anyone to sit down and just do it.
    Nevertheless, I’d love to start working on this myself. But there are OStatus reliability issues that should be looked upon more closely when dealing with such a fragile network that Tor really is.
    Are you running a service like this now, and should we start experimenting? .) You’ll find me as MMN-o in #statusnet on irc.freenode.net or https://freesocial.org/mmn