Skip to content

Configuration

Yuval Ziv edited this page Nov 29, 2024 · 4 revisions

Controlling the configuration

There are two ways to control the configuration of Announcarr.

.env file

Edit the .env file that you supply to the docker container.

appsettings.json file

This is the less intuitive way. You edit the appsettings.json file, either in the publish output (if you built it yourself), or by creating a volume and overriding the file in the container.

Override appsettings.json

Docker Compose

Add this compose section to your compose file

...
    volumes:
      ...
      - /path/to/custom/appsettings.json:/app/appsettings.json
...

Docker Run

Add this to your docker run command:

docker run ... -v /path/to/custom/appsettings.json:/app/appsettings.json ... ghcr.io/yuval-ziv/announcarr:master

Configurations

Application

Key Definition Required? Default Value Possible Values
Kestrel__EndPoints__Http__Url URL the application will listen to no http://0.0.0.0:8080 string

Logging

It's not recommended to alter most configuration here besides:

  • Serilog__WriteTo__0__Args__outputTemplate and Serilog__WriteTo__1__Args__outputTemplate - control the log template of each sink.
  • Serilog__WriteTo__1__Args__path - control the file sink output file.
  • Serilog__WriteTo__1__Args__rollingInterval, Serilog__WriteTo__1__Args__retainedFileCountLimit, Serilog__WriteTo__1__Args__rollOnFileSizeLimit and Serilog__WriteTo__1__Args__fileSizeLimitBytes - control the file sink output file rolling.
Key Definition Required? Default Value Possible Values
Serilog__MinimumLevel__Default default log level no Debug Verbose,Debug,Information,Warning,Error,Fatal
Serilog__MinimumLevel__Override__Microsoft.AspNetCore log level for Microsoft.AspNetCore assembly no Warning Verbose,Debug,Information,Warning,Error,Fatal
Serilog__MinimumLevel__Override__Microsoft.Hosting.Lifetime log level for Microsoft.Hosting.Lifetime assembly no Information Verbose,Debug,Information,Warning,Error,Fatal
Serilog__Enrich__0 log enricher no FromLogContext string
Serilog__Enrich__1 log enricher no WithThreadId string
Serilog__Enrich__2 log enricher no WithThreadName string
Serilog__Enrich__3 log enricher no WithSourceContext string
Serilog__WriteTo__0__Name console log sink name no Console string
Serilog__WriteTo__0__Args__outputTemplate console log sink log template no {Timestamp:yyyy-MM-dd HH:mm:ss} [{Level}] [Thread {ThreadId}{ThreadName:ifnotnull={ThreadName}] [{SourceContext}] {Message}{NewLine}{Exception} string
Serilog__WriteTo__1__Name file log sink name no File string
Serilog__WriteTo__1__Args__outputTemplate file log sink log template no {Timestamp:yyyy-MM-dd HH:mm:ss} [{Level}] [Thread {ThreadId}{ThreadName:ifnotnull={ThreadName}] [{SourceContext}] {Message}{NewLine}{Exception} string
Serilog__WriteTo__1__Args__path file log sink output file no logs/log.txt string
Serilog__WriteTo__1__Args__rollingInterval file log sink output file rolling interval no Day Infinite,Year,Month,Day,Hour,Minute
Serilog__WriteTo__1__Args__retainedFileCountLimit file log sink output files to keep no 7 number
Serilog__WriteTo__1__Args__rollOnFileSizeLimit file log sink roll output file when reaching to size limit no true false/true
Serilog__WriteTo__1__Args__fileSizeLimitBytes file log sink output file size limit no 104857600 number

Announcarr Behaviour

Key Definition Required? Default Value Possible Values
Announcarr__Interval__AnnouncarrRange how often Announcarr will run yes Weekly Hourly,Daily,Weekly,Monthly,Yearly
Announcarr__Interval__MinuteOfHour in which minute Announcarr will run yes 0 0-59
Announcarr__Interval__HourOfDay in which hour Announcarr will run when Announcarr__Interval__AnnouncarrRange is Daily, Weekly, Monthly or Yearly 20 0-23
Announcarr__Interval__DayOfWeek in which day of the week Announcarr will run when Announcarr__Interval__AnnouncarrRange is Weekly Sunday Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
Announcarr__Interval__DayOfMonth in which day of the month Announcarr will run when Announcarr__Interval__AnnouncarrRange is Monthly or Yearly Sunday 1-31
Announcarr__Interval__MonthOfYear in which month Announcarr will run when Announcarr__Interval__AnnouncarrRange is Yearly Sunday 1-12
Announcarr__EmptyContractFallback__ExportOnEmptyContract should Announcarr export when there are no result no false false/true
Announcarr__EmptyContractFallback__CustomMessageOnEmptyContract export this message when there are no result no There is nothing to announce for {announcementType} string

Integrations

You can have multiple integrations. You need to add all the required keys with another ID (example: Integrations__Type__ID__Config - first integration will have ID = 0, second ID = 1, etc.)

Sonarr

Key Definition Required? Default Value Possible Values
Integrations__Sonarr__{n}__Name integration name only when more than one Sonarr integrations are defined Sonarr string
Integrations__Sonarr__{n}__IsEnabled is integration enabled no false false/true
Integrations__Sonarr__{n}__Url Sonarr's URL no http://localhost:8989 string
Integrations__Sonarr__{n}__ApiKey Sonarr's api key yes N/A string
Integrations__Sonarr__{n}__IgnoreCertificateValidation should ignore Sonarr certificate (relvant only for https) no false false/true
Integrations__Sonarr__{n}__IgnoreSeasonZero should ignore season zero (specials) no true false/true
Integrations__Sonarr__{n}AnnouncementTypeToConfiguration{AnnouncementType}__IsEnabled should integration work for announcement type no true false/true
Integrations__Sonarr__{n}AnnouncementTypeToConfiguration{AnnouncementType}Tags{m} tags for the integration no N/A string

Radarr

Key Definition Required? Default Value Possible Values
Integrations__Radarr__{n}__Name integration name only when more than one Radarr integrations are defined Radarr string
Integrations__Radarr__{n}__IsEnabled is integration enabled no false false/true
Integrations__Radarr__{n}__Url Radarr's URL no http://localhost:7878 string
Integrations__Radarr__{n}__ApiKey Radarr's api key yes N/A string
Integrations__Radarr__{n}__IgnoreCertificateValidation should ignore Sonarr certificate (relvant only for https) no false false/true
Integrations__Radarr__{n}AnnouncementTypeToConfiguration{AnnouncementType}__IsEnabled should integration work for announcement type no true false/true
Integrations__Radarr__{n}AnnouncementTypeToConfiguration{AnnouncementType}Tags{m} tags for the integration no N/A string

Webhooks

You can have multiple webhooks. You need to add all the required keys with another ID (example: Webhook__Type__ID__Config - first webhook will have ID = 0, second ID = 1, etc.)

Overseerr

Caution

Do NOT change the JSON payload of Overseer's webhook. Changing it might break the webhook.

Key Definition Required? Default Value Possible Values
Webhooks__Overseerr__{n}__Name webhook name only when more than one Overseerr webhooks are defined Overseerr string
Webhooks__Overseerr__{n}__EnableWebhookListener is webhook listener enabled no false false/true
Webhooks__Overseerr__{n}__AllowRemoteRequests allow webhook from remote machines no true false/true
Webhooks__Overseerr__{n}__Method webhook http method no POST see MDN
Webhooks__Overseerr__{n}__Path webhook http path no /overseerr/webhook string
Webhooks__Overseerr__{n}__AuthorizationHeader webhook authorization header no N/A string
Webhooks__Overseerr__{n}__OverseerrUrl overseerr URL no http://localhost:5055 string
Webhooks__Overseerr__{n}__IsEnabled is webhook enabled no true false/true
Webhooks__Overseerr__{n}NotificationTypeToConfiguration{NotificationType}__IsEnabled should exporter work for announcement type no true false/true
Webhooks__Overseerr__{n}NotificationTypeToConfiguration{NotificationType}Tags{m} tags for the webhook no N/A string

Note

The difference between EnableWebhookListener and IsEnabled is that the first enables the listener (so it can handle requests) and the latter is a bigger toggle to NotificationTypeToConfiguration. Maybe down the line there will be some sort of integration to Overseerr, so I'm separating the two configuration.

Exporters

You can have multiple exporters. You need to add all the required keys with another ID (example: Exporters__Type__ID__Config - first exporter will have ID = 0, second ID = 1, etc.)

Key Definition Required? Default Value Possible Values
Exporters__Telegram__{n}__Name exporter name only when more than one Telegram exporters are defined Radarr string
Exporters__Telegram__{n}__IsEnabled is exporter enabled no false false/true
Exporters__Telegram__{n}__DateTimeFormat format when converting date time objects no dd/MM/yyyy string
Exporters__Telegram__{n}__Bot__Token telegram bot token yes N/A string
Exporters__Telegram__{n}Bot__ChatIds{m} telegram chat ID the exporter should send messages to no (without it messages won't be sent anywhere) N/A string
Exporters__Telegram__{n}__Bot__CustomTelegramBotApiServer custom telegram bot api server url no N/A string
Exporters__Telegram__{n}AnnouncementTypeToConfiguration{AnnouncementType}__IsEnabled should exporter work for announcement type no true false/true
Exporters__Telegram__{n}AnnouncementTypeToConfiguration{AnnouncementType}Tags{m} tags for the exporter no N/A string

Appendix

Used some "variables" in the configuration

  • n and m - instance number when using arrays.
  • NotificationType - The notification type coming from Overseerr. Possible values are MediaPending, MediaApproved, MediaAvailable, MediaFailed, TestNotification, MediaDeclined, MediaAutoApproved, IssueCreated, IssueComment, IssueResolved, IssueReopened, MediaAutoRequested. image
  • AnnouncementType - The announcement type. Possible values are Test, Forecast, Summary, Announcement. More here