Sonarr TV Schedule

Sonarr TV Schedule
Photo by Glenn Vandeperre / Unsplash

"When is the next episode of Cooper and Fry?" I was asked by my girlfriend. It is this sort of question that I get asked quite regular. "Whens the next episode of <insert tv show here>" I looked it up and gave her the answer but I also asked, "Would you like to be able to check this yourself?"

"I'll give her access to the Sonarr Calendar" I thought to myself. I'll just check it works on mine first.

This is where I then came across a bit of a problem.

My sonarr instance is only accessible internally (or when connected to my VPN) but google isn't.

Here is what I did to get around this problem. Essentially I created a dynamic file in traefik to re-direct a URL that is publically accessible to the iCal link that Sonarr gives you. But it wasn't straight forward.

I also use authentication on my Sonarr instance despite it being only accessible on my LAN and/or VPN. This presented some 404 Errors (I was thinking these should have been 403 but hey ho)

First I changed the authentication setting within Sonarr itself to disable authentication for local addresses.

I then created a subdomain on my domain so its accessible to the outside world and proceeeded to create a dynamic file so traefik could then route requests correctly.

This includes a PathPrefix that links direct to the calendar feed and it also calls the below middlewares (which is potentially not required but its working so i've left it)

All that is left to do now is to setup the calendar using the newly created and accessible URL which also contains the API key from Sonarr

https://subdomain.domain.co.uk/feed/v3/calendar/Sonarr.ics?apikey=<insert-api-key-here>

This is now accessible by my Google Calendar

Maybe there is an easier way to do this, I don't know. Would love to hear peoples thoughts on this. Please subscribe (Its FREE!!) and comment