Raspberry Pi

Powered by Drupal

Kodi server part 7: Firewall Rules

Submitted by Sam Hobbs on

This is the seventh and final part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This section deals with firewall configuration. Here you will find Uncomplicated Fire Wall (UFW) and iptables rules to prevent transmission from sending traffic using your normal wifi interface, as well as a few extra rules to secure the server against traffic from the VPN side.

Kodi server part 6: Always On VPN Client

Submitted by Sam Hobbs on

This is the sixth part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This section covers configuration of an openvpn client connection to an external server, to anonymise traffic to and from the Kodi box and prevent bandwidth throttling of torrent traffic by your ISP. You will also find some additional configuration to ensure the VPN does not break secure SSH connections from the public internet via your router, and some scripts to make sure Transmission binds to the local IP address of the VPN interface (so it doesn't try and send traffic out over your public connection if the VPN goes down).

Kodi server part 5: Transmission torrent client

This is the fifth part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This section covers Transmission daemon's installation and configuration, and some tips for controlling it using the commandline as well as enabling administration on the local network using the web interface.

Sam Hobbs

Kodi server part 3: Automounting External Drives with udev

Submitted by Sam Hobbs on

This is the third part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This part of the tutorial sets out a few different methods I've tried for auto-mounting known external hard drives, and the working solution I arrived at. My hard drives contain the media files in my library, so I need them to be mounted at consistent locations to avoid breaking Kodi's file indexing and the NFS shares.

Kodi server part 2: NFS file sharing

This is the second part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This part of the tutorial concerns the use of the Network File System (NFS) protocol for sharing files on your network.

Sam Hobbs

Kodi server part 1: Installation and Configuration

Submitted by Sam Hobbs on

This is the first part of a multi-part tutorial describing how to configure the "perfect" Kodi media centre running on top of ubuntu server. Other parts of the tutorial may be found here:

This part of the tutorial deals with basic Kodi installation and network configuration for the server. It sets out some basic configuration to get the system to load Kodi straight away when it boots up, make the media database available to other Kodi clients on the network, enabling the power menu within Kodi's interface, and making sure automatic updates are enabled.

Kodi server

Kodi logo I've spent quite a while recently configuring Kodi on an Intel NUC running Ubuntu that lives behind my TV. I needed this box to:

  • Run a recent version of Kodi on a general purpose Linux OS (I chose Ubuntu server)
  • Load Kodi without any login/password prompt when the device boots
  • Make the media database accessible to other instances of Kodi on the local network
  • Make the actual media files accessible to other computers on the local network, using a fast protocol
  • Automatically mount known hard drives containing media files at consistent mount points (using udev)
  • Allow remote login and administration via SSH
  • Run a "headless" torrent client (transmission) that can be controlled via SSH
  • Run an always-on VPN client connection for torrent traffic

I couldn't find any guides that showed how to bring all of those things together, so I wrote this guide. Since it's likely that some people will need some but not all of the functionality, I've broken the tutorial into sections to make for easier reading. Some sections show you how to achieve things that could be useful on other projects. I'm running Ubuntu server on an Intel NUC, but you could probably use this guide to set up Kodi on a Raspberry Pi.

BASH Script to generate PDF of Source Code with Syntax Highlighting using LaTeX

Submitted by Sam Hobbs on

Sometimes when I'm learning I like to print source code on paper because I find it easier to read, and nicer to annotate. I had a rummage online to see if anyone had come up with a nice way to generate PDFs of source code, and improved what I found into this useful BASH script. The script searches for source code in the current directory and its subdirectories, and uses the typesetting software LaTeX to create a PDF of the contents with syntax highlighting.

Extra Modules for Prosody: Instant Message Chat server for Raspberry Pi / Ubuntu

Submitted by Sam Hobbs on

prosody.png This is part 2 of a 2 part tutorial on Prosody, which will show you how to install and configure extra modules to extend prosody's functionality. Part 1, which deals with basic installation and testing of prosody, is here. Here's an overview of the important additional functionality we will add to prosody:

  • Multi user chats (XEP-0045)
  • Server side message storage (XEP-0313 Message Archive Management)
  • File and image transfer (SI File Transfer and Jingle signalling; in-band and out-of-band methods)
  • Stream Management for surviving connection interruptions and switches - particularly useful on mobile (XEP-0198 Stream Management)
  • Synchronising messages between multiple devices (XEP-0280 Message Carbons)
  • Battery Saving techniques for mobile clients (XEP-00352 Client State Indication)
  • User Blocking (XEP-0191 Blocking Command)

Not all clients support all of these XEPs. I consider the Android client Conversations (F-Droid | Google Play) to be pretty cutting edge in this respect - it's pushing forward a lot of XEPs that are required if we are going to see XMPP compete with the features of proprietary chat clients, particularly on mobile.