Skip to content

Instantly share code, notes, and snippets.

View j0nathontayl0r's full-sized avatar

Jonathon Taylor j0nathontayl0r

View GitHub Profile
@johndturn
johndturn / restoring-unifi-controller.md
Created April 25, 2022 21:41
How to uninstall and reinstall the Ubiquiti Unifi controller software on a Raspberry Pi (or other Linux environment), and restore from a Backup

Restoring Unifi Controller

Today I woke up and realized that a power surge a while back had taken down our Unifi controller without me realizing. I went to log in to check on firmware updates for the network only to see that I couldn't log in at all. I guess that's the benefit of hosting your controller via a CloudKey Gen 2 with a built-in on-device battery vs. on a Raspberry Pi like I do.

That said, restoring from scratch was actually super easy, given that I had regular backups. Here's the process and some additional reading that I used.

Assumptions

  • You're running the most recent version of the Ubiquiti Unifi controller on a Raspberry Pi (or other Debian-based Linux-based environment)
  • You already have your self-hosted environment set up with a static IP address, and can access it via ssh or through a command line interface
@otherjoel
otherjoel / spf-fail.rkt
Last active July 2, 2024 06:35
Generate a form email to explain to someone at another company that their SPF is broken
#lang racket/base
;; Generate a form email to let someone know their SPF records are misconfigured for their current email provider.
;;
;; Run (fill-report "domain.com" "1.2.3.4") where the 2nd arg is the sending email server's IP address.
;; It will copy the completed report to the clipboard for you.
;; Only works on Windows for now.
(require net/dns