Sonarr on Seedbox with Syncthing

I just thought I’d share my current Sonarr setup. Maybe it will give someone ideas and maybe others will have some ideas to help make this kind of setup better.

I have Sonarr running on a seedbox where most of the work is done. On the seedbox I have sonarr carrying out the day to day rss searches. I have syncthing running on the seedbox also, sharing a tv (master) folder to a couple of client computers at different locations.

I also have sonarr running on the client computers. With the client computers I have Sonarr watching a drone factory folder where syncthing transfers episodes from the seedbox. I have rss interval set to 0 on the client computers but they are fully set up if I wanted to search for a specific episode and have the seedbox download it and transfer it over to the drone factory folder on the client via syncthing. It’s also nice having sonarr on the client computers acting as a sort of tv manager.

I’m pretty happy with this setup. I like that the seedbox is doing most of the heavy lifting. When I had sonarr doing rss searches on my Synology NAS, I just wasn’t happy with how bogged down the NAS would get

If anyone has a similar setup please share

I have similar setup with seed box but sonarr is at my home. Syncthing brings the files back and using CDH sonarr imports files into the library. The link in between seed box and sonarr is through a vpn link.

I have a different approach for season packs, because sonarr does not behave well with those using syncthing.

So when you say the link between sonarr and seedbox, do you mean the connection to the torrent client? How exactly do you have syncthing and sonarr’s CDH configured? That sounds interesting. I use to have sonarr installed locally only and I had it import episodes via sshfs and CDH. The problem I ran into was that since my local connection was only 6 mbps at best, sonarr would keep downloading more torrents before the first one it snatched had successfully been imported.

I have my local NAS set up a ssh tunnel with my seedbox for all the services I have on the seedbox like rtorrent, jackett and sonarr etc. That way all the communication/searching etc. is secure between my local installation and the seedbox.

Yes, is for sonarr to talk to transmission securely, i also fwd tracker access through that vpn gateway by selective routing.

You enable CDH with remote path mapping so that way sonarr knows where to look. In the client i post process the torrent with a script, so once the torrent finish I’ll copy/extract/hardlink the contents to a syncthing folder. You have match exactly what sonarr is expecting. So for example

download folder remote: /storage/torrent/finish/tv-sonarr/The.Americans.2013.S04E05.HDTV.x264-KILLERS
syncthing folder remote: /storage/export/series/The.Americans.2013.S04E05.HDTV.x264-KILLERS
syncthing folder local: /torrents/tv-sonarr/The.Americans.2013.S04E05.HDTV.x264-KILLERS/

The folders you’re syncthing are series <-> tv-sonarr, this is important because sonarr expects the same top level folder name.

As long as sonarr is tracking the episode in the client, it will look on the “syncthing local” for the files, errors will pop out in log with no files found, this is because the syncthing prefix/suffix.
Once the transfer is finished sonarr will scan again and this time i’ll find the files to import. You need here a post processing script in sonarr to clean the folder (remove contents).

Very good

Nice. I didn’t want to mess with selective routing so I set up all my indexers through jackett which is running on the seedbox and tunneled through ssh locally.

Thanks for sharing your setup in detail. I can see how to properly setup cdh according to your instructions.

I actually changed my setup again. I decided to go back to using SickGear on my seedbox to handle the rss searching. I found that SickGear has better results when it comes to finding and downloading daily type releases such as 20/20, Dateline and 60 Minutes. I still use Sonarr on my local server because I really like the gui, episode management and the ability to choose specific downloads. This way I have the best of both worlds.

Forgot to mention that season packs need to be processed through a different folder. I use a combination of syncthing, incron and the sonarr api.
The CDH doesn’t play well with syncthing and season packs. Also the post process script that cleans the source ends up deleting the whole folder after the first import. So for know I left

So since I am tunneling to my download clients, the host fields in my download client settings in sonarr are “localhost”. In remote path mapping, would I put “localhost:xxxx” in the host field?

Could you share your post-processing script?

Yea I remember having problems with season packs also. Sonarr would import the first episode that syncs over then delete the season folder.

For curiosities sake, what made you decide not to just use the drone factory folder?

I guess, it has to be the host that sonarr sends the report to, so it can track it and translate the path the client is reporting.

I do a lot of other stuff. But this is the shell function that cleans the source.

_remove_source_torrent () {
  if [ "$sonarr_episodefile_sourcefolder" = "/torrents/tv-sonarr" ]; then
    echo "Single file torrent"
    echo `rm -rfv $sonarr_episodefile_sourcepath`
  elif [ ! -z $(printf $sonarr_episodefile_sourcefolder | grep seasonpack) ];then
    echo "Season Pack, sonarr will move files and remove folder"
  elif [ -d "$(printf "/torrents/tv-sonarr/"${sonarr_episodefile_scenename})" ];then
    echo "Torrent with folder"
    echo `rm -rfv $sonarr_episodefile_sourcefolder`

Because the incron script will trigger the scan when the syncthing transfer finishes. The drone factory will probably import the first file, then delete the rest of the folder with .syncthing files causing the whole process to fail. I haven’t actually tried but i prefer the option where i can control the scan.

I figured out that for remote path mapping I just needed to put “localhost” in the host field and not “localhost:[port]”