1. Install Raspberry Pi Operating System 64-bit
Run the Raspberry Pi Imager, available from here: https://www.raspberrypi.com/software/
Select your device - e.g. Raspberry Pi 5
Select the following options:
- Name: homeassistant.local
- Admin Username: myadmin
- Admin Password: *****
- WiFi SSID: MyWifiNetwork
- WiFi Password: *****
- Services - Enable ssh
- Services - Password authentication
Choose your storage, and write
2. Log in, Configure and Install Required Applications
2.1 From a unix command line, use the ssh command to log into the newly booted Pi
$ ssh -l myadmin homeassistant.local
The authenticity of host 'homeassistant.local' can't be established.
Are you sure you want to continue connecting? yes
Warning: Permanently added 'homeassistant.local' to the list of known hosts.
myadmin@homeassistant.local's password: *****
myadmin@homeassistant:~ $
2.2 Ensure that the installation files are up-to-date
$ sudo apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://archive.raspberrypi.com/debian bookworm InRelease [54.8 kB]
Get:4 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:5 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [254 kB]
Get:6 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages [537 kB]
Get:7 http://deb.debian.org/debian-security bookworm-security/main armhf Packages [240 kB]
Get:8 http://archive.raspberrypi.com/debian bookworm/main armhf Packages [539 kB]
Fetched 1,624 kB in 1s (1,422 kB/s)
Reading package lists... Done
2.3 Identify the latest versions of what we will be downloading
Visit https://github.com/home-assistant/os-agent/releases and identify the latest version file. Note that the Pi5 on 64-bit raspbian requires the aarch64 file.
2.4 Install some of the libraries we are going to need
$ sudo apt-get install apparmor jq wget curl udisks2 libglib2.0-bin network-manager dbus systemd-journal-remote systemd-resolved libffi-dev libssl-dev python3-dev python3 python3-pip nginx certbot python3-certbot-nginx -y
Reading package lists... Done
Building dependency tree... Done
Reading state information...
...
$ sync; sudo reboot
$ curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh================================================================================
To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:
dockerd-rootless-setuptool.sh install
Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.
To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/
WARNING: Access to the remote API on a privileged Docker daemon is equivalent
to root access on the host. Refer to the 'Docker daemon attack surface'
documentation for details: https://docs.docker.com/go/attack-surface/
================================================================================
$ wget https://github.com/home-assistant/os-agent/releases/download/1.7.2/os-agent_1.7.2_linux_aarch64.deb
2025-05-10 12:28:20 (2.75 MB/s) - ‘os-agent_1.7.2_linux_aarch64.deb’ saved [3043626/3043626]
$ sudo dpkg -i os-agent_*.deb
Selecting previously unselected package os-agent.
(Reading database ... 129177 files and directories currently installed.)
Preparing to unpack os-agent_1.7.2_linux_aarch64.deb ...
Unpacking os-agent (1.7.2)
...
$ sudo gdbus introspect --system --dest io.hass.os --object-path /io/hass/os
node /io/hass/os {interface org.freedesktop.DBus.Introspectable {methods:Introspect(out s out);signals:properties:};interface org.freedesktop.DBus.Properties {methods:Get(in s interface,in s property,out v value);GetAll(in s interface,out a{sv} props);Set(in s interface,in s property,in v value);signals:PropertiesChanged(s interface,a{sv} changed_properties,as invalidates_properties);properties:};interface io.hass.os {methods:signals:properties:@org.freedesktop.DBus.Property.EmitsChangedSignal("invalidates")readonly s Version = '1.7.2';@org.freedesktop.DBus.Property.EmitsChangedSignal("true")readwrite b Diagnostics = false;};};
2.7 Download and install the latest Home Assistant Application
$ wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
2025-05-10 12:32:47 (38.4 MB/s) - ‘homeassistant-supervised.deb’ saved [7492/7492]
$ sudo dpkg -i homeassistant-supervised.deb
apparmor=1 security=apparmor
Then reboot the Pi.
$ sync; sudo reboot
3. Setting up a Dynamic DNS Name
4. Setting Up Home Assistant
5. External Access - Simple
Port 80 - This port is used by letsencrypt to install certificates. Ensure that the modem forwards this to the Pi on port 82.Port 8123 - This port is used by Home Assistant, and is accessed by Google, and by the Home Assistant app when not on the local network. This port number can be changed if desired. Ensure that the modem forwards this to the Pi on port 8123.
- Internet WAN Port 80 -> Pi Port 80
- Internet WAN Port 8123 -> Pi Port 8123
Domain: myhass.dynip.orgEmail: myemail@myemailserverNetwork Port: 82
http: ssl_certificate: /ssl/fullchain.pem ssl_key: /ssl/privkey.pem
Restart the homeassistant to use the updated configuration.yaml file.
On the Lets Encrypt Add-in page, select start, and test your configuration.
Note that once the certificate is installed, you will no longer be able to access http://homeassistant.local:8123/, you will have to access https://myhass.dynip.org:82/ instead.
If you want to be able to access via http for the local network, and https for the external network, check out the next section.
Once you are happy that the configuration is working OK, you can select 'Start on Boot' and 'Auto Update'.
5.2 External Access - Advanced
Port 80 - This port is used by the web server nginx 'http' protocol, and accessed by the LetsEncrypt certificate installation protocol. It is not needed for any other reason - This should be left as port 80, but the nginx server access can limit access.Port 8123 - This port is used by Home Assistant, and is accessed by Google, and by the Home Assistant app when not on the local network. This port number can be changed if desired.
- Internet WAN Port 80 -> Pi Port 80
- Internet WAN Port 8123 -> Pi Port 8123
map $http_upgrade $connection_upgrade { default upgrade; '' close; }server {root /var/www/html ;server_name myhass.dynip.org ;autoindex off ;listen 80 default_server ;listen [::]:80 default_server ;}
$ sudo systemctl restart nginx
$ sudo certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.logEnter email address (used for urgent renewal and security notices)(Enter 'c' to cancel): admin@dz2.vizier.uk- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Please read the Terms of Service athttps://letsencrypt.org/documents/LE-SA-v1.5-February-24-2025.pdf. You mustagree in order to register with the ACME server. Do you agree?- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Y)es/(N)o: yes- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Would you be willing, once your first certificate is successfully issued, toshare your email address with the Electronic Frontier Foundation, a foundingpartner of the Let's Encrypt project and the non-profit organization thatdevelops Certbot? We'd like to send you email about our work encrypting the web,EFF news, campaigns, and ways to support digital freedom.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: noAccount registered.Which names would you like to activate HTTPS for?We recommend selecting either all domains, or all domains in a VirtualHost/server block.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -1: dz2.vizier.uk- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Select the appropriate numbers separated by commas and/or spaces, or leave inputblank to select all options shown (Enter 'c' to cancel): 1Requesting a certificate for dz2.vizier.ukSuccessfully received certificate.Certificate is saved at: /etc/letsencrypt/live/dz2.vizier.uk/fullchain.pemKey is saved at: /etc/letsencrypt/live/dz2.vizier.uk/privkey.pemThis certificate expires on 2025-08-10.These files will be updated when the certificate renews.Certbot has set up a scheduled task to automatically renew this certificate in the background.Deploying certificateSuccessfully deployed certificate for dz2.vizier.uk to /etc/nginx/sites-enabled/dz2.vizier.ukCongratulations! You have successfully enabled HTTPS on https://dz2.vizier.uk- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -If you like Certbot, please consider supporting our work by:* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate* Donating to EFF: https://eff.org/donate-le- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6. Linking to Google Assistant
7. Minimising Memory Card Writes
$ sudo lsof 2>/dev/null | awk 'NR==1 || $4~/[0-9]+[uw]/' | grep REG | grep -v /run | grep -v /var/log7.2 Stopping Unwanted Services
access_log off ;error_log /dev/null crit ;
8. Errors and Debugging
1. Run Google Home2. Select Devices and +3. Select Works with Google4. Find the Test app5. Agree to the terms
1. Run Google Home2. Select Devices and +3. Select Works with Google4. Find the Test app5. Agree to the terms
Unable to fetch auth providers. https://oauth-redirect.googleusercontent.com/[my-app-reference]
1. Open Chrome browser
2. Select the ... menu
3. Select History
4. Select Delete Browsing Data
5. Ensure 'All Time' is selected
6. Ensure only 'Cached Images and Files' is selected
7. Select Delete Data
8.3 Only One Person Can Run Household (Home Assistant) Routines
"There was a Problem Connecting to the Home Assistant"
Also, when inspecting the household routine, as soon as one user adds the Home Assistant scene to an automation via the Google Home Application, the scene disappears from other user's household routines.
Try the following ...
1. Ensure that all household users have their voice recognised - i.e. each person can say 'OK Google, Who am I'.
2. Ensure that all household users are included in the family group: https://myaccount.google.com/people-and-sharing
3. Ensure that all household users are included in the Google Cloud Permissions: https://console.cloud.google.com/iam-admin/iam
4. If the automation was created in the Google Home app, try deleting it and re-creating it as a Household Routine.
5. Try deleting the automation from the Google Home app, and create it as an automation script on https://home.google.com/home. Note that this mechanism is considered by some as more powerful, however you do lose the ability to make an announcement to the speaker on which the request was made.
8.4 When Linking Google Home to Home Assistant, I get a Corrupt Screen
- Google Home / Settings / Works With Google / [test] Home Assistant
- Continue / Agree
- Takes me to a page with the words "Home Assistant" and a broken icon