Synology: Home Assistant 400: Bad Request

Synology Home Assistant 400 Bad Request

Suppose you have already used my Synology Wildcard guide to get Home Assistant to work over HTTPS. And today, following the latest Home Assistant update, you’ve found that you can no longer get Reverse Proxy for Home Assistant to work. If you are getting a 400: Bad Request error when you try to access your Home Assistant via HTTPS, then you’re not alone. In today’s article I will teach you how to fix the Home Assistant error and access your Home Assistant over a secure HTTPS connection again!

400 Bad Request

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Open Docker package. Go to Network then bridge. Copy your Gateway IP. In my case 172.17.0.1 Follow the instructions in the image below.

400 Bad Request Home Assistant Synology Docker network

  • STEP 3

Install the Text Editor Package. Skip this STEP if you already have Text Editor installed.

  • STEP 4

Go to File Station / Docker / homeassistant folder and open the file configuration.yaml Follow the instructions in the image below.

400 Bad Request Home Assistant Synology Docker 4

  • STEP 5

Add the lines below in the configuration.yaml file and remember to change the Gateway IP with your own Gateway IP (see STEP 2). Save the file. Follow the instructions in the image below.

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.17.0.1

400 Bad Request Home Assistant Synology Docker 5

Note: If you use Home Assistant on host network instead bridge you should add your NAS Local IP on the trusted_proxies area. See the example below.

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - YOURNASLOCALIP
  • STEP 6

Restart the Home Assistant Container. Follow the instructions in the image below.

Restart home assistant container

  • STEP 7

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 8

Now you can access your Home Assistant over HTTPS once again if you have correctly set up the Reverse Proxy by following my Wildcard guide.

400 Bad Request Home Assistant Synology Docker 6

This post was updated on Sunday / July 25th, 2021 at 2:10 AM