I wanted to get started with home automation but didn’t want to use a system where I had no control and can’t include IoT devices from different vendors. So the obvious choice was running Home Assistant. I had an extra Raspberry Pi and wanted to run Home Assistant on it.
I quickly learned the default port for Home Assistant is 8123. I wanted to use port 80 to access it because then I don’t have to type in the port all the time since the browser assumes port 80 per default. So I decided to run NGINX as a reverse proxy. It forwards traffic it receives on port 80 and forwards it to port 8123. For the user, it looks like Home Assistant is running on port 80. This means I need access to the OS to install NGINX and configure the proxy. So running the OS installation method was not an option. The container and core options don’t have the option for Add-ons but these are crucial for me, so I was left with using the Supervised option.

I followed the instructions to install Home Assistant Supervised. During installation, I encountered an error building the wheel for cryptography. This was for version 2022.6.7.
ERROR: Failed building wheel for cryptography
If you see the same error you can fix it by disabling building cryptography by setting the following variable.
export CRYPTOGRAPHY_DONT_BUILD_RUST=1
As soon as the installation is finished Home Assistant is accessible on port 8123. In the next step you need to install NGINX.
sudo apt-get update
sudo apt-get install nginx
Check if the NGINX is running.
sudo systemctl status nginx
You should see the following result.

Afterward, you need to configure NGINX as a reverse proxy. All requests to port 80 should be redirected to port 8123.
sudo nano /etc/nginx/sites-available/default
Add the location configuration to the server configuration
server {
...
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8123;
}
...
}
Now your Home Assistant is accessible on port 8123 and on port 80 via the reverse proxy.