Autodl-curl not hitting sonarr


Sonarr version (exact version):
Mono version (if Sonarr is not running on Windows):
OS: Ubuntu 18.04
Debug logs:
Description of issue:
Autodl-curl-sonarr is not hitting sonarr. My filter starts the script in rtorrent but I cant see any records of it in sonarr. Its like the script cant communicate with sonarr. The ApiKey is added and the ip is changed to match my setup.

I have given the script permissions and edited the script to change url. I am using revers proxy. When running this command inside sonarr container I get a list of download clients. When passing it to the script nothing happens.

/usr/bin/curl -i -H “Accept: application/json” -H “Content-Type: application/json” -H “X-Api-Key: your_api_key_goes_here” -X GET -d ‘{}’ http://ip:8989/sonarr/api/downloadclient

The script:


date=$(date -u +"%Y-%m-%d %H:%M:%SZ")

/usr/bin/curl -i -H “Accept: application/json” -H “Content-Type: application/json” -H “X-Api-Key: $apiKey” -X POST -d ‘{“title”:"’"$title"’",“downloadUrl”:"’"$downloadUrl"’",“downloadProtocol”:“torrent”,“publishDate”:"’"$date"’"}’ http://ip:8989/sonarr/api/release/push
} &> /dev/null

autodl filter:

upload-command = /config/script/
upload-args = “$(TorrentName)” “$(TorrentUrl)” ApiKey
upload-type = exec


Have you tried logging the output of the script?
Sonarr’s debug logs (or for more details the trace logs), will have the API calls logged as well as the response code.

Also change downloadProtocol to protocol, probably worth switching to the v3 API endpoint as well, /api/v3/


Changed the script like you said.

/usr/bin/curl -i -H “Accept: application/json” -H “Content-Type: application/json” -H “X-Api-Key: $apiKey” -X POST -d ‘{“title”:"’"$title"’",“downloadUrl”:"’"$downloadUrl"’",“protocol”:“torrent”,“publishDate”:"’"$date"’"}’
} &> /dev/null

Changed the logging to trace, two releases were matched by autodl-sonarr but still no entry of anything i sonarr logs.

Everything looks ok in rtorrent. It send the the command and starts the script as far as I can tell. The script just dont reach sonarr for some reason.


Try logging the output of the curl somewhere and see what is logged, best I can tell everything is correct with the URL/JSON body.


I got one step closer.

If i use the internal ip for the sonarr container it do work, but not when I use ip for the ubuntu server running all the containers.

Since the containers have dynamic ip this is a bit of a problem but at least I do know that the script is working, it just cant connect to sonarr.

How do I log the output of curl?


Not logging the output to /dev/null an instead to a file.


Got it working.

Had to change from http to https and change ip to domain/sonarr