Install Redis on a Raspberry Pi using Docker

How to install Redis on a Raspberry Pi using Docker

I’m a big fan of Redis, a fast in-memory database that persists on disk, and I’ve previously written a Guide to Using Redis with Node.js which provides a fairly comprehensive overview of using Redis from the command line and using it in conjunction with Node.js.
With the introduction of the new Stream data type in Redis 5.0, I decided it was time to get the new Redis 5.0 bits up and running on my Raspberry Pi as Redis Streams looked like it could be useful in a number of IoT scenarios.

I updated my Raspbian package list using “sudo apt update” and, much to my chagrin, the most recent version of Redis available was Redis 3.2.6 which was almost two years old. Since the Raspbian package repository follows the LTS (long term support) Debian releases, the packages available are conservative and stable, but often dated.

How did I solve this dilemma and install the latest version of Redis given the obsolescing packages housed in Raspbian repository? My ship ⛵️ came in with Docker!😀 In this article, we learn how to install Redis on a Raspberry Pi using Docker. Using Docker provides many benefits including the ability to install the latest releases of Redis long before they are available in the Raspbian package repository—without the need to compile the Redis source code ourselves.

Share
Raspberry Pi firewall

How to Set up a Firewall for Redis using ufw

Here’s the scenario: we have a Redis server running on a Raspberry Pi and we want to make it available to other machines on a network rather than just using the Redis server in a localhost context. We have already added a password to the Redis server instance; however, due to the high-performance capabilities of Redis, it is possible for outside systems to barrage it with massive number of passwords in parallel to break in. It’s time for a firewall.

In this tutorial, we will learn how to set up a firewall for Redis using ufw. The steps we describe will be useful for any Debian-based distribution such as Debian, Ubuntu, or Raspbian, and will equip you to create firewall rules for other applications too.

Share

Guide to Using Redis with Node.js Released

I just completed a pretty extensive Guide to Using Redis with Node.js.  In this guide, we explore using Redis, a fast in-memory database that persists on disk, in conjunction with Node.js. We work through real examples to help equip you to: Install Redis Use Redis as a standalone tool Build Node.js applications that interact with Redis You can check it out here.

Share