---
title: "Hassle-free remote access to Home Assistant on a Raspberry Pi | WebhookRelay"
meta:
  "og:description": "How to connect to your Home Assistant without public IP or NAT configuration"
  "og:title": "Hassle-free remote access to Home Assistant on a Raspberry Pi"
  description: "How to connect to your Home Assistant without public IP or NAT configuration"
---

![Stripes](https://webhookrelay.com/blog/home-assistant-remote-access/images/stripes.svg)

# **Hassle-free remote access to Home Assistant on a Raspberry Pi**

How to connect to your Home Assistant without public IP or NAT configuration

![Home Assistant &amp; Webhook Relay](https://webhookrelay.com/blog/home-assistant-remote-access/images/blog/home-assistant/header.png)

There are quite a few home automation systems out there but one of my favorites is [Home Assistant](https://www.home-assistant.io/). It's written in Python ([available on GitHub](https://github.com/home-assistant/home-assistant)), has a nice user interface and is very easy to deploy. Home Assistant has tons of integrations with many other online services and hardware devices.

In this short article we will use:

- [Raspbian](https://www.raspberrypi.org/downloads/) - operating system
- [Etcher](https://etcher.io/) - probably the best tool to burn images
- [Raspberry PI](https://www.raspberrypi.org/products/) - our mini computer :)
- [Docker](https://www.docker.com/) - the easiest way to package and run server applications
- [Webhook Relay](https://webhookrelay.com/) - tunneling service to access Home Assistant from outside
- [Home Assistant](https://www.home-assistant.io/) - home automation system

> Using Hass.io? Check out our Add-on [here](https://webhookrelay.com/blog/home-assistant-remote-access/blog/2018/10/12/hassio-tls-tunnels-duckdns/).

## [TL;DR](#tldr)

Create tunnel through the [UI](https://my.webhookrelay.com/tunnels) and provision an access key & secret [from the tunnels page](https://my.webhookrelay.com/tokens).

Having those details, launch **webhookrelayd** container in a tunnel mode with your tunnel name specified (in this case tunnel name is `rpi`):

```
docker run --name whr-relayd --net host --restart always -d webhookrelay/webhookrelayd-arm:latest --mode tunnel -t rpi -k token-key -s token-secret
```

Start Home Assistant

```
docker run -d --name assistant -v /home/pi/home_assistant:/config -v /etc/localtime:/etc/localtime:ro --restart always homeassistant/raspberrypi3-homeassistant:0.76.2
```

Open tunnel in the browser `your-subdomain.webrelay.io` from anywhere:

![Home assistant](https://webhookrelay.com/blog/home-assistant-remote-access/images/blog/home-assistant/ui.png)

## [The detailed version](#the-detailed-version)

### [Memory Card Preparation:](#memory-card-preparation)

- Insert MicroSD memory card into a computer
- Format it
- Download the Raspbian OS image from [https://www.raspberrypi.org/downloads/raspbian/](https://www.raspberrypi.org/downloads/raspbian/)
- Open [Etcher](https://etcher.io/)

![Etcher]](/images/blog/home-assistant/etcher.png)

- Using Etcher select the downloaded Raspbian image
- Select the drive that corresponds to your memory card
- Click flash!

### [Install Docker](#install-docker)

From the Raspbian Desktop launch Terminal. Now, using terminal install Docker:

```
curl -sSL https://get.docker.com | sh
```

Official blog post on Docker support for Raspberry Pi can be found [on their website](https://www.raspberrypi.org/blog/docker-comes-to-raspberry-pi/).

Now, reboot it:

```
sudo reboot
```

### [Install Home Assistant](#install-home-assistant)

Visit the Raspberry Pi 3 Home Assistant Repository on the Docker Hub to determine the latest version available. To start Home Assistant is as simple as:

```
docker run -d --name assistant --net host -v /home/pi/home_assistant:/config -v /etc/localtime:/etc/localtime:ro --restart always homeassistant/raspberrypi3-homeassistant:0.76.2
```

### [Create a tunnel & token](#create-a-tunnel-token)

Open [https://my.webhookrelay.com/tunnels](https://my.webhookrelay.com/tunnels) in your browser and click "create tunnel". If you are on a free plan, leave 'subdomain' and 'crypto' fields empty as they are only available for the paid plans, you will get auto-generated subdomain.

![Create tunnel]](/images/blog/home-assistant/rpi-tunnel.png)

We will also need a token for authentication. Go to [https://my.webhookrelay.com/tokens](https://my.webhookrelay.com/tokens) and create a new token key & secret pair:

![Create token]](/images/tokencreate.png)

Keep secret somewhere safe as it is now encrypted and cannot be recovered. If you lose it, just generated a new pair.

### [Start webhookrelayd](#start-webhookrelayd)

To start a tunneling daemon, run (just replace key and secret with your own):

```
docker run --name whr-relayd --net host --restart always -d webhookrelay/webhookrelayd-arm:latest --mode tunnel -t rpi -k your-key -s your-secret
```

## [Conclusion](#conclusion)

That's it, now you can access your Home Assistant remotely, without any need to configure your router, get static IP or buying a domain. Tunnels can also be protected by a basic auth but it would be better if you just enabled authentication for your Home Assistant. Check for more information in the official [docs](https://www.home-assistant.io/components/http/).