Install Docker on Raspberry Pi

This article explains how to install Docker on a Raspberry Pi, how to build a simple image, and how to run a container based on it.

Update 20/9/22: This procedure has been updated and tested successfully on RaspiOS “Bullseye”, release date 2022-09-06 (lite version).

Docker provides a mobile execution environment in which to run software. It is a very popular container technology. Docker is useful in the rapid deployment of applications and in application isolation. It is a valuable tool for developers, users and systems administrators. In this procedure, it will be used to install a simple video processing application called “comskip“.

Although the article is entitled Install Docker on Raspberry Pi, this procedure will work unaltered on most Linux distros, which is one of the advantages of Docker.

Besides acting as a demonstration for those wanting to learn about Docker, this article is aimed at readers of my previous articles How to Watch and Record Live TV with a Raspberry Pi and How to Install Comskip on a Rasperry Pi (without Docker).

Continue reading

How to Watch and Record Live TV with a Raspberry Pi

This procedure explains how to turn a Raspberry Pi into a DVR, or “digital video recorder”. A DVR is a box that sits under your television, allowing you to watch digital television and record it to a hard disk. TV and recordings can also be “streamed” to other devices on your network, such as phones, tablets and PCs.

Procedure last updated 8th Jan 2022 for OSMC 19 / Kodi “Matrix” / Pi 4.

Commercial examples of DVRs are available from manufacturers like Humax and Panasonic, providing access to free digital TV services, which in the UK are called Freeview and Freesat. Other brand names are used in other countries, but the underlying technology is the same. By following the article, you will be able to view, record and stream free digital TV. (You won’t be able to watch encrypted services, like those broadcast by Sky and BT).

Why turn a Pi into a DVR? You might be just curious about the possibilities. You might be looking to move from a paid-for service (eg. BT or Sky) to a free one. You might want to replace older equipment or just get access to more modern services, such as HDTV (high definition TV). I was looking to replace my old Topfield DVR, and the procedure below worked for me.

Continue reading

Simple Nextcloud Installation on Raspberry Pi

This article explains how to install Nextcloud on the Raspberry Pi. It has been tested with the latest version of Nextcloud (20.1 at the time of writing), but should work for future versions too.  It has also been successfully tested on the latest Pi hardware, the Raspberry Pi 4, and on earlier Pi versions, and on the latest OS, Raspbian/Raspberry Pi OS 10 “Buster”.  Article last updated 21/6/2021.

Nextcloud is an open source software package providing remote file sharing services, similar to Dropbox. But with Nextcloud, you retain ownership, security and control of the shared data. Nextcloud works well on a Pi 2, Pi 3 and especially a Pi 4 but will run very slowly on a Pi 1.

Note: This is a manual, step-by-step procedure. If you would rather do the installation automatically, please see my recent article Automatic Nextcloud Installation on Raspberry Pi, which explains how to install Nextcloud with 3 commands. It is the quickest and easiest way to get Nextcloud running. Both procedures achieve the same overall result, however.
Continue reading

Linux Device Change Breaks Encrypted Swap

Linux disk partition names such as /dev/sda1, /dev/sda2 are not as fixed as they once were. From time to time they can change. Perhaps due to a hardware change or kernel upgrade, or sometimes for no apparent reason. If and when this happens on your system, things can break. In this case, an encrypted swap partition had been configured as “/dev/sda6”, and failed to activate following a change in the /dev/sdXX partition names. This article describes the symptoms and a fix.

The article also discusses a bug affecting Ubuntu 14.04 based distributions, which can make it more difficult to recover an encrypted swap configuration broken by a device name change. Continue reading

Simple Owncloud Installation on Raspberry Pi 2

The Raspberry Pi’s low power consumption makes it well suited to the role of always-on server. This post describes how to install Owncloud onto the Pi. Owncloud is an open source software package providing remote file sharing services, similar to Dropbox. But with Owncloud, you retain ownership, security and control of the shared data. Owncloud works well on a Pi 2 and Pi 3 but will run very slowly on a Pi 1.

Update 20th November 2016 – There is a newer version of this article. Please see Simple Nextcloud Installation on Raspberry Pi. Nextcloud was forked from ownCloud in June 2016. It now seems to have become the natural successor to Owncloud. I recommend using Nextcloud rather than Owncloud. This article remains on line because it might be helpful to existing Owncloud users, particularly the parts about upgrading and using external USB media.

UPDATE 16th July 2016 – Nextcloud was forked from Owncloud in June 2016. The procedure below can be used both for Owncloud and the initial release of Nextcloud (version 9.0.52). Thanks to Dan for this information.

My Raspberry Pi 2 was purchased from RS Components in the UK. It was installed with Raspbian “Jessie” (Debian 8) by applying the image “2016-02-09-raspbian-jessie.img” downloaded from the raspberrypi.org downloads page. The following procedure was then performed without any further pre-work (other than enabling ssh in the basic setup). Continue reading

An Example of Parallel Processing

This post shows how to use parallel processing to get a CPU intensive job done faster in Unix/Linux. By splitting a large task into several parts, it is quite easy to give each part to a separate CPU, and complete the task many times faster than it would on a single processor.

These days, even small PCs and other devices often come equipped with several CPU cores. But some tasks will use only one core, sometimes using 100% of it, while other cores stand by idle. Sometimes this is a waste of resources. Continue reading

File Serving: Sheevaplug vs Pi vs WDTV vs Linkstation vs Home Hub 3

In need of some network storage in the home ? Well, you could go off and buy a proper NAS unit, offering RAID, several Tb of storage, fast access speeds and so on. On the other hand, you might have something lying round the house that will do. It won’t be as good as a proper NAS, but it might just be good enough. Continue reading

Mounting BT Home Hub 3 USB on WD TV Live

This post may be of interest to UK users who own both a BT Home Hub 3 router and a WD TV Live media streamer. Both are Linux based systems, but getting one to work with the other can be a bit of a challenge.

The USB port on the back of the Home Hub 3 can be used to share storage over the network. Plug in a disk or memory stick, and it is automatically shared out as a windows share. Using a large capacity memory stick offers the possibility of NAS like, always-on access to your media files from any connected device. Low power consumption too. This post explains how access the USB connected drive from the WD TV Live. Continue reading

Resizing /tmp on Red Hat 5.3 (ext3, LVM)

This is how to do a simple file system increase in Logical Volume Manager. For example, increasing /tmp from 512 Mb to 1 Gb.

/tmp is a logical volume:

# df -h /tmp
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/vg00-tmpvol
                      496M   19M  452M   4% /tmp

Running “vgdisplay /dev/vg00” showed that volume group vg00 contained 3.5 Gb of free space. Extended the logical volume with lvextend: Continue reading

Huge Apache Error Log from Solaris 10 LicenseWatcher

Working on a client site recently, I noticed their Apache error log had grown to 32 Gb in size. The file was being written to at a rate of a quarter of a million lines a day, propelled by various cron jobs set up to run every 5 minutes. A PHP reconfiguration fixed the problem.

The box was a Solaris 10 system running “License Watcher“, and those messages was all coming from the License Watcher php code. Not genuine errors, just repeated diagnostics. I edited /usr/local/php/lib/php.ini and changed this line Continue reading