Commit 8fa0b5e0a8

8fa0b5e0a894ccf8c8583bfa7f2d0e9d7ad2575c

parent: 423afc3121

Unsigned

cmc <hello@cleberg.net> · 2025-12-21 04:10 UTC

publish new post: self-hosting-home-assistant

Layout: unified · split

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