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

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 89

  • @jonask8473
    @jonask8473 Год назад +4

    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 RUclips. You made my day!

    • @Cenzo4u
      @Cenzo4u 20 дней назад

      Came here to say the same. Very good tutorial. I saw that others don't prefer to have 2 different addresses (which I understand and prefer as well), but that method only works if your router can do NAT Loopback... For the unfortunate ones that don't have NAT Loopback, this is the best option!
      Thank you

  • @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.

  • @legenware
    @legenware 5 месяцев назад

    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!

  • @DeepakCG
    @DeepakCG 11 месяцев назад

    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.

  • @MrThomaszwei
    @MrThomaszwei 2 года назад +1

    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 ;)

  • @MihaiKrieger
    @MihaiKrieger 2 года назад +1

    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  2 года назад +1

      Awesome, thank you and welcome aboard! Greetings to Romania!

  • @joelfrojmowicz
    @joelfrojmowicz 2 года назад +8

    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 года назад +1

      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!

  • @antonfouche1387
    @antonfouche1387 Год назад +1

    Thank you Kiril. Great tutorial.

    • @KPeyanski
      @KPeyanski  Год назад

      Glad it was helpful! Check my other tutorials as well!

  • @demosthenes4276
    @demosthenes4276 2 года назад +1

    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 года назад +1

    Followed your steps and all is now set up! Thank you!
    Благодаря много! :)

    • @KPeyanski
      @KPeyanski  2 года назад

      Fantastic! Enjoy! Може би трябва да преподаваш уроци на някои от колегите, които не успяват ;)

    • @KrastyoKrastev
      @KrastyoKrastev 2 года назад

      @@KPeyanski да ти кажа наистина си мисля че мога да направя видеа за уроци на български :) Определено имах доста въпросителни относно исталацията на HA и за свързването на Zigbee донгъл с HA и прочие и прочие, та за една седмица доста неща научих :)
      Сигурен съм че други хора се отказват точно заради тези начални трудности :)

  • @chiraldude
    @chiraldude 8 месяцев назад

    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

  • @geirvalsvik1780
    @geirvalsvik1780 Год назад +3

    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 Год назад +1

      if you watch the log of duckdns addon it checks your ip address to see if it needs updating.

  • @irtibatkisileri222
    @irtibatkisileri222 2 года назад +1

    Cool. Thanks for covering as much as possible on home assistant. keep awesome content coming.

    • @KPeyanski
      @KPeyanski  2 года назад

      Thanks, More to come!

  • @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

  • @olivername
    @olivername 8 месяцев назад

    how do I setup cert file and keyfile saying not source thanks

  • @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

  • @jeffrietjeopinternet
    @jeffrietjeopinternet 8 месяцев назад

    Great video as usual.

    • @KPeyanski
      @KPeyanski  8 месяцев назад

      Many thanks 🙏 check my other videos as well

  • @huskylfp1505
    @huskylfp1505 Год назад +1

    Excellent!

  • @spitfirezip100
    @spitfirezip100 2 месяца назад

    how do you un-ban if someone tries to connect more than 3 times with the wrong credentials?

  • @DmitryKey
    @DmitryKey Год назад

    Thanks for the guide. Just one question. Should I specify my home subnet in trusted_proxies?

  • @Jrvos1985
    @Jrvos1985 6 месяцев назад

    darn, that was easy :D. thnx

    • @KPeyanski
      @KPeyanski  6 месяцев назад

      You're welcome! Check my other videos as well :)

  • @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?

  • @philk12
    @philk12 2 года назад

    hi quick question. i do not have add-on backup and supervisor option. any idea why ??.

  • @tsiro9
    @tsiro9 2 года назад +1

    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!

  • @funodestro4991
    @funodestro4991 8 месяцев назад

    thank it works!

    • @KPeyanski
      @KPeyanski  8 месяцев назад

      You're welcome!

  • @M9quattro
    @M9quattro 2 года назад +2

    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 2 года назад

      I am having the exact same problem now. Did you figure it out?

    • @M9quattro
      @M9quattro 2 года назад +1

      @@MihaiKrieger At the end I decided to leave the configuration for which https worked...

  • @brianrozs3br
    @brianrozs3br 2 года назад +1

    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!!

  • @-coolee-
    @-coolee- 2 года назад +1

    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

  • @alta1910
    @alta1910 2 года назад

    thanks for this very good video.

    • @KPeyanski
      @KPeyanski  2 года назад

      You are very welcome 🙏 check my other videos as well

  • @justinsmall9149
    @justinsmall9149 11 месяцев назад

    Ok but how do you do this for a home assistant running in a docker container?

  • @machadojon
    @machadojon 7 месяцев назад

    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.

  • @Noisema
    @Noisema 2 года назад

    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  2 года назад

      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.

  • @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.

  • @mrdayz8
    @mrdayz8 2 года назад

    great video, you know if there a solution for the ones who are behind a CG-NAT?

    • @KPeyanski
      @KPeyanski  2 года назад +1

      Thanks, not so sure about the CG-NAT....

  • @Tntdruid
    @Tntdruid 2 года назад +1

    I run my own DNS server, so I can use my own domain.
    Why not use Nginx Proxy Manager?

    • @KPeyanski
      @KPeyanski  2 года назад +2

      Nginx Proxy Manager is for another video ;)

    • @Tntdruid
      @Tntdruid 2 года назад +1

      @@KPeyanski nice 👍

  • @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

  • @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.

  • @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 года назад +1

      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.

  • @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 года назад +1

      You will not have the trusted SSL certificate that way

  • @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.

  • @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?

  • @crazysteve8088
    @crazysteve8088 2 года назад

    Does this work for custom domain names? I tried it but couldnt get it to work

  • @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

  • @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!!

  • @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 ...

  • @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'.