Home Assistant Remote Access using Reverse Proxy (NGINX & DuckDNS)

  Рет қаралды 40,872

KPeyanski

KPeyanski

Күн бұрын

Join me in Revolut - peyanski.com/revolut/
This video will be a step-by-step tutorial of how to setup secure Home Assistant remote access using #NGINX reverse proxy and #DuckDNS. In other words you will be able to access your #HomeAssistant via encrypted connection with a legit, trusted certificate when you are outside your local network, but at the same time when you are connected to your local home network you will still be able to use the regular non-encrypted HTTP connection giving you the best possible speed without any latencies and delays. The best of all - it is all totally FREE.
► MY ARTICLE ABOUT THAT TOPIC - peyanski.com/home-assistant-r...
► MY HOME ASSISTANT INSTALLATION METHODS FREE WEBINAR - automatelike.pro/webinar
► DOWNLOAD MY FREE SMART HOME GLOSSARY - automatelike.pro/glossary
► AFFILIATE LINKS
SwitchBot Flash Deals - switchbot.vip/3BwF221
Reolink Flash Deals - shrsl.com/301ih
Aqara Amazon Store - amzn.to/3EpeCSb
Shelly Official Store (main page) - bit.ly/3BwMMn2
Tech that I’m using right now - www.amazon.com/shop/kpeyanski
Get $100 in credit over 60 days for DigitalOcean - m.do.co/c/6dd2caef1f1f
Register for Kajabi from here app.kajabi.com/r/NetydFAg and I will share half of my commission with you (15%)
► CRYPTO AFFILIATE LINKS
Sign up for Crypto.com and we both get $25 USD (Referral code: xn86atnceg) - crypto.com/app/xn86atnceg
Binance - One of the biggest Crypto currency exchange - www.binance.com/en/register?r...
► SUPPORT MY WORK
Paypal - www.paypal.me/kpeyanski
Patreon - / kpeyanski
Bitcoin - 1GnUtPEXaeCUVWdJxCfDaKkvcwf247akva
Revolut - revolut.me/kiriltk3x
► TIME TABLE
00:00 Intro
01:26 How to create DuckDNS sub-domain?
02:26 How to install Home Assistant DuckDNS add-on?
03:55 What is a reverse proxy?
04:09 What is NGINX?
04:37 How to install NGINX Home Assistant Add-on?
06:07 How to create Port Forwarding Rule?
07:25 Testing the Home Assistant Remote Access using NGINX Reverse Proxy & DuckDNS
08:36 How to harden the Home Assistant security?
► CONFIGURATION FOR HOME ASSISTANT REMOTE ACCESS USING NGINX REVERSE PROXY & DUCKDNS
configuration.yaml entry
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.30.33.0/24
ip_ban_enabled: true # use this to enable auto IP ban
login_attempts_threshold: 3 # set the number of allowed login attempts
✅ Don't Forget to like 👍 comment ✍ and subscribe to my channel!
► DISCLAIMER
Some of the links above are affiliate links. If you click on these links and purchase an item I will earn a small commission with no additional cost for you. Of course, you don’t have to do so in case you don’t want to support my work!

Пікірлер: 88
@jonask8473
@jonask8473 Жыл бұрын
Oh man, dude you are awesome. I think this is my third youtube comment in a decade, but you help me after 3 frustrating hours. This is the third Home Assistant video I watched from you and your methods just plain work for me. Thank you for your help!!! It was needed. Have a great day
@KPeyanski
@KPeyanski Жыл бұрын
Many thanks for this great comment. Feel really proud that I earned your 3rd comment in KZfaq. You made my day!
@MihaiKrieger
@MihaiKrieger Жыл бұрын
Man, you are amazing. I have just found your channel and your guides are brilliant and clear. Subscribed. Sending you my greetings and regards from Romania :).
@KPeyanski
@KPeyanski Жыл бұрын
Awesome, thank you and welcome aboard! Greetings to Romania!
@demosthenes4276
@demosthenes4276 2 жыл бұрын
Hello Kiril, you are a genius!! Thank you for the Viseo!
@KPeyanski
@KPeyanski 2 жыл бұрын
Happy to help & thank you very much for the good words about me ☺️
@KrastyoKrastev
@KrastyoKrastev 2 жыл бұрын
Followed your steps and all is now set up! Thank you! Благодаря много! :)
@KPeyanski
@KPeyanski 2 жыл бұрын
Fantastic! Enjoy! Може би трябва да преподаваш уроци на някои от колегите, които не успяват ;)
@KrastyoKrastev
@KrastyoKrastev 2 жыл бұрын
@@KPeyanski да ти кажа наистина си мисля че мога да направя видеа за уроци на български :) Определено имах доста въпросителни относно исталацията на HA и за свързването на Zigbee донгъл с HA и прочие и прочие, та за една седмица доста неща научих :) Сигурен съм че други хора се отказват точно заради тези начални трудности :)
@zubski
@zubski Жыл бұрын
I used to use Duck DNS/NGINX a few years ago and stopped after issues with a VPN. But as my network has changed, I tried to use it again, but ran into some problems - I had my original configs. However, your video cleared it all up for me. I was missing the "use_x_forwarded_for". Thank you so much - great simple video.
@DeepakCG
@DeepakCG 8 ай бұрын
Excellent video, without proper information and knowledge of reverse proxy, I had setup my HA remote access incorrectly, thanks to your plain simple video, my HA remote and local access works perfectly now via DuckDNS & NGINX.. thanks for such quality content.
@antonfouche1387
@antonfouche1387 10 ай бұрын
Thank you Kiril. Great tutorial.
@KPeyanski
@KPeyanski 10 ай бұрын
Glad it was helpful! Check my other tutorials as well!
@MrThomaszwei
@MrThomaszwei 2 жыл бұрын
Wonderful short video also good explanation. Thank you now I have also a home assistant instance reachable over the internet.
@KPeyanski
@KPeyanski 2 жыл бұрын
Glad it helped! Check my other videos as well ;)
@jeffrietjeopinternet
@jeffrietjeopinternet 5 ай бұрын
Great video as usual.
@KPeyanski
@KPeyanski 5 ай бұрын
Many thanks 🙏 check my other videos as well
@DmitryKey
@DmitryKey Жыл бұрын
Thanks for the guide. Just one question. Should I specify my home subnet in trusted_proxies?
@legenware
@legenware 3 ай бұрын
Thank you so much, i was noobing about the file editing and saw you using file editor really handy add-on. Then I saw you litteraly have to copy the trusted_proxies entries lines from the documentation part. Don't go put your own IP adresses. And you forward 443 from the firewall to the local ip. That wil proxy it to 8123, no need to forward 8123 just saying for people who read. Thanks again!
@irtibatkisileri222
@irtibatkisileri222 2 жыл бұрын
Cool. Thanks for covering as much as possible on home assistant. keep awesome content coming.
@KPeyanski
@KPeyanski 2 жыл бұрын
Thanks, More to come!
@tsiro9
@tsiro9 2 жыл бұрын
Hi Kiril! Another great tutorial. Much appreciated. I would like to ask about tts. Is it working after this method is applied? In the past i faced some issues with that, after installing duckdns and nginx. Thanks a lot of your input.
@KPeyanski
@KPeyanski 2 жыл бұрын
What about TTS? I can recommend to create one full backup and to try this method out and see by yourself. If something is not working after that just restore your backup!
@huskylfp1505
@huskylfp1505 Жыл бұрын
Excellent!
@KPeyanski
@KPeyanski Жыл бұрын
Glad you liked it!
@KrispKiwi
@KrispKiwi Жыл бұрын
This works however I ran into a problem, Alexa Media Players hacs integration doesn't seem to work when trying to pull a sound file through with nginx enabled. It works fine with the standrad Duckdns install. Any ideas?
@-coolee-
@-coolee- 2 жыл бұрын
you safed my Life!
@KPeyanski
@KPeyanski 2 жыл бұрын
why what happened? ;)
@-coolee-
@-coolee- 2 жыл бұрын
@@KPeyanski I tried 5 other tutorials and it always said something like 500: Bad connection or something. I was about to subscribe to NABU Casa, but then I watched this video. You are the first to tell me that I also have to change something in the Configuration.yaml. Without you two situations could have happened: 1. NABU Casa has a new customer 2. I jump from the roof
@joelfrojmowicz
@joelfrojmowicz 2 жыл бұрын
Hi Kiril. As always another great video. What about using Nginx Proxy Manager instead of Nginx + DuckDNS? Is waaaay easier to setup, configure and mantain. Just check it out.
@KPeyanski
@KPeyanski 2 жыл бұрын
That is for another video ;) Thanks for the good words...
@sammyjankins12
@sammyjankins12 2 жыл бұрын
+1 for that coming video about Nginx Proxy Manager!! Thanks for your videos
@RyanAlexander87
@RyanAlexander87 Жыл бұрын
@@KPeyanski This is a great video, might you have time to do it with Nginx Proxy Manager? I'd love to be able to expose other things on my network too - not just home assistant - for example Nextcloud on my NAS but rely on NPM on the Raspberry Pi OS since that's powered on all the time. Thank you!
@arkadiuszpiasecki4635
@arkadiuszpiasecki4635 Жыл бұрын
Hi. Thanks for great tutorial. I have router Archer C6. Last step - when you forwarding port 443 to ip 10.0.0.250. I cant do this because I dont have port forwarding. I have only ALG, Virtual Servers, Port triggering, DMZ and UPnP
@philk12
@philk12 Жыл бұрын
hi quick question. i do not have add-on backup and supervisor option. any idea why ??.
@funodestro4991
@funodestro4991 5 ай бұрын
thank it works!
@KPeyanski
@KPeyanski 5 ай бұрын
You're welcome!
@alta1910
@alta1910 Жыл бұрын
thanks for this very good video.
@KPeyanski
@KPeyanski Жыл бұрын
You are very welcome 🙏 check my other videos as well
@geirvalsvik1780
@geirvalsvik1780 Жыл бұрын
Hello Kiril, Great video, easy step-by-step guide to setting up DuckDNS and port forwarding. I'm using this and also NGINX for my remote access to HA, it works fine. Only question I have that you may know the answer to: What happens when my Internet Service Provider change my external IP adress, will the DuckDNS addon in HA take care of updating the new IP adress to DuckDNS?
@gffmac2
@gffmac2 Жыл бұрын
if you watch the log of duckdns addon it checks your ip address to see if it needs updating.
@crazysteve8088
@crazysteve8088 2 жыл бұрын
Does this work for custom domain names? I tried it but couldnt get it to work
@machadojon
@machadojon 5 ай бұрын
Hi Peyanski, thank you for you help! unfortunatelly when I add the lines ip_ban_enabled: true and Login_attempts_threshold: 3 I receive the following error with the new version of HA: Invalid config for 'http' at configuration.yaml, line 19: 'Login_attempts_threshold' is an invalid option for 'http', check: http->Login_attempts_threshold. There is a way to fix this? for me this is really needed.
@Jrvos1985
@Jrvos1985 4 ай бұрын
darn, that was easy :D. thnx
@KPeyanski
@KPeyanski 4 ай бұрын
You're welcome! Check my other videos as well :)
@olivername
@olivername 6 ай бұрын
how do I setup cert file and keyfile saying not source thanks
@RobertStAmand-ep8dj
@RobertStAmand-ep8dj 2 жыл бұрын
Great video... I am running multiple instances of HA. Can the default port be changed to 8124 or something else in NGINX Home Assistant SSL proxy ? Right now I can only get it to work Internally on port 8123
@KPeyanski
@KPeyanski 2 жыл бұрын
I think you need nginx proxy manager for that. I may create a video about it as well.
@piotrekpitera6864
@piotrekpitera6864 2 жыл бұрын
Hi, why you need Nginx? Wouldn't it be enough to just forward port on your router to your HA instance? Or it's to increase security?
@KPeyanski
@KPeyanski 2 жыл бұрын
You will not have the trusted SSL certificate that way
@nasmatko3706
@nasmatko3706 Жыл бұрын
I have just found yor videos and I like them. I managed to set up duckdns and nginx no problem, but in your video if you use http on duckdns domainyou are automaticallynredirected to https. In y cas I got error message that I am trying to access https by using http. How didmyou achieve this automatic forwardimg from http to https?
@user-so5uo1xx5t
@user-so5uo1xx5t 2 жыл бұрын
thank you what are routers brand and models suitable to use open port forward in home assistant ( with sim card router ) ?
@KPeyanski
@KPeyanski 2 жыл бұрын
You are welcome. Most of the routers can do that as it is a standard feature. Probably only the most basic models will lack this.
@spitfirezip100
@spitfirezip100 13 күн бұрын
how do you un-ban if someone tries to connect more than 3 times with the wrong credentials?
@chiraldude
@chiraldude 6 ай бұрын
Another thing to do is set up an automation in HA to send a notification if IP Ban is triggered. I set up a push notification to my phone. See YAML from automation editor below: *Trigger* platform: persistent_notification update_type: - added - updated notification_id: ip-ban *Condition* condition: template value_template: |2- {% set message = trigger.notification.message %} {% set title = trigger.notification.title %} {{ 'Banning IP address' in title }} *Action* service: notify.mobile_app_pixel data: message: "{{trigger.notification.message}}" enabled: true
@mrdayz8
@mrdayz8 2 жыл бұрын
great video, you know if there a solution for the ones who are behind a CG-NAT?
@KPeyanski
@KPeyanski 2 жыл бұрын
Thanks, not so sure about the CG-NAT....
@justinsmall9149
@justinsmall9149 8 ай бұрын
Ok but how do you do this for a home assistant running in a docker container?
@alexspires
@alexspires 2 жыл бұрын
Thanks for posting another awesome video. What to do if my internet provider blocks all ports below 1024? Can I use another port instead of 443?
@KPeyanski
@KPeyanski 2 жыл бұрын
Yes, but I guess you have to test it.
@darrelriley
@darrelriley Жыл бұрын
when i try to start NGINX i get "Failed to start add-on" port 8123 is already in use by something else on the host
@Noisema
@Noisema Жыл бұрын
Thanks for this tutorial 😃 Any chance on doing a tutorial for Reverse Proxy addon in combination with Adguard Home addon? As both are using port 443 for encrypted connections, and NGINX proxy manager addon can not be started while port 443 is used by Adguard Home. I couldn't find an tutorial for that one yet. Thanks 🙂
@KPeyanski
@KPeyanski Жыл бұрын
I'm having them both working at the moment without any issues. Is your Adguard installed as Home Assistant Add-on? If yes, then there shouldn't be a problem.
@sashb9331
@sashb9331 Жыл бұрын
It was working well and now it does not. Have the instructions changed? Recently this stopped working for me and could not figure out why. Turns out my ISP had forgotten to send me an opt out on the CGNAT IP addresses. Called them up and asked them to assign me a static IP. This fixed the issue. I can now connect from my Phone. Hope this helps others
@brianrozs3br
@brianrozs3br 2 жыл бұрын
Hi! Kiril! I have followed your video and text instructions exactly but cannot connect to HA remotely using the companion app! I am running HASSio on a Pi4. Any suggestions on how to solve the connection problem, please? Thanks for your always interesting and helpful videos.
@KPeyanski
@KPeyanski 2 жыл бұрын
I'm using companion app using this way without any issues. Did you manage to open your duckdns sub-domain outside your home network and is your certificate valid? I mean this should working exactly as I'm showing in the video. If you manage to do the above, then the companion app will work at 100%
@brianrozs3br
@brianrozs3br 2 жыл бұрын
Hi! Thanks for your reply. I can open Duck sub-domain from outside my home network so I am guessing the problem is with the certificate(?) How do I go about fixing it/getting a valid certificate? Thanks in advance.
@brianrozs3br
@brianrozs3br 2 жыл бұрын
@@KPeyanski 🙂It took some effort but everything seems to be working now. Again, many thanks!!
@varunprasad4870
@varunprasad4870 2 жыл бұрын
Which one better NGINX+DuckDNS or Zerotier? And if you could provide the reasons too
@KPeyanski
@KPeyanski 2 жыл бұрын
I personally use them both. NGINX+DuckDNS for the HA companion app (mobile app) & ZeroTier as VPN if I want to access my internal network from outside.
@M9quattro
@M9quattro Жыл бұрын
Hi Kiril. I've followed this tutorial but i've a problem. if i remove (or comment) the lines in configuration.yaml, i can access to my HA only with http + internal ip address. While if i leave those lines without comments (always in confi.yaml file) i can only access with https and my duckdns doman. Where could I have been wrong?
@MihaiKrieger
@MihaiKrieger Жыл бұрын
I am having the exact same problem now. Did you figure it out?
@M9quattro
@M9quattro Жыл бұрын
@@MihaiKrieger At the end I decided to leave the configuration for which https worked...
@suddhasheelghosh9299
@suddhasheelghosh9299 2 жыл бұрын
Are there any solutions to getting a trusted certificate for those sitting behind a Cgnat? Port forwarding won't work for me Other than the paid Nabu Casa subscription, of course. I know that won't work
@KPeyanski
@KPeyanski 2 жыл бұрын
I didn't heard/saw such solution so far ...
@oscarchd
@oscarchd 2 жыл бұрын
is it possible to make this work without supervisor (docker install)
@KPeyanski
@KPeyanski 2 жыл бұрын
probably it is possible, but never done it
@Tntdruid
@Tntdruid 2 жыл бұрын
I run my own DNS server, so I can use my own domain. Why not use Nginx Proxy Manager?
@KPeyanski
@KPeyanski 2 жыл бұрын
Nginx Proxy Manager is for another video ;)
@Tntdruid
@Tntdruid 2 жыл бұрын
@@KPeyanski nice 👍
@marketwinning
@marketwinning Жыл бұрын
Hi there, great video. I successfully installed it an can remotely access my Home Assistant. But one thing broke... I cannot access my PI via SSH (putty) anymore??? When I login I get message "access denied". How do I solve this. Please advise....
@KPeyanski
@KPeyanski Жыл бұрын
You are trying the local RPI address for the SSH right? Because SSH to your duckdns is not possible without opening ports on your router!
@marketwinning
@marketwinning Жыл бұрын
Thank you for you answer Kiril. With my local address I cannot reach my PI anymore. So what I did was in my router forwarded port 22. And try to connect using my external IP address on port 22. No luck. Would you please instruct me what to do? (Or make another great video on this topic) Thanks!!
@rojoricardo
@rojoricardo 2 жыл бұрын
Do you know how to Configure Google Home Assistant with HA, ising only IPV6 protocol, my ipv4 is behind NAT2, however my ISP allows IPV6... so far i am able to access my instance of HA OS over other networks with IPv6, but not in IPv4 networks. What I really want is to be able to etup Google Home with HA over IPv6.
@EthanLiu
@EthanLiu Жыл бұрын
WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from ... Requested URL: '/auth/token'.
Home Assistant Secure Remote Access For Free (Tutorial)
8:25
Speak to the Geek
Рет қаралды 42 М.
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 49 МЛН
Why You Should Always Help Others ❤️
00:40
Alan Chikin Chow
Рет қаралды 136 МЛН
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 104 МЛН
бесит старшая сестра!? #роблокс #анимация #мем
00:58
КРУТОЙ ПАПА на
Рет қаралды 2,9 МЛН
Secure Local Domains Easily with Pi-hole & Nginx Proxy
9:02
Meet Scrypted - Stream ANY Camera to ANY Home Hub
8:47
Techno Tim
Рет қаралды 334 М.
See what other People are Browsing on your Wi-Fi!
6:43
Tech Raj
Рет қаралды 1,7 МЛН
Home Assistant Remote Access for FREE - DuckDNS + LetsEncrypt + Single URL
19:04
Everything Smart Home
Рет қаралды 266 М.
Quick and Easy Local SSL Certificates for Your Homelab!
12:08
Wolfgang's Channel
Рет қаралды 692 М.
4 Easy Ways To Set Up Remote Access For Home Assistant
8:09
My TOP 5 Home Assistant Remote Access Methods
18:02
mostlychris
Рет қаралды 30 М.
Remotely access Home Assistant via Tailscale for free!
14:11
Tailscale
Рет қаралды 18 М.
Lid hologram 3d
0:32
LEDG
Рет қаралды 7 МЛН