Home Smart Home Home Assistant Lesson 23 – Access Hass remotely with VPN

Home Assistant Lesson 23 – Access Hass remotely with VPN


Introducing to you every other manner to get entry to HASS remotely, however using ip in preference to passing domain.

So what’s the gain?

  • you’ll get entry to Hass as being at the LAN, which means that no matter using 3G, it will nonetheless be in IP
  • This connection “heard” is safer, I don’t concentrate on this case so I don’t abuse
  • simply open 1 port because the port for VPN best, from beginning 443, 8123, 80, 1883, 22 … anything

So what is now not desirable?

  • I don’t know if Hass.io can do it, because i’m the use of Hass on NUC, installation it on ENV.
  • you use Hassbian, Raspbian, .. positive you could do it
  • New gamers may be a piece tough to implement

1. Prepare

Pi installed Hassbian, or Hass on Raspbian, NUC … The Hassio has not been studied so temporarily contraindicated Hass.io

Domain Duckdns or any Domain you have available

2. Implementation

a / You SSH into Pi running HASS. Then copy this paragraph and paste it into the terminal:

curl -L https://install.pivpn.io | bash

He’ll ask the assistant, ok, yes, what it asks for, enter it.

Some sections you will be asked port, remember to change the port you like, do not leave the default port.

See the following figure for easy implementation:

Choose UDP, please

This paragraph remembers changing the other port at your disposal

b / Installation is complete, you go to the Router and open the Port, but you have just selected the following model: (eg port 2000)

2000-2000 UDP <IP Pi>

Once you have finished opening, you do not need to check what to do, usually check it also Close.

c / Next is the file creation step for each device configuration, how many devices do you have, then follow the steps below many times:

There are still SSH screens you type

pivpn add

This command helps you to create a configuration file for 1 device

First, you will be asked for the file name, which you can set according to the device to make it easy to remember

Next it asks you how many days you create a cert, always choose to change it depending on you

Then enter the pass twice.

Successfully created it reported as follows

We use WinSCP on the above link to copy that .opvn file.

d / Usually we access on the phone, ipad, so we have to find a way to put this file via the new iphone (remember that iphone, ipad do 2 times, to have 2 .opvn files corresponding to 2 devices More devices, you create more files)

Kinda easy. You can send mail via, or throw it on Drive. I choose to throw on Drive, I like that.

e / On the phone, we download the OpenVPN app.

ios android

Access Hass remotely with VPN

Download and return to Google Drive, click on the .opvn file and select Open in (Open with the application ..), we select OpenVPN, automatically this configuration file will be sent to the app, and it will also configure itself . Done, press Connect to finish.

At this time, next to the 3G word, there will be more VPN letters. Ok, that’s it. You can access it like you are in a LAN.

I tried to summarize and the lesson was too long.

The common mistake is Connect, which is inaccessible, it is caused by the firewall of Pi.

Rate this post

Related Tips And Tricks

Leave a Comment

Tips and Tricks

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept