cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

main: content/blog/2025-12-20-self-hosting-home-assistant.org · raw

  1#+date:        [2025-12-20 Sat 20:27:08]
  2#+title:       Self-Hosting Guide: Home Assistant
  3#+description: Configuring and customizing Home Assistant.
  4#+slug: self-hosting-home-assistant
  5#+filetags:    :linux:self-hosting:
  6
  7* Overview
  8
  9I've used [[https://www.home-assistant.io][Home Assistant]] off and on for years, but I've never written a guide on
 10it because it always felt like a half-baked solution with my combinations of
 11products and my Home Assistant configuration.
 12
 13However, Home Assistant looks much better these days and now has native [[https://help.ui.com/hc/en-us/articles/27878858632599-Getting-Started-with-UniFi-Protect][UniFi
 14Protect]] support, so I decided to switch back to using it full time and writing
 15up a proper guide to installing, configuring, and customizing the software.
 16
 17* Installation
 18
 19I happened to have a spare Raspberry Pi 4 sitting around I wasn't using, so I
 20opted for the [[https://www.home-assistant.io/installation/raspberrypi][Raspberry Pi]] installation tutorial from Home Assistant. This
 21tutorial guides you through the flashing of Home Assistant OS to an SD card and
 22initialization of the software.
 23
 24This process is seamless and will result in a ready-to-use device with Home
 25Assistant.
 26
 27* Configuration
 28
 29Once the device is ready, all you need to do is create your account and complete
 30the initial setup wizard within the Home Assistant page (e.g.,
 31=homeassistant.local:8123=).
 32
 33At this point, you will have a functioning Home Assistant deployment. However, I
 34want to go further and configure the service to use my personal devices and
 35display information via customized interfaces.
 36
 37To start with our configuration, we will visit the =Settings= > =Devices &
 38services= page. This page will display all currently configured integrations, as
 39well as automatically discovered integrations that you can configure.
 40
 41[[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/integrations.webp]]
 42#+caption: Integrations
 43
 44** HACS
 45
 46Another integration of note is the [[https://hacs.xyz][Home Assistant Community Store (HACS)]], which
 47provides a familiar integration into the Home Assistant UI that allows you to
 48manage custom elements.
 49
 50If you installed Home Assistant like I did using the OS method, you will need to
 51install the Get-HACS integration to install HACS and then restart Home Assistant
 52to start utilizing these custom elements.
 53
 54Personally, I am using HACS in order to utilize the [[https://github.com/dahlb/ha_hatch][Hatch Rest]] integration for
 55my Hatch Rest Mini, Rest+, and Restore.
 56
 57You can see it here in my =Media= dashboard:
 58
 59[[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/media.webp]]
 60#+caption: Media Dashboard
 61
 62Once you have installed all relevant integrations and synced your devices to
 63Home Assistant, you are ready to build your dashboards.
 64
 65** External Access
 66
 67If you want to be able to external your instance externally, you will need to
 68expose the service to the internet somehow. One option is a reverse proxy, such
 69as Nginx, which I have covered in numerous self-hosting posts. Another option is
 70Cloudflare Tunnels, which I will cover here.
 71
 72Configuring a tunnel to Home Assistant OS takes a few more steps than a normal
 73reverse proxy, but I currently find the security benefits worthwhile.
 74
 75To start, install the [[https://github.com/homeassistant-apps/app-cloudflared][app-cloudflared]] app in the Add-ons menu within Home
 76Assistant.
 77
 78Once installed, follow the instructions to configure the =External Home
 79Assistant Hostname=, =Cloudflare Tunnel Name=, and the =Cloudflare Tunnel Token=
 80within the Configuration tab of the installed add-on. Once configured, I
 81restarted Home Assistant to start fresh.
 82
 83Next, I opened Cloudflare and configured the tunnel to expose the
 84=ha.example.com= domain to the =homeassistant.local:8123= address in
 85Cloudflare's Zero Trust dashboard.
 86
 87From here, I can access Home Assistant anywhere I go from the =ha.example.com=
 88domain.
 89
 90* Customization
 91
 92Finally, let's customize our dashboards. The view below is my standard view when
 93greeted by my dashboard.
 94
 95As you can see, I choose to keep general information in the main tab, such as
 96weather, time, and location. Instead of jamming every widget into a single tab,
 97I separate my tabs by function:
 98
 99- Media: TVs, Speakers, and other playable entities
100- Cameras: UniFi Protect cameras
101- Lights: Hue bulbs and other lighting systems
102- IoT: Other miscellaneous devices, such as printers, my Litter Robot, Roomba,
103  etc.
104
105[[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/dashboard.webp]]
106#+caption: Dashboard
107
108When editing a dashboard, you're presented with a myriad of options. First, you
109can choose to use a number of layout options (sections, masonry, sidebar, and
110single card). Next, each element you add to the dashboard any number of
111entities, names, themes, states, and more to configure.
112
113Honestly, I had forgotten how customizable these dashboards were and I will
114absolutely spend a lot of time customizing for very specific needs.
115
116See below for some examples of editing and IoT elements:
117
118[[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/edit.webp]]
119#+caption: Editing Interface
120
121[[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/iot.webp]]
122#+caption: IoT Dashboard
123
124Once you have configured and customized your dashboards to your heart's content,
125you're reading to start automating and more! I highly suggest browsing the web
126and Home Assistant forums for ideas and solutions that fit your needs. There are
127more possibilities to this platform than you'll likely ever be able to use.
128
129** Mobile View
130
131Before I finish this post, I wanted to show how reliable the mobile view of the
132platform displays. These screenshots were captured on the iOS Home Assistant
133app, using the remote URL for my instance.
134
135| Dashboard                                                                               | Entity                                                                        |
136|-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------|
137| [[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/mobile_dashboard.webp]] | [[https://img.cleberg.net/blog/20251220-self-hosting-home-assistant/roomba.webp]] |