Setting up on Debian wheezy

As most users (hopefully) know by now is scheduled to move to the new software on June 1, 2013. is a new social networking engine made by the same guy that created StatusNet – the software behind the current

I haven’t used itself for some time since I opted for installing my own StatusNet instance. The nice thing with both StatusNet and is that they are federated, which means that people across many different servers can communicate. A bit like email, you can send a message from e.g. the user sazius at the server to another user, e.g. evan at This is in contrast to services like Twitter, where you are locked to one centralised service provider, and you are forced to endure whatever advertising, API or UI changes that they deem necessary.

Anyhow, I decided I need my own instance as well, so I set out to install it on my Debian “wheezy” based virtual private server (VPS) on gandi. Since there were some tricky parts, I chose to document them in this blog post.

To proxy or not to proxy?

I know the creator prefers people to setup their instances with their own IP address, and run the node.js-based server directly on a web port (80 or 443). In practice, however, most early adopters are people that are already running their own servers, and don’t want to get a new IP address for each service they are running. So I decided quite early to have proxied behind a normal web server. People have not had much luck with Apache for this, and I wanted to try out nginx in any case so I went for that. and node.js

I started by adding a new pumpio user, since I want it to run without root privileges. Then I installed node.js from source, which went quite smoothly following the instructions in the included README file. I created a local install for the pumpio user.

After this I installed (again locally for the user) according to the instructions on its web site – again everything pretty straight-forward. I’m using mongodb and the databank-mongodb for that. Mongodb is just an aptitude install away in Debian.

Next I created a config file for as ~/, i.e. in the home directory of the pumpio user. This how it looks like right now (I took some hints from jpope’s blog post on

    "driver":  "mongodb",
    "params":  {"dbname": "pumpio"},
    "secret":  "somethingverysecrethere",
    "noweb":  false,
    "site":  "",
    "owner":  "Mats Sjöberg",
    "ownerURL":  "",
    "hostname":  "",
    "urlPort": 443,
    "address":  "",
    "port": 8000,
    "cert": "/path/to/ssl/cert,
    "key": "/path/to/ssl/key,
    "nologger":  false,
    "serverUser":  "pumpio",
    "uploaddir": "/home/pumpio/uploads",
    "debugClient": false,
    "firehose": "",
    "disableRegistration": true,
    "canUpload": true,
    "sockjs": true,
    "requireEmail": false,

Chunked encoding issue

Now, you need to setup nginx as well. This is the tricky part, and I didn’t get it right at first, with people having problems to subscribe. The problem is nginx needs to support something called “chunked encoding”, which doesn’t come built in to the version in Debian wheezy. Fortunately it can be added via the HttpChunkinModule, you just need install the nginx-extras package in wheezy, which is a version of nginx that has several additional modules included. Then write an nginx config similar to mine (again, mostly based on jpope’s config):

upstream pumpbackend {
  server max_fails=3 fail_timeout=30s;
  server max_fails=3 fail_timeout=60s;
  server max_fails=3 fail_timeout=90s;

server {
  listen 80;
  rewrite ^$request_uri?;

server {
  listen 443 ssl;

  # this is the important chunked encoding stuff
  chunkin on; 
  error_page 411 = @my_411_error;
  location @my_411_error {

  access_log /var/log/nginx/pump.access.log;
  error_log /var/log/nginx/pump.error.log;

  client_max_body_size 6m;

  keepalive_timeout 75 75;
  gzip_vary off;

  location / {
    proxy_http_version 1.1;
    proxy_set_header Host $http_host;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header X-Real-IP $remote_addr;
    proxy_redirect off;

    proxy_buffers 16 32k;
    proxy_cache off;
    proxy_connect_timeout 60s;
    proxy_read_timeout 60s;
    proxy_pass https://pumpbackend;

That’s it (as far as I can remember). My instance has been up and running for a few days without any problems. If you are using you can subscribe to me here:

Posted by Mats Sjöberg.

You can subscribe to this blog via its RSS feed. Add that link to a Feed reader to get updates whenever there is a new blog post.