For anyone who comes across this and is looking to use external urls for notifications like I was here’s a few pointers. Just like the OP says, the documentation is terrible and I spent hours on this.
I have Core/OS on Rasp Pi. That makes a difference per the documentation. So don’t follow my instructions if you have a containerized version.
First you need to create a media folder in the config folder. This would be root/config/media. If you use visual studio or file editor you can’t get to root. The easiest way to know you’re in the right spot is if the configuration.yaml is in the same location. That’s where you want to create the media folder.
The OP states that he made the following change:
However if you do this then your relative URL will be /media/media instead of media/local. Per the instructions here you should make this local like so:
Make sure that you put /config/media otherwise your root/media folder will be used. The official documentation that I linked only says /media. While I was able to get the media browser to show files in root/media it’s not a very accessible location should you need to make changes.
When linking an image, video or audio clip to a notification you should only put the relative URL only. So if you wanted to send an image to your mobile you would do so like this:
For the media folder you DO NOT need to add allowlist_external_dirs as others mention.
Lastly, even though you can be logged in through your local browser to home assistant, the URL path will fail without the authSig key. Since one is not generated when you copy/paste the URL in the browser you will not be able to access the media folder without using the built in media browser. So DO NOT test the media folder access using a URL directly in the browser. It will fail.
Hope this helps anyone who comes across this.