Tutorial: Home Assistant Secure Remote Access (2024)

Tutorial: Home Assistant Secure Remote Access (1)

I was watching Paul Hibbert’s beginner’s guide to setting up Home Assistant (https://youtu.be/LI3lhgOiZ-8) a few weeks ago and one of the things he said got me thinking: he said that the easiest way to get both remote access and Alexa integration working with Home Assistant is to sign up and pay for the monthly Home Assistant Cloud subscription. He’s totally right of course, and I’ve said that before too. In the case of Alexa integration it’s an absolute ball-ache to set up and get working manually – totally rock solid once it is working, but a massive hassle to get there and there are many great videos/guides out there talking you through that already. But, remote access, specifically secured remote access is actually very easy to set up, if a little bit of a long winded process.

Yes, you can just open a port on your router and forward it straight through to your Home Assistant server, but that would be totally unencrypted and transmit your passwords and other data in plaintext for everyone to see. You could also just use the Let’s Encrypt add-on and use the default Home Assistant port 8123 for encrypted access but again this can cause a lot of issues with certain integrations. If you add encryption to the default port then that means that unencrypted access is no longer possible. If any devices on your local network want to talk to Home Assistant then they must be capable of ignoring invalid certificates because your certificate will not be valid when accessing directly by IP address instead of the external hostname.

Tutorial: Home Assistant Secure Remote Access (2)
Tutorial: Home Assistant Secure Remote Access (3)
Tutorial: Home Assistant Secure Remote Access (4)

This is how the solution is going to work: First of all we’re going to use Dynamic DNS to provide us with a hostname on the internet.

Then we’re going to install a special proxy server add-on in Home Assistant which listens for external encrypted connection requests, which will be secured with a free Let’s Encrypt certificate.

We’ll configure your router to port forward that encrypted traffic through to your new proxy server.

That proxy server passes traffic through to the unencrypted Home Assistant server internally… so your end solution has unencrypted internal access on the original port 8123, and encrypted external access on port 8126. This whole process is probably a lot easier to follow on my YouTube video (see the top of this article), and then you can pop back here for the exact configuration… but in any case, here we go…

DuckDNS

  • Visit www.duckdns.org and create yourself an account.
  • Once signed in, you’ll need to create yourself a domain – this will be in the form of ‘something_you_made_up.duckdns.org’
  • On your account page, copy the ‘token’ to your clipboard for later. This is a form of password so treat it as such – do not share it!
  • Back over in Home Assistant, install the DuckDNS add-on from the Home Assistant Add-on Store.
  • In the DuckDNS add-on’s configuration page, type in the domain name you previously registered (i.e. something_you_made_up.duckdns.org) in the DNS name field.
  • Paste your token into the token field
  • In the “Let’s Encrypt” section, change “accept_terms: false” to “accept_terms: true”
  • Save!
  • Back over on the DuckDNS info tab, click Start to run the add-on.
  • This will link your Home Assistant server with your DuckDNS hostname and also provide you with a Let’s Encrypt SSL certificate automatically.

Router Configuration

This is the trickiest part to talk you through because it involves logging into your router’s web interface and configuring a port forwarding rule to allow traffic on the Internet to access your Home Assistant server. Hopefully you can figure out how to log in to your specific router (every type of router is different 🙁 ) and locate the ‘port forwarding’ section. This may be under the WAN or Firewall sections in most routers.

Once you’ve found that, you need to forward TCP port 8126 to the internal IP address of your Home Assistant server (this usually looks like 192.168.something.something) – hopefully you already know this because you’re already on your Home Assistant server’s web interface!

NGINX Proxy

  • In Home Assistant, install the add-on “NGINX Home Assistant SSL proxy”
  • Open the add-on’s Configuration page
  • Under the ‘options’ section
    • Enter your domain in the ‘domain’ field (i.e. something.duckdns.org)
    • Under Customise, set the ‘active’ option to ‘true’ instead of ‘false’
    • Click on the ‘save’ button for this section before moving on or you’ll lose what you’ve just done!
  • Under the ‘network’ section change the port to 8126 and click on this section’s ‘save’ button.
  • Select the add-on’s Info tab and click on ‘Start’ to run the add-on.

Home Assistant Configuration

  • Open your profile page (bottom-left… click on your username)
  • Scroll down the options and enable ‘Advanced Mode’
  • Navigate the menus Settings > System > Network.
  • Under the ‘Home Assistant URL’ section, edit the ‘Internet’ field and paste in your new external URL, for example ‘https://something_you_made_up.duckdns.org:8126’.
  • Click on Save

Configuration.yaml

Edit your configuration.yaml file (you can use the File Editor add-on to do this if you’re not sure how) and paste in the following lines:

http: use_x_forwarded_for: true trusted_proxies: - 172.30.33.0/24

Save the file, open the ‘Developer’ page, check the YAML configuration (just in case you’ve made a typo!) and restart Home Assistant to apply the changes.

ESPHome: extra steps required

If you’re running ESPHome (and some other add-ons with embedded web servers) then you’ll need to upload another configuration file of NGINX in order to get it working properly. The ESPHome symptoms are that the live logging / installing consoles refuse to connect when accessing Home Assistant via the external URL. If you have issues with add-ons working when connected locally but not working when using the external URL, then apply this fix!

Create a new text file named ‘nginx_proxy_default_fix_ingress.conf’ and paste into it the following configuration:

location /api { proxy_connect_timeout 60; proxy_read_timeout 60; proxy_send_timeout 60; proxy_intercept_errors off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host:8126; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://homeassistant.local.hass.io:8123/api;}

Upload this file to the /share folder in Home Assistant, which is in the root. You can use the File Editor add-on to easily do this just so long as you disable the add-on’s enforce_basepath option. Disabling that option allows you to browse outside of the /config folder and view the entire server’s filesystem.

Once the file has been uploaded to the correct location, restart NGINX and you’re ready to test it out!

Just open your web browser and attempt to access your new registered domain (i.e. https://something_you_made_up.duckdns.org:8126). Don’t forget the ‘s’ in https and the port on the end of the URL.

Tutorial: Home Assistant Secure Remote Access (2024)

FAQs

What is the most secure way to access Home Assistant? ›

A secure way to remotely access your Home Assistant is to use a Virtual Private Network (VPN) service such as Tailscale or ZeroTier One . A VPN connection needs to be established before you can connect to your Home Assistant from outside your local network. The VPN makes this connection secure.

How do I make my Home Assistant remotely accessible? ›

To enable remote control
  1. In Home Assistant, go to Settings > Home Assistant Cloud.
  2. Make sure you are logged in to Home Assistant Cloud. ...
  3. Under Remote control, enable the toggle. ...
  4. This URL is only accessible if your local instance is connected to the remote UI server. ...
  5. Congratulations!

How do I securely expose my Home Assistant to the Internet? ›

If you want secure remote access, the easiest option is to use Home Assistant Cloud by which you also support the founders of Home Assistant. Another option is to use TLS/SSL via the add-on Duck DNS integrating Let's Encrypt. To expose your instance to the internet, use a VPN , or an SSH tunnel.

How do I secure remote access to my home network? ›

Use a router with WPA2 or WPA3 encryption when connecting from their homes. Encryption protects information sent over a network so that outsiders can't read it. WPA2 and WPA3 are the only encryption standards that will protect information sent over a wireless network.

What is the most secure remote access protocol? ›

Anything with a strong authentication and encryption could be considered as one of the most Secure remote access protocol, for instance VPN, SSH, RDP and Zero trust network access, if using a good and strong authentication mechanism and and a Secure encryption method.

Which access control method is the most secure? ›

Categories
  • The Three Types of Authentication Factors.
  • Least Secure: Passwords.
  • More Secure: One-time Passwords.
  • More Secure: Biometrics.
  • Most Secure: Hardware Keys.
  • Most Secure: Device Authentication and Trust Factors.
7 days ago

What is the alternative to Home Assistant remote access? ›

If you simply need free remote access to Home Assistant, I suggest Tailscale. It's easy to install and configure. Currently, the Personal plan is free, supports up to three users and 100 devices on your network.

What is the difference between Tailscale and ZeroTier Home Assistant? ›

ZeroTier and Tailscale both offer peer-to-peer mesh VPN technologies. They use different protocols to offer a functionally similar service. ZeroTier's protocol is custom, while Tailscale uses the industry-standard WireGuard protocol for its data plane.

Do I need SSL for Home Assistant? ›

This is because the Google Assistant device will connect directly to the IP of your Home Assistant instance and will fail if it encounters an invalid SSL certificate. For secure remote access, use a reverse proxy such as the NGINX SSL add-on instead of directing external traffic straight to Home Assistant.

How do I protect remote access? ›

Basic Security Tips for Remote Desktop
  1. Use strong passwords. ...
  2. Use Two-factor authentication. ...
  3. Update your software. ...
  4. Restrict access using firewalls. ...
  5. Enable Network Level Authentication. ...
  6. Limit users who can log in using Remote Desktop. ...
  7. Set an account lockout policy.

Which Home Assistant is best for privacy? ›

For the privacy-conscious, Apple's Siri may be your best bet. Although choosing Siri means passing up the sheer depth of knowledge Google's Assistant has when it comes to answering questions or the smart home device compatibility offered by Amazon's Alexa and Google's Assistant.

Which is the most secure method of remotely accessing a network device? ›

1. Virtual private network (VPN): VPNs are the most common form of remote access. They use authentication and encryption to establish a secure connection to a private network over the internet.

How to access your home internet from anywhere? ›

Here's how to do it:
  1. Choose a VPN Service: Subscribe to a reputable VPN service provider. ...
  2. Install VPN Client: Install the VPN client on your remote device.
  3. Configure VPN Settings: Enter the required details provided by your VPN service, such as server address and authentication credentials.
Mar 12, 2024

How does secure remote access work? ›

Secure remote access for employees allows authorized users to connect to their corporate network on authorized devices from remote locations. The goal is to prevent unauthorized access, protect data confidentiality, and preserve the integrity of the devices.

What is the best option to run Home Assistant? ›

We recommend using Home Assistant Operating System. Other methods are available for experienced users for their specific needs, for example, running Home Assistant in a virtualized environment (e.g. Proxmox), or on top of an existing operating system (e.g. Windows, macOS, Linux):

What is the most common way to access safe mode? ›

Start Safe Mode from the sign-in screen

If you're unable to log in or access your settings, you can enter Safe Mode from the Windows sign-in screen. Here's how: On the sign-in screen, hold down the Shift key while you press Power and Restart.

References

Top Articles
Does Running Really Help You Lose Weight? Here's What Experts Say
40 Best Smoothie Recipes for a Healthy Breakfast
Asist Liberty
What Are Romance Scams and How to Avoid Them
Breaded Mushrooms
Limp Home Mode Maximum Derate
What Auto Parts Stores Are Open
Free VIN Decoder Online | Decode any VIN
GAY (and stinky) DOGS [scat] by Entomb
Learn How to Use X (formerly Twitter) in 15 Minutes or Less
Colts seventh rotation of thin secondary raises concerns on roster evaluation
Wildflower1967
House Party 2023 Showtimes Near Marcus North Shore Cinema
charleston cars & trucks - by owner - craigslist
Rhinotimes
Nyuonsite
My.tcctrack
Wisconsin Women's Volleyball Team Leaked Pictures
Daily Voice Tarrytown
Check From Po Box 1111 Charlotte Nc 28201
Everything you need to know about Costco Travel (and why I love it) - The Points Guy
Jang Urdu Today
Brbl Barber Shop
Helpers Needed At Once Bug Fables
Afni Collections
Vera Bradley Factory Outlet Sunbury Products
Lbrands Login Aces
Turns As A Jetliner Crossword Clue
Revelry Room Seattle
Ringcentral Background
Purdue Timeforge
Inmate Search Disclaimer – Sheriff
Warn Notice Va
Brenda Song Wikifeet
South Florida residents must earn more than $100,000 to avoid being 'rent burdened'
Swgoh Boba Fett Counter
Http://N14.Ultipro.com
Gideon Nicole Riddley Read Online Free
R Nba Fantasy
Weather Underground Bonita Springs
The TBM 930 Is Another Daher Masterpiece
Suffix With Pent Crossword Clue
Updates on removal of DePaul encampment | Press Releases | News | Newsroom
Bill Manser Net Worth
21 Alive Weather Team
Craigslist Com St Cloud Mn
412Doctors
Brutus Bites Back Answer Key
Runescape Death Guard
Concentrix + Webhelp devient Concentrix
Divisadero Florist
Strange World Showtimes Near Century Federal Way
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 6706

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.