Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 220 lines 6.3 kB view raw
1--- 2title: "Deploy private locations on a Raspberry Pi" 3description: "An 8.5MB Docker image running uptime checks from home." 4author: "Maximilian Kaske" 5publishedAt: "2025-10-17" 6image: "/assets/posts/deploy-private-locations-raspberry-pi/raspberry-pi.png" 7category: "engineering" 8--- 9 10We just pushed the first version of **Private Locations** at openstatus - and I had to test it on my old **Raspberry Pi 3**. 11 12Since **2016**, I've been using the Pi for **AirPlay** to connect to my receiver but other than that, it's been sitting around without any other use case. 13 14Time to revive it! 15 16<Image 17 src="/assets/posts/deploy-private-locations-raspberry-pi/raspberry-pi-receiver.jpg" 18 alt="My bare metal Raspberry Pi on top of the receiver I use for AirPlay" 19/> 20 21--- 22 23## Deployment Guide 24 25Obviously connecting to the Raspberry Pi via `ssh` - and if you're like me, the default password is secure enough: 26 27```shell 28$ ssh pi@raspberrypi.local 29> password: raspberry 30``` 31 32### Hardware Specs 33 34I didnt know exactly which Debian version it was running, but it was _very_ old - so I took the opportunity to clean everything up and upgrade to the latest available version. 35 36Model: 37 38```shell 39$ cat /proc/device-tree/model 40> Raspberry Pi 3 Model B Rev 1.2 41``` 42 43Linux Kernel: 44 45```shell 46$ uname -a 47> Linux raspberrypi 6.12.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux 48``` 49 50Operating System: 51 52```shell 53$ cat /etc/os-release 54> PRETTY_NAME="Debian GNU/Linux 13 (trixie)" 55> NAME="Debian GNU/Linux" 56> VERSION_ID="13" 57> VERSION="13 (trixie)" 58> VERSION_CODENAME=trixie 59> DEBIAN_VERSION_FULL=13.1 60> ID=debian 61> HOME_URL="https://www.debian.org/" 62> SUPPORT_URL="https://www.debian.org/support" 63> BUG_REPORT_URL="https://bugs.debian.org/" 64``` 65 66I'm running the OS on a **16GB micro SD** card. The Pi has **1GB of RAM**, which is perfectly enough for this use case. 67 68<Image 69 src="/assets/posts/deploy-private-locations-raspberry-pi/raspberry-htop.png" 70 alt="Statistics from htop command" 71/> 72 73 74### Install Docker Image 75 76Let's freshly install **Docker** using the official Debian repository instructions: 77 78https://docs.docker.com/engine/install/debian/#install-using-the-repository 79 80Once installed, Docker should already be running. 81 82You can verify it with: 83 84```shell 85$ sudo systemctl status docker 86``` 87 88### Pull and Run the OpenStatus Container 89 90Let's grab the image: 91 92```shell 93$ sudo docker pull ghcr.io/openstatushq/private-location:latest 94``` 95 96If you have access to Private Locations in the **Dashboard**, create one - it'll will provide you a `token` to use as an environment variables: 97 98<Image 99 src="/assets/posts/deploy-private-locations-raspberry-pi/dashboard-create-private-location.png" 100 alt="Create a private location" 101/> 102 103 104Add the `token` to your shell profile: 105 106```bash 107$ echo 'export OPENSTATUS_KEY=<token>’ >> ~/.bashrc 108``` 109 110Reload the shell profile: 111 112```bash 113$ source ~/.bashrc 114``` 115 116If you are using `oh-my-zsh` you might be using the `~/.zshrc` file instead. 117 118Check that it worked: 119 120```bash 121# print the env var 122$ echo $OPENSTATUS_KEY 123``` 124 125### Run the Container 126 127Now let's launch it: 128 129```shell 130$ sudo docker run -d \ 131  --name openstatus-private-location \ 132  --restart=always \ 133  -e OPENSTATUS_KEY=$OPENSTATUS_KEY \ 134  ghcr.io/openstatushq/private-location:latest 135``` 136 137What these flags do: 138- `-d`: run in background (detached mode) 139- `--restart`: auto-start on reboot 140- `--name`: give it a nice readable name 141- `-e`: pass your env var into the container 142 143> Don't sleep on `--restart=always`! How often I had to quickly switch position of and need to reboot the Raspberry, this is a game changer. 144 145To see live logs: 146 147```shell 148$ sudo docker logs -f openstatus-private-location 149``` 150 151 152 153--- 154 155### What Happens Next 156 157Once the container is up, openstatus automatically fetches the endpoints you've chosen for this private location and starts monitoring them. 158 159Every few minutes (`last_seen_at`), the agent refreshes its internal database to stay up-to-date with any changes - like added monitors or updated headers. 160 161The responses of the pings are sent to our ingest endpoint for storage and aggregation. 162 163 164<Image 165 src="/assets/posts/deploy-private-locations-raspberry-pi/dashboard-response-logs.png" 166 alt="Access your logs within the openstatus Dashboard." 167/> 168 169 170### Light on Resources 171 172Our Docker image is just **8.5 MB** in size. Compare that to 1GB+ for some competitors (yes, they pack more features, but still 🤯). 173 174It's wild that a tiny 1 GB-RAM device from 2016 can now handle this so easily. 175 176### Why Private Locations? 177 178Running a private probe means your checks happen **from within your own network** - not just from public cloud servers. 179 180Its useful for: 181- Monitoring internal applications or databases 182- Testing network latency from real-world locations (like your office or home) 183- Running low-cost monitoring nodes on tiny devices (e.g. in agriculture or industrial setups) 184 185--- 186 187## Closing Thoughts 188 189And thats it - my **Raspberry Pi (2016)** is officially back in action. Running quietly next to my receiver, its now part of the openstatus network, checking endpoints from my home. 190 191Not bad for a 9-year-old piece of hardware. 192 193If you'd like to try this out yourself, contact us ([discord](https://openstatus.dev/discord), [email](mailto:ping@openstatus.dev)) and head over to: 194 195[pkgs/container/private-location](https://github.com/openstatusHQ/openstatus/pkgs/container/private-location) 196 197Private locations are currently in **beta** and we're gathering feedback from early users. If you've got an old Raspberry Pi lying around - this is your excuse to bring it back to life. 198 199--- 200 201**A few more useful Commands** 202 203```shell 204# stop running 205$ docker stop openstatus-private-location 206# remove the container, not the image or data: 207$ docker rm openstatus-private-location 208# remove unused images (docker keeps old images even after pulling updates) 209$ docker image prune -f 210# check docker image statistics 211$ docker stats 212# check the CPU / RAM usage (each work) 213$ htop 214$ top 215# update docker image 216$ docker stop openstatus-private-location 217$ docker rm openstatus-private-location 218$ docker pull ghcr.io/openstatushq/private-location:latest 219$ docker run ... # same command as before 220```