Skip to main content

The documentation here is for an unreleased version of Recyclarr.

Visit the documentation site for the Current Version instead.

Running the Server

Recyclarr has two programs:

  • The server (recyclarr-server) does the work. It reads your configuration, talks to Sonarr and Radarr, runs syncs, and sends notifications.
  • The CLI (recyclarr) is a client. Each command sends a request to a server and shows the result. Other programs can send the same requests through the HTTP API.

The server reads your YAML configuration and settings.yml when it starts. If settings.yml is not valid, the server does not start. A problem with one of your instances does not stop it: the server leaves that instance out and starts with the others. A persistent server applies later edits to your YAML configuration on its own, but needs a restart for changes to settings.yml. See Configuration Changes.

recyclarr-server --help lists the command-line options the server accepts, and --version prints its version. Any other argument stops the server from starting. Set directories, the API key, and other settings with environment variables and settings.yml.

Persistent Server​

A persistent server keeps running until you stop it. The Docker image and the Helm chart run one, and recyclarr serve starts one on your own machine.

A persistent server:

A persistent server needs an API key and does not start without one.

For CLI commands to use a persistent server, set server.base_url in cli.yml or set the RECYCLARR_SERVER_URL environment variable. The Docker image sets the variable for you.

Ephemeral Server​

If no server address is set, each CLI command starts its own ephemeral server. The ephemeral server listens only on the local machine, handles that one command, and stops when the command ends. It does not run the built-in schedule, opens no management port, offers no web UI sign-in, and does not keep its jobs after it stops. It syncs only the instances in your YAML files, never API instances. It writes log files to logs/server/ in the data directory and sends notifications. It downloads guide data only when its cached copy is out of date, so most commands start without network access.

This is the default when you run recyclarr outside Docker without any extra setup. You do not need to set an API key: the CLI creates a new one-time key for each command and gives it to the ephemeral server.

Configuration Changes​

A persistent server applies edits to your YAML configuration while it runs, without a restart. Once a minute, when it checks for guide data updates, it compares the contents of these files with the previous check:

  • YAML files in the configs directory
  • recyclarr.yml or recyclarr.yaml
  • secrets.yml or secrets.yaml
  • Local files you add with config includes, whether in the includes directory or at an absolute path
  • Files you read with the !file tag

Creating, deleting, or editing any of these files counts as a change. When the server finds one, it loads the configuration again:

  • The server checks each instance and logs Configuration changed and was reloaded. The next sync uses every instance that passed. A sync that is already running finishes with the configuration it started with.
  • The server logs each new problem once, before that line. It does not check the files again until you change them again. Until you fix a problem, it stays in the server diagnostics.
  • If a sync or another request that reads guide data is running during a check, the server leaves your edit for the next check where none is running.

Changes to settings.yml and to environment variables need a restart.

An ephemeral server reads your configuration fresh for each command, so edits always apply to the next command.