Self hosting

What is possible to host locally on a linux server, that would otherwise be delegated in the silo of big corporations? What is worth the effort? In all these cases, the underlying server will have to run 24/7, not necessarily a powerful box.

  • mail server: yes, of course this is the first and most straightforward service that should stay under the control of the user. Because of the sensitivity of the information it handles. Setting up a mail server is not just configuring postfix or sendmail, but also an IMAP server, an anti-spam filter running server-side, a greylist server, a webmail;
  • dns server: the control of the DNS for the zone hosting your services is required, because the DNS tells the Internet what is the address of the box running your mail server, the box running your web server, and all other services you may host yourself;
  • web server: setting up an apache web server on your box is the entry point to host all other kinds of web services, so even if you don’t plan to write pages in HTML yourself, you’ll have to run a web server. The limitation in the services that you’ll be able to host depends on the upload bandwidth of you ISP, considering that even modest audio files may slow down considerably your network connection if they are downloaded by several clients simultaneously. Apache is not well adapted to do traffic shaping, and doing it at the linux level is difficult to tune correctly. Upload capability is often limited in favor of download speed, this is the meaning of A as Asymetric in ADSL, and usually not well advertised by ISP;
  • XMPP/jabber server: hosting a jabber server for one’s own use is interesting, because you keep your list of contacts under your control. It’s a low bandwidth service, because most traffic contains signaling messages. If you want video and audio chat capabilities, you may want to install a STUN or a TURN server.
  • identity provider: running an OpenID server is relatively simple on the top of apache, and it allows you to reclaim you identity with web services that allow this kind of delegation, ad OpenStreetMap does for example;
  • firefox sync: it used to be very simple to host a sync server before the introduction of Firefox Sync 1.5. It requires now more components that run server-side, so it is clearly more difficult, even if not all component are required to run locally, and it is possible to setup an hybrid configuration, where only the sync service runs locally, and it still relies on the remote Firefox Accounts service hosted by Mozilla. However keeping sensitive information like browsing history locally is certainly worth the effort, even if the raw data is never accessible in the clear, even when stored on Mozilla servers.
  • blogging platform: setting up a blogging platform like this WordPress instance is really simple, and doesn’t require much efforts (compared to the firefox sync setup). It is a very classical LAMP application, requiring a database backend, some scripting language and a web server;
  • file sharing, dropbox replacement: setting up OwnCloud to share files is very simple too. You can use it to centralize your calendars and your contacts lists, in addition to share you files. For people using evolution, it may be interesting to setup a syncevolution server too.

Having a local server under the control of the user, and running all these software may be challenging, due to the initial configuration steps required to have a working setup. I think this is worth the effort. Having all these services locally hosted doesn’t restrict the way to communicate with other people, because most of these services rely on a decentralized architecture, or at least can work this way. The last point that remains to be tackled is to stay up to date with all these software installed, to install security updates as soon as they are available on your linux distribution, because each service that run locally is a potential attack target that can compromise your server. Keep your running services up to date and you should be safe.