Running a Diaspora pod on Ubuntu 10.10

Edit: Since Diaspora has switched from mongo db to mysql, the procedure below is now outdated. I may or may not update this page, or write a new guide.

During the holidays I have had some time to look into Diaspora.
Diaspora is a distributed social network, with a focus on privacy, security and ownership of ones own content. Everyone is free to run their own pod, and users on different pods can connect and communicate with each other. (Diaspora servers are called pods). The Diaspora software is still being developed and is in an alpha state.

Installing Diaspora
There is a great guide to installing Diaspora on Mac OSX, Ubuntu or Fedora here.
On Ubuntu 10.10 it boils down to this.

First install some required packages.
sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2 ruby-full mongodb libssl-dev imagemagick libmagick9-dev git-core redis-server rubygems
sudo gem install bundler
sudo ln -s /var/lib/gems/1.8/bin/bundle /usr/local/bin/bundle

Then get Diaspora and the required gems.
git clone http://github.com/diaspora/diaspora.git
cd diaspora
bundle install --path vendor

Configure Diaspora and nginx
cd config
cp app_config.yml.example app_config.yml

now edit app_config.yml and change the hostname. If you want your pod to be able to send e-mail also edit the mailer_on and smtp_* entries. All the rest is for more advance settings, and your pod should run just fine with the default settings.

One last thing that needs to be set up, before you can enjoy your very own Diaspora server is a proxy, so that requests sent to port 80 are routed to port 3000.
I use the nginx server, as recommended.

Create a file called diaspora in /etc/nginx/sites-available with this content (where you of course change name-of-your-domain to the relevant string):

server {
        listen   80;
        server_name  diaspora.name-of-your-domain;
        access_log  /var/log/nginx/diaspora.name-of-your-domain.access.log;
        location / {
                proxy_pass http://name-of-your-domain:3000;
        }
}

Activate it with
sudo ln -s /etc/nginx/sites-available/diaspora /etc/nginx/sites-enabled/diaspora
Then restart the nginx server with
sudo /etc/init.d/nginx restart

Finally, if you also want to allow the users of your pod to propagate their status to Twitter and Facebook, you should follow this easy guide on how to configure the oauth_keysm.yml file.

You should now be able to start your pod by issuing
./script/server
from the diaspora directory.

Running Diaspora
However, this way of starting the pod can result in an inability to add contacts from other pods. So inspired by this you can do the following.

sudo update-rc.d -f redis-server remove
sudo sed -i 's/daemonize yes/daemonize no/' redis.conf
sudo /usr/bin/redis-server /etc/redis/redis.conf &

(You will need to start the redis server each time you reboot your host, or if the server fails in other ways.)

Now, each time you want to start your Diaspora pod run the following three commands from the diaspora directory. Wait for one service to start, before starting the next.

ruby script/websocket_server.rb &

QUEUE=receive,mail,receive_local,socket_webfinger,http_service,http,receive_salmon bundle exec rake resque:work &

bundle exec thin start -p 3000 -e development &

You can of course do this more elegantly, by wrapping it up in some scripts, but hopefully you get the idea. So instead of using the script/server script I use those three commands to start my pod.

Now your pod should finally be ready for use.

Now what?
So, should everyone run their own server? Properly not. Diaspora is still so early in the development process that normal users should think twice before using it. The features are limited, and there are still plenty of bugs.

But if you want to see what it can do, look for bugs or are just curious, then why not?. However, you don’t need to run your own pod for that. There are plenty of pods out there that accept new user signups.
Take a look at the list over here: http://podup.sargodarya.de/.

You should also feel free to use my pod, located at diaspora.compadre.dk.
What ever you choose to do, please note that this is still alpha-software, and should be treated as such.

If you need someone to add as contact for testing purposes, feel free to add me: soeren_b_c@diaspora.compadre.dk.

For more info about Diaspora see:

https://joindiaspora.com/ – the official Diaspora website, that also hosts a pod, run by the core developers. Currently the pod at joindiaspora.com is closed for new signups, but due to the distributed nature of Diaspora any pod should be fine, as long as you trust the people running the pod.
http://podup.sargodarya.de/ – list of running pods.
http://en.wikipedia.org/wiki/Diaspora_%28software%29 – Wikipedia article

Great Succes!

Ubuntu 10.10 has been released, and here in Copenhagen we managed to gather a nice group of people at the local Café Klaptræet, for a relaxed release party get-together.

With only three days notice I was pleasantly surprised by the big turnout, and I think it is something we should consider doing again. Sometimes there doesn’t need to be an agenda, and talks and the like.
Sometimes it’s just nice to meet up and have a soda, coffee or beer with other Ubuntu and Free Software users, while sharing thoughts and ideas about Ubuntu, software and life in general.

I haven’t had much time to look at the new Ubuntu release, but hopefully I will have time to look into it in more detail when I have my fall vacation in one weeks time.

Other Ubuntu users around the world will be celebrating the release in the coming days as well. Feel free to share your release party stories and links to photos in the comments below.