Configure a Headless Pi from the Command Line
raspberrypilinuxheadless2022-06-06 - carpie

In April of 2022, the Raspberry Pi OS stopped shipping with a default user. There have been some other changes to Pi setup, so I thought it would be a good time to create an updated headless Pi set up video! The video covers adding a default user, enabling ssh, using ssh keys to login, setting up wifi, setting static IP addresses, and some general configuration items like hostname, timezone, and keyboard layout. In the video, we cre...

Read more

Simple IP Dispenser Update
dhcpdnsdnsmasq2022-04-15 - carpie

Five years ago, I wrote an article about configuring DNSmasq to let you control who gets on your network and what address is assigned to them. The technique still works today. It is a bit of a pain to manually edit in addresses though. So, I created the Simple Ip Dispenser, or SID for short, to help with this. It monitors the DHCP requests and, through an android app, lets you allow a request and give it a specific host name. ...

Read more

TLS certificates for Local Area Networks
tlshttpslan2021-06-11 - carpie

In this article, we're going to look at how to host HTTPS servers, limited to our local LAN without that annoying security warning.

These days, serving anything in clear text is considered bad practice and rightfully so! For HTTP servers the standard answer is to use Transport Layer Security (or TLS). This means you get a certificate for your server signed by an authority your browser already trusts. With services like Let's E...

Read more

Persistent storage for k3s cluster

Kubernetes pods are ephemeral by design. Their replicas can be scaled up and down. They come and go. They can move around to various nodes in the system. When we want to store persistent data, this becomes an issue. Storing data locally on a node is possible, but tying a pod to a node removes many of the benefits of running on Kubernetes. Fortunately, Kubernetes provides a persistent storage system that lets us keep the ephemer...

Read more

Setting up a Raspberry Pi NFS server
raspberrypinfsssd2020-05-31 - carpie

If you need to share files on your home network, setting up an NFS server using a Raspberry Pi and an external hard drive or SSD is a quick and easy way to do just that. If you've been following my Kubernetes on Raspberry Pi series, the server setup we will create in this article can act as your persistent storage provider as well. Let's build...

Read more

Building docker images from scratch

In a previous article, we worked through a common scenario for building a custom docker image for our k3s cluster. In this article, we are going look at creating a custom image from scratch. Well, it's not really from scratch. You'll always have a base image to start from. Most of the bases are really just stripped down Linux images. We have bases for alpine, debian, ubuntu, etc. From these bases we can do whatever we want...

Read more

Building custom ARM docker images

In this series, we have built up a Kubernetes cluster out of Raspberry Pis. We have added the ability to automatically procure TLS certificates for our deployments. And we have installed our own docker registry to store our custom images. Now it is time to actually build and deploy those custom images. In this article, we will learn how to build our own images, from the convenience of our development PC, and then deploy them on ...

Read more

Installing docker registry on k3s

In this article, we are going to install our own docker registry on our k3s cluster. This will provide storage for custom docker images that we are going to build in the future. This will also provide a place on our cluster for k3s to pull custom images from when deploying.

2021-09-07: This article has been updated for k3s versions v1.21.0+k3s1 and above. This version of k3s uses Traefik v2 (for new installations) which ...

Read more

Installing and using cert-manager with k3s

In a previous article we deployed a couple of simple websites on our k3s cluster. They were non-encrypted sites. Now that's fine and they work, but non-encrypted is very last century! These days most websites are encrypted. In this article, we are going to install cert-manager and use it to deploy TLS encrypted sites on our cluster. Not only will th...

Read more

Ingressing with k3s
raspberrypikubernetesk3s2019-12-28 - carpie

In a previous article we built a Kubernetes cluster with a couple of Raspberry Pis and k3s. Now that we have a cluster, let's do something with it! In this article, we will deploy a couple of simple websites and learn how to ingress traffic from the outside world into our cluster using Traefik.

2021-09-07: This article has been updated for k3s versions...

Read more

Kubernetes on Raspberry Pi with k3s
raspberrypikubernetesk3s2019-07-25 - carpie

For a long time I've been interested in building a Kubernetes cluster out of a stack of inexpensive Raspberry Pis. Following along with various tutorials on the web I was able to get Kubernetes installed and working in a 3 Pi cluster. However, the RAM and CPU requirements on the master node overwhelmed my Pi. This caused poor performance when doing various Kubernetes tasks. It also made an in-place upgrade of Kubernetes impossible....

Read more

DIY security system - cloud upload

In a previous article, we set up a basic DIY security system, and then expanded our system to include remote cameras. We've got the front door covered, the back door covered, and the fridge covered (to catch that pesky pizza thief). So, we go off to work and someone breaks in while we're away. We come home...

Read more

DIY security system - remote cameras

In a previous article, we set up a basic DIY security system using motion and a webcam connected to a Raspberry Pi. That's a good start, but let's not stop there. If we have our one camera watching the front door, what about the back door? The garage? Or maybe, we need to catch the thief that's stealing our left over pizza from the refrigerator in the middle of the night! Um, that last...

Read more

DIY security system - the basics
securitymotionraspberrypi2018-03-29 - carpie

I have always liked the idea of having a security system, but never really liked the idea of paying monthly fees or the idea of unscrupulous people in control of cameras in my house. The solution?

Roll my own of course!

In the wonderful world of open source, it's quite easy and inexpensive to do so! In the article, we'll stick with the basics and learn how to set up motion, an open-source motion detection program, with a singl...

Read more

Headless Pi with static IP - wireless edition

Here is an easy way to set up a headless wireless Raspberry Pi without having to connect a keyboard or monitor! In this article we will go through the process of downloading and installing Raspbian Lite on an SD card. We will set the static IP by modifying the files on the card before we boot our Pi. This will give us a preset static IP without the need to connect a keyboard or monitor to the Pi!

The following video demonstrates these i...

Read more

Headless Pi with static IP - wired edition

Here is an easy way to set up a headless wired Raspberry Pi without having to connect a keyboard or monitor! In this article we will go through the process of downloading and installing Raspbian Lite on an SD card. We will set the static IP by modifying the files on the card before we boot our Pi. This will give us a preset static IP without the need to connect a keyboard or monitor to the Pi!

The following video demonstrates these instruc...

Read more

Making DHCP IP assignments easier Part 2

In a previous article we learned how to set up a DNS/DHCP server for our home network using dnsmasq and a Raspberry Pi. This works well but it is a hassle to add a new device or allow a friend on to our network. In the first part of this series, I introduced SID, an ...

Read more

Making DHCP IP assignments easier Part 1

In a previous article we learned how to set up a DNS/DHCP server for our home network using dnsmasq and a Raspberry Pi. The setup we used performed static IP assignments for particular devices. This is all well and good, but it can be kind of a pain adding new devices to the list of reservations. When you have a friend over, you don't want to be fumblin...

Read more

Auto-install Node.js on a Raspberry Pi with a Debian package

For a recent project, I needed to deploy Node.js to a Raspberry Pi to run a small custom web service. This Pi was not intended to be a dedicated web service device. The web service was just needed for my project. Also, I wanted to be able to deploy to multiple Pis if needed. After considering my options, I landed on creating a Debian package (.deb) for my project that auto-installs my desired version of Node on installation of the package....

Read more

Setting up a home network DHCP/DNS server with dnsmasq

When you have too many networked devices like I.., uh, someone I know does, it becomes very difficult to keep up with IP addresses...

The problem is two fold. First, to be able to get to every device, you have to give them all static IPs. Otherwise your DHCP server (typically your cable/DSL router) will give them seemingly random IPs if ...

Read more

Simple automated backup system for Linux

I hate re-doing things. One of my biggest fears is that the masterpiece of code I just churned out will be lost tomorrow and I'll have to do it again. It's perfect the way it is! I could never achieve that the same way again! Ok, that was a bit dramatic, but seriously, data has some meaning to all of us, so if it's worth having, it's worth being protected from accidental loss. In this post, I'm going to describe a simple system for backing up just the data you care about on your Linux syste...

Read more

Setting up a headless Raspbian server with a static IP

Update For a method of setting a static IP that doesn't require connecting a keyboard or monitor to your Pi, see my instructions either for a wired or wireless setup.

Updated Video instructions now included!

Several of my articles here on carpie.net make use of a Raspberry Pi as a headless server. Instead of explaining it in each articl...

Read more

Setting up passwordless SSH logins
sshpasswordlesssecuritylinux2016-06-01 - carpie

If you access remote machines through SSH a lot, it gets to be a real pain to type in your password over and over. Fortunately, we can easily eliminate the need to keep typing those passwords and increase the security of SSH login process at the same time!

SSH keys

The key (see what I did there?) to eliminating the need to constantly re-type your password is using SSH keys to log in. When you generate an SSH key, you are creating a public/private key pair. The private side, you need ...

Read more

Welcome to carpie.net
2016-06-01 - carpie

Welcome to carpie.net! Hopefully you will find something useful to you here. New posts will be announced via Twitter (@elcarpie). Enjoy!